qyl-mcp-server 2.1.0 → 4.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.
Files changed (47) hide show
  1. package/README.md +44 -21
  2. package/dist/collector.d.ts +15 -2
  3. package/dist/collector.js +67 -3
  4. package/dist/collector.js.map +1 -1
  5. package/dist/config.d.ts +0 -2
  6. package/dist/config.js +0 -2
  7. package/dist/config.js.map +1 -1
  8. package/dist/contract-operations.d.ts +37 -0
  9. package/dist/contract-operations.js +124 -0
  10. package/dist/contract-operations.js.map +1 -0
  11. package/dist/contract-validation.d.ts +7 -20
  12. package/dist/contract-validation.js +11 -22
  13. package/dist/contract-validation.js.map +1 -1
  14. package/dist/demo.d.ts +18 -0
  15. package/dist/demo.js +99 -0
  16. package/dist/demo.js.map +1 -1
  17. package/dist/mcp-app.html +5 -5
  18. package/dist/mcp-dashboard.html +4 -4
  19. package/dist/mcp-home.html +6 -7
  20. package/dist/metrics-tools.d.ts +23 -0
  21. package/dist/metrics-tools.js +96 -0
  22. package/dist/metrics-tools.js.map +1 -0
  23. package/dist/metrics.d.ts +45 -0
  24. package/dist/metrics.js +274 -0
  25. package/dist/metrics.js.map +1 -0
  26. package/dist/oauth.d.ts +0 -1
  27. package/dist/oauth.js +1 -2
  28. package/dist/oauth.js.map +1 -1
  29. package/dist/server.js +3 -4
  30. package/dist/server.js.map +1 -1
  31. package/dist/summaries.d.ts +13 -0
  32. package/dist/summaries.js +67 -0
  33. package/dist/summaries.js.map +1 -1
  34. package/package.json +4 -4
  35. package/dist/observe-graph.html +0 -214
  36. package/dist/workflow-data.d.ts +0 -13
  37. package/dist/workflow-data.js +0 -189
  38. package/dist/workflow-data.js.map +0 -1
  39. package/dist/workflow-layout.d.ts +0 -24
  40. package/dist/workflow-layout.js +0 -165
  41. package/dist/workflow-layout.js.map +0 -1
  42. package/dist/workflow-reducer.d.ts +0 -37
  43. package/dist/workflow-reducer.js +0 -114
  44. package/dist/workflow-reducer.js.map +0 -1
  45. package/dist/workflow-tools.d.ts +0 -10
  46. package/dist/workflow-tools.js +0 -170
  47. package/dist/workflow-tools.js.map +0 -1
@@ -5,9 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <meta name="color-scheme" content="light dark">
7
7
  <title>qyl · mcp</title>
8
- <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=>de(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 h(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 g(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ee(e){return JSON.stringify(e)}function te(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ne=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function re(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ie=u(()=>{if(S.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ae(e){if(re(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return re(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function oe(e){return ae(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var se=new Set([`string`,`number`,`symbol`]),ce=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ue(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 de(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function fe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},me={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function he(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 ue(e,_(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]&&g(e,r,n.shape[r])}return g(this,`shape`,e),e},checks:[]}))}function ge(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 ue(e,_(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 g(this,`shape`,r),r},checks:[]}))}function _e(e,t){if(!ae(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 ue(e,_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return g(this,`shape`,n),n}}))}function ve(e,t){if(!ae(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ue(e,_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return g(this,`shape`,n),n}}))}function ye(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 ue(e,_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return g(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function be(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 ue(t,_(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 g(this,`shape`,i),i},checks:[]}))}function xe(e,t,n){return ue(t,_(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 g(this,`shape`,i),i}}))}function Se(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 Ce(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 y(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function we(e){return typeof e==`string`?e:e?.message}function Te(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ee(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:we(e.inst?._zod.def?.error?.(e))??we(a?.(e))??we(t?.error?.(e))??we(n.customError?.(e))??we(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 De(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}var Oe=/[\uD800-\uDBFF]/;function ke(e){let t=e.length;if(!Oe.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 Ae(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function je(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 Me(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ne(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ie(e,n,r.value)}}function Pe(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Fe(e,t,n){return Pe(e,t,n,!1)}function Ie(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return Pe(this,t,n.bind(this))},set(e){Pe(this,t,e)}})}function Le(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Re,ze=!1,Be={configurable:!0,get(){ze=!0}};function b(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Re!==e._zod){Re=void 0;return}Re=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Be);let e=ze;ze=!1;try{let r=n(this);return ze?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ze||=e,r}catch(n){throw delete this[t],ze||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Ve(e,t,n,r){let i=Le(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 He=`~constantCatch`;function Ue(e){let t=()=>e;return t[He]=!0,t}var We,Ge=Object.freeze({status:`aborted`}),Ke={value:void 0,enumerable:!1},qe=`captureStackTrace`in Error?Error:null;function Je(e){let t=qe;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return qe=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function x(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){Ke.value=new a(r);try{Object.defineProperty(n,"_zod",Ke)}finally{Ke.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),Ne(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?Je(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 Ye=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Xe=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(We=globalThis).__zod_globalConfig??(We.__zod_globalConfig={});var S=globalThis.__zod_globalConfig;function C(e){return e&&Object.assign(S,e),S}function Ze(){let e=this._zod;return e.message??=JSON.stringify(e.def,l,2),e.message}function Qe(e){this._zod.message=e}var $e={get:Ze,set:Qe,enumerable:!0,configurable:!0},et={value:void 0,enumerable:!1},tt={value:void 0,enumerable:!1},nt=new WeakSet([Object.prototype,Error.prototype]),rt=(e,t)=>{e.name=`$ZodError`,et.value=e._zod,Object.defineProperty(e,"_zod",et),tt.value=t,Object.defineProperty(e,"issues",tt),et.value=void 0,tt.value=void 0,Object.defineProperty(e,"message",$e);let n=Object.getPrototypeOf(e);nt.has(n)||(nt.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})}}))},w=x(`$ZodError`,rt),it=x(`$ZodError`,rt,void 0,{Parent:Error});function at(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 ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?at(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function st(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 ct(e,t){return{callee:t?.callee??e,Err:t?.Err}}var lt=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 Ye;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ee(e,o,C())));throw ne(n,a?.callee??t),n}return s.value};return t},ut=lt(it),dt=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=>Ee(e,o,C())));throw ne(n,a?.callee??t),n}return s.value};return t},ft=dt(it),pt=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 Ye;return a.issues.length?{success:!1,error:new(e??w)(a.issues.map(e=>Ee(e,i,C())))}:{success:!0,data:a.value}},mt=pt(it),ht=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=>Ee(e,i,C())))}:{success:!0,data:a.value}},gt=ht(it),_t=e=>{let t=lt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ct(n,a))};return n},vt=e=>{let t=lt(e),n=(e,r,i,a)=>t(e,r,i,ct(n,a));return n},yt=e=>{let t=dt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ct(n,a))};return n},bt=e=>{let t=dt(e),n=async(e,r,i,a)=>await t(e,r,i,ct(n,a));return n},xt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pt(e)(t,n,i)},St=e=>(t,n,r)=>pt(e)(t,n,r),Ct=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ht(e)(t,n,i)},wt=e=>async(t,n,r)=>ht(e)(t,n,r),Tt=t({base64:()=>$t,base64url:()=>en,bigint:()=>mn,boolean:()=>_n,browserEmail:()=>Gt,cidrv4:()=>Zt,cidrv6:()=>Qt,creditCard:()=>on,cuid:()=>Et,cuid2:()=>Dt,date:()=>ln,datetime:()=>fn,domain:()=>nn,duration:()=>Nt,e164:()=>an,email:()=>Bt,emoji:()=>qt,extendedDuration:()=>Pt,guid:()=>Ft,hex:()=>Sn,hostname:()=>tn,html5Email:()=>Vt,httpProtocol:()=>rn,idnEmail:()=>Wt,integer:()=>hn,ipv4:()=>Jt,ipv6:()=>Yt,ksuid:()=>At,lowercase:()=>bn,mac:()=>Xt,md5_base64:()=>En,md5_base64url:()=>Dn,md5_hex:()=>Tn,nanoid:()=>jt,nanoidOfLength:()=>Mt,null:()=>vn,number:()=>gn,rfc5322Email:()=>Ht,sha1_base64:()=>kn,sha1_base64url:()=>An,sha1_hex:()=>On,sha256_base64:()=>Mn,sha256_base64url:()=>Nn,sha256_hex:()=>jn,sha384_base64:()=>Fn,sha384_base64url:()=>In,sha384_hex:()=>Pn,sha512_base64:()=>Rn,sha512_base64url:()=>zn,sha512_hex:()=>Ln,string:()=>pn,time:()=>dn,ulid:()=>Ot,undefined:()=>yn,unicodeEmail:()=>Ut,uppercase:()=>xn,uuid:()=>It,uuid4:()=>Lt,uuid6:()=>Rt,uuid7:()=>zt,xid:()=>kt}),Et=/^[cC][0-9a-z]{6,}$/,Dt=/^[0-9a-z]+$/,Ot=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,kt=/^[0-9a-vA-V]{20}$/,At=/^[A-Za-z0-9]{27}$/,jt=/^[a-zA-Z0-9_-]{21}$/;function Mt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Nt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pt=/^[-+]?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)?)??$/,Ft=/^([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})$/,It=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)$/,Lt=It(4),Rt=It(6),zt=It(7),Bt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vt=/^[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])?)*$/,Ht=/^(([^<>()\[\]\\.,;:\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,}))$/,Ut=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Wt=Ut,Gt=/^[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])?)*$/,Kt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function qt(){return new RegExp(Kt,`u`)}var Jt=/^(?:(?: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])$/,Yt=/^(([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}|:))$/,Xt=e=>{let t=le(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Zt=/^((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])$/,Qt=/^(([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])$/,$t=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,en=/^[A-Za-z0-9_-]*$/,tn=/^(?=.{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])?)*\.?$/,nn=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,rn=/^https?$/,an=/^\+[1-9]\d{6,14}$/,on=/^\d(?:[ -]?\d){11,18}$/,sn=`(?:(?:\\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 cn(e){return RegExp(`^${e}$`)}var ln=cn(sn);function un(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 dn(e){return RegExp(`^${un(e)}$`)}function fn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${un({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${un({precision:e.precision})}`:n;return RegExp(`^${sn}T(?:${r})$`)}var pn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},mn=/^-?\d+n?$/,hn=/^-?\d+$/,gn=/^-?\d+(?:\.\d+)?$/,_n=/^(?:true|false)$/i,vn=/^null$/i,yn=/^undefined$/i,bn=/^[^A-Z]*$/,xn=/^[^a-z]*$/,Sn=/^[0-9a-fA-F]*$/;function Cn(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function wn(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Tn=/^[0-9a-fA-F]{32}$/,En=Cn(22,`==`),Dn=wn(22),On=/^[0-9a-fA-F]{40}$/,kn=Cn(27,`=`),An=wn(27),jn=/^[0-9a-fA-F]{64}$/,Mn=Cn(43,`=`),Nn=wn(43),Pn=/^[0-9a-fA-F]{96}$/,Fn=Cn(64,``),In=wn(64),Ln=/^[0-9a-fA-F]{128}$/,Rn=Cn(86,`==`),zn=wn(86),T=x(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Bn=e=>{let t=e.value;return!d(t)&&t.size!==void 0},Vn=e=>{let t=e.value;return!d(t)&&t.length!==void 0},Hn={number:`number`,bigint:`bigint`,object:`date`},Un=x(`$ZodCheckLessThan`,(e,t)=>{T.init(e,t);let n=Hn[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:Hn[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})}}),Wn=x(`$ZodCheckGreaterThan`,(e,t)=>{T.init(e,t);let n=Hn[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:Hn[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})}}),Gn=x(`$ZodCheckMultipleOf`,(e,t)=>{T.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})}}),Kn=x(`$ZodCheckNumberFormat`,(e,t)=>{T.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=pe[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=hn)}),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})}}),qn=x(`$ZodCheckBigIntFormat`,(e,t)=>{T.init(e,t);let[n,r]=me[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})}}),Jn=x(`$ZodCheckMaxSize`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Bn),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:De(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Yn=x(`$ZodCheckMinSize`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Bn),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:De(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xn=x(`$ZodCheckSizeEquals`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Bn),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:De(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})}}),Zn=x(`$ZodCheckMaxLength`,(e,t)=>{var n;T.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,i=r.length;if((typeof r==`string`&&i>t.maximum?ke(r):i)<=t.maximum)return;let a=Ae(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Qn=x(`$ZodCheckMinLength`,(e,t)=>{var n;T.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,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ke(r):i)>=t.minimum)return;let a=Ae(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=x(`$ZodCheckLengthEquals`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Vn),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?ke(r):i;if(a===t.length)return;let o=Ae(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})}}),er=x(`$ZodCheckStringFormat`,(e,t)=>{var n,r;T.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=()=>{})}),tr=x(`$ZodCheckRegex`,(e,t)=>{er.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})}}),nr=x(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=bn,er.init(e,t)}),rr=x(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=xn,er.init(e,t)}),ir=x(`$ZodCheckIncludes`,(e,t)=>{T.init(e,t);let n=le(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})}}),ar=x(`$ZodCheckStartsWith`,(e,t)=>{T.init(e,t);let n=RegExp(`^${le(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})}}),or=x(`$ZodCheckEndsWith`,(e,t)=>{T.init(e,t);let n=RegExp(`.*${le(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 sr(e,t,n){e.issues.length&&t.issues.push(...y(n,e.issues))}var cr=x(`$ZodCheckProperty`,(e,t)=>{T.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=>sr(n,e,t.property));sr(n,e,t.property)}}),lr=x(`$ZodCheckMimeType`,(e,t)=>{T.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})}}),ur=x(`$ZodCheckOverwrite`,(e,t)=>{T.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),dr=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(`
8
+ <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=>de(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 h(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 g(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ee(e){return JSON.stringify(e)}function te(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ne=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function re(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ie=u(()=>{if(S.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ae(e){if(re(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return re(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function oe(e){return ae(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var se=new Set([`string`,`number`,`symbol`]),ce=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ue(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 de(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function fe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var pe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},me={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function he(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 ue(e,_(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]&&g(e,r,n.shape[r])}return g(this,`shape`,e),e},checks:[]}))}function ge(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 ue(e,_(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 g(this,`shape`,r),r},checks:[]}))}function _e(e,t){if(!ae(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 ue(e,_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return g(this,`shape`,n),n}}))}function ve(e,t){if(!ae(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ue(e,_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return g(this,`shape`,n),n}}))}function ye(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 ue(e,_(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return g(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function be(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 ue(t,_(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 g(this,`shape`,i),i},checks:[]}))}function xe(e,t,n){return ue(t,_(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 g(this,`shape`,i),i}}))}function Se(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 Ce(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 y(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function we(e){return typeof e==`string`?e:e?.message}function Te(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ee(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:we(e.inst?._zod.def?.error?.(e))??we(a?.(e))??we(t?.error?.(e))??we(n.customError?.(e))??we(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 De(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}var Oe=/[\uD800-\uDBFF]/;function ke(e){let t=e.length;if(!Oe.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 Ae(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function je(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 Me(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ne(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ie(e,n,r.value)}}function Pe(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Fe(e,t,n){return Pe(e,t,n,!1)}function Ie(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Pe(this,t,n.bind(this))},set(e){Pe(this,t,e)}})}function Le(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Re,ze=!1,Be={configurable:!0,get(){ze=!0}};function b(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Re!==e._zod){Re=void 0;return}Re=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Be);let e=ze;ze=!1;try{let r=n(this);return ze?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ze||=e,r}catch(n){throw delete this[t],ze||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Ve(e,t,n,r){let i=Le(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 He=`~constantCatch`;function Ue(e){let t=()=>e;return t[He]=!0,t}var We,Ge=Object.freeze({status:`aborted`}),Ke={value:void 0,enumerable:!1},qe=`captureStackTrace`in Error?Error:null;function Je(e){let t=qe;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return qe=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function x(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){Ke.value=new a(r);try{Object.defineProperty(n,"_zod",Ke)}finally{Ke.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),Ne(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?Je(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 Ye=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Xe=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(We=globalThis).__zod_globalConfig??(We.__zod_globalConfig={});var S=globalThis.__zod_globalConfig;function C(e){return e&&Object.assign(S,e),S}function Ze(){let e=this._zod;return e.message??=JSON.stringify(e.def,l,2),e.message}function Qe(e){this._zod.message=e}var $e={get:Ze,set:Qe,enumerable:!0,configurable:!0},et={value:void 0,enumerable:!1},tt={value:void 0,enumerable:!1},nt=new WeakSet([Object.prototype,Error.prototype]),rt=(e,t)=>{e.name=`$ZodError`,et.value=e._zod,Object.defineProperty(e,"_zod",et),tt.value=t,Object.defineProperty(e,"issues",tt),et.value=void 0,tt.value=void 0,Object.defineProperty(e,"message",$e);let n=Object.getPrototypeOf(e);nt.has(n)||(nt.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})}}))},w=x(`$ZodError`,rt),it=x(`$ZodError`,rt,void 0,{Parent:Error});function at(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 ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?at(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function st(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 ct(e,t){return{callee:t?.callee??e,Err:t?.Err}}var lt=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 Ye;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ee(e,o,C())));throw ne(n,a?.callee??t),n}return s.value};return t},ut=lt(it),dt=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=>Ee(e,o,C())));throw ne(n,a?.callee??t),n}return s.value};return t},ft=dt(it),pt=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 Ye;return a.issues.length?{success:!1,error:new(e??w)(a.issues.map(e=>Ee(e,i,C())))}:{success:!0,data:a.value}},mt=pt(it),ht=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=>Ee(e,i,C())))}:{success:!0,data:a.value}},gt=ht(it),_t=e=>{let t=lt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ct(n,a))};return n},vt=e=>{let t=lt(e),n=(e,r,i,a)=>t(e,r,i,ct(n,a));return n},yt=e=>{let t=dt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ct(n,a))};return n},bt=e=>{let t=dt(e),n=async(e,r,i,a)=>await t(e,r,i,ct(n,a));return n},xt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pt(e)(t,n,i)},St=e=>(t,n,r)=>pt(e)(t,n,r),Ct=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ht(e)(t,n,i)},wt=e=>async(t,n,r)=>ht(e)(t,n,r),Tt=t({base64:()=>$t,base64url:()=>en,bigint:()=>mn,boolean:()=>_n,browserEmail:()=>Gt,cidrv4:()=>Zt,cidrv6:()=>Qt,creditCard:()=>on,cuid:()=>Et,cuid2:()=>Dt,date:()=>ln,datetime:()=>fn,domain:()=>nn,duration:()=>Nt,e164:()=>an,email:()=>Bt,emoji:()=>qt,extendedDuration:()=>Pt,guid:()=>Ft,hex:()=>Sn,hostname:()=>tn,html5Email:()=>Vt,httpProtocol:()=>rn,idnEmail:()=>Wt,integer:()=>hn,ipv4:()=>Jt,ipv6:()=>Yt,ksuid:()=>At,lowercase:()=>bn,mac:()=>Xt,md5_base64:()=>En,md5_base64url:()=>Dn,md5_hex:()=>Tn,nanoid:()=>jt,nanoidOfLength:()=>Mt,null:()=>vn,number:()=>gn,rfc5322Email:()=>Ht,sha1_base64:()=>kn,sha1_base64url:()=>An,sha1_hex:()=>On,sha256_base64:()=>Mn,sha256_base64url:()=>Nn,sha256_hex:()=>jn,sha384_base64:()=>Fn,sha384_base64url:()=>In,sha384_hex:()=>Pn,sha512_base64:()=>Rn,sha512_base64url:()=>zn,sha512_hex:()=>Ln,string:()=>pn,time:()=>dn,ulid:()=>Ot,undefined:()=>yn,unicodeEmail:()=>Ut,uppercase:()=>xn,uuid:()=>It,uuid4:()=>Lt,uuid6:()=>Rt,uuid7:()=>zt,xid:()=>kt}),Et=/^[cC][0-9a-z]{6,}$/,Dt=/^[0-9a-z]+$/,Ot=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,kt=/^[0-9a-vA-V]{20}$/,At=/^[A-Za-z0-9]{27}$/,jt=/^[a-zA-Z0-9_-]{21}$/;function Mt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Nt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pt=/^[-+]?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)?)??$/,Ft=/^([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})$/,It=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)$/,Lt=It(4),Rt=It(6),zt=It(7),Bt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vt=/^[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])?)*$/,Ht=/^(([^<>()\[\]\\.,;:\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,}))$/,Ut=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Wt=Ut,Gt=/^[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])?)*$/,Kt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function qt(){return new RegExp(Kt,`u`)}var Jt=/^(?:(?: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])$/,Yt=/^(([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}|:))$/,Xt=e=>{let t=le(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Zt=/^((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])$/,Qt=/^(([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])$/,$t=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,en=/^[A-Za-z0-9_-]*$/,tn=/^(?=.{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])?)*\.?$/,nn=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,rn=/^https?$/,an=/^\+[1-9]\d{6,14}$/,on=/^\d(?:[ -]?\d){11,18}$/,sn=`(?:(?:\\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 cn(e){return RegExp(`^${e}$`)}var ln=cn(sn);function un(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 dn(e){return RegExp(`^${un(e)}$`)}function fn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${un({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${un({precision:e.precision})}`:n;return RegExp(`^${sn}T(?:${r})$`)}var pn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},mn=/^-?\d+n?$/,hn=/^-?\d+$/,gn=/^-?\d+(?:\.\d+)?$/,_n=/^(?:true|false)$/i,vn=/^null$/i,yn=/^undefined$/i,bn=/^[^A-Z]*$/,xn=/^[^a-z]*$/,Sn=/^[0-9a-fA-F]*$/;function Cn(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function wn(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Tn=/^[0-9a-fA-F]{32}$/,En=Cn(22,`==`),Dn=wn(22),On=/^[0-9a-fA-F]{40}$/,kn=Cn(27,`=`),An=wn(27),jn=/^[0-9a-fA-F]{64}$/,Mn=Cn(43,`=`),Nn=wn(43),Pn=/^[0-9a-fA-F]{96}$/,Fn=Cn(64,``),In=wn(64),Ln=/^[0-9a-fA-F]{128}$/,Rn=Cn(86,`==`),zn=wn(86),T=x(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Bn=e=>{let t=e.value;return!d(t)&&t.size!==void 0},Vn=e=>{let t=e.value;return!d(t)&&t.length!==void 0},Hn={number:`number`,bigint:`bigint`,object:`date`},Un=x(`$ZodCheckLessThan`,(e,t)=>{T.init(e,t);let n=Hn[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:Hn[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})}}),Wn=x(`$ZodCheckGreaterThan`,(e,t)=>{T.init(e,t);let n=Hn[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:Hn[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})}}),Gn=x(`$ZodCheckMultipleOf`,(e,t)=>{T.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})}}),Kn=x(`$ZodCheckNumberFormat`,(e,t)=>{T.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=pe[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=hn)}),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})}}),qn=x(`$ZodCheckBigIntFormat`,(e,t)=>{T.init(e,t);let[n,r]=me[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})}}),Jn=x(`$ZodCheckMaxSize`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Bn),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:De(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Yn=x(`$ZodCheckMinSize`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Bn),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:De(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xn=x(`$ZodCheckSizeEquals`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Bn),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:De(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})}}),Zn=x(`$ZodCheckMaxLength`,(e,t)=>{var n;T.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,i=r.length;if((typeof r==`string`&&i>t.maximum?ke(r):i)<=t.maximum)return;let a=Ae(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Qn=x(`$ZodCheckMinLength`,(e,t)=>{var n;T.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,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ke(r):i)>=t.minimum)return;let a=Ae(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=x(`$ZodCheckLengthEquals`,(e,t)=>{var n;T.init(e,t),(n=e._zod.def).when??(n.when=Vn),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?ke(r):i;if(a===t.length)return;let o=Ae(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})}}),er=x(`$ZodCheckStringFormat`,(e,t)=>{var n,r;T.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=()=>{})}),tr=x(`$ZodCheckRegex`,(e,t)=>{er.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})}}),nr=x(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=bn,er.init(e,t)}),rr=x(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=xn,er.init(e,t)}),ir=x(`$ZodCheckIncludes`,(e,t)=>{T.init(e,t);let n=le(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})}}),ar=x(`$ZodCheckStartsWith`,(e,t)=>{T.init(e,t);let n=RegExp(`^${le(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})}}),or=x(`$ZodCheckEndsWith`,(e,t)=>{T.init(e,t);let n=RegExp(`.*${le(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 sr(e,t,n){e.issues.length&&t.issues.push(...y(n,e.issues))}var cr=x(`$ZodCheckProperty`,(e,t)=>{T.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=>sr(n,e,t.property));sr(n,e,t.property)}}),lr=x(`$ZodCheckMimeType`,(e,t)=>{T.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})}}),ur=x(`$ZodCheckOverwrite`,(e,t)=>{T.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),dr=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(`
9
9
  `).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(`
10
- `)}\n};`)(...Object.values(this.closed))}},fr={major:4,minor:5,patch:1},E=x(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fr;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=Se(t),a;for(let o of n){if(o._zod.def.when){if(Ce(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 Ye;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Te(t.issues,n,e),i||=Se(t,n))});else{if(t.issues.length===n)continue;Te(t.issues,n,e),i||=Se(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Se(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ye;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 Ye;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Fe(this,`~standard`,mr(this))},set"~standard"(e){Pe(this,`~standard`,e)}}),pr=e=>e.success?{value:e.data}:{issues:e.error?.issues};function mr(e){return{validate:t=>{try{return pr(mt(e,t))}catch{return gt(e,t).then(pr)}},vendor:`zod`,version:1}}var hr=x(`$ZodString`,(e,t)=>{E.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pn(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}}),D=x(`$ZodStringFormat`,(e,t)=>{er.init(e,t),hr.init(e,t)}),gr=x(`$ZodGUID`,(e,t)=>{t.pattern??=Ft,D.init(e,t)}),_r=x(`$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??=It(e)}else t.pattern??=It();D.init(e,t)}),vr=x(`$ZodEmail`,(e,t)=>{t.pattern??=Bt,D.init(e,t)});function yr(e,t){if(!t.normalize&&t.protocol?.source===rn.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var br=/[\t\n\r]/g;function xr(e){return e.replace(br,``)}function Sr(e,t){return t.lastIndex=0,t.test(e.hostname)}function Cr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var wr=x(`$ZodURL`,(e,t)=>{D.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=yr(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&&!Sr(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&&!Cr(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:xr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Tr=x(`$ZodEmoji`,(e,t)=>{t.pattern??=qt(),D.init(e,t)}),Er=x(`$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?jt:Mt(t.length),D.init(e,t)}),Dr=x(`$ZodCUID`,(e,t)=>{t.pattern??=Et,D.init(e,t)}),Or=x(`$ZodCUID2`,(e,t)=>{t.pattern??=Dt,D.init(e,t)}),kr=x(`$ZodULID`,(e,t)=>{t.pattern??=Ot,D.init(e,t)}),Ar=x(`$ZodXID`,(e,t)=>{t.pattern??=kt,D.init(e,t)}),jr=x(`$ZodKSUID`,(e,t)=>{t.pattern??=At,D.init(e,t)}),Mr=x(`$ZodISODateTime`,(e,t)=>{t.pattern??=fn(t),D.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Nr=x(`$ZodISODate`,(e,t)=>{t.pattern??=ln,D.init(e,t)}),Pr=x(`$ZodISOTime`,(e,t)=>{t.pattern??=dn(t),D.init(e,t)}),Fr=x(`$ZodISODuration`,(e,t)=>{t.pattern??=Nt,D.init(e,t)}),Ir=x(`$ZodIPv4`,(e,t)=>{t.pattern??=Jt,D.init(e,t),e._zod.bag.format=`ipv4`}),Lr=/^[0-9a-fA-F:.]+$/;function Rr(e){if(!Lr.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var zr=x(`$ZodIPv6`,(e,t)=>{t.pattern??=Yt,D.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Rr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Br=x(`$ZodMAC`,(e,t)=>{t.pattern??=Xt(t.delimiter),D.init(e,t),e._zod.bag.format=`mac`}),Vr=x(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Zt,D.init(e,t)});function Hr(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:Rr(n)}var Ur=x(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Qt,D.init(e,t),e._zod.check=n=>{Hr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Wr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Gr=x(`$ZodBase64`,(e,t)=>{t.pattern??=$t,D.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Wr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Kr(e){if(!en.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Wr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var qr=x(`$ZodBase64URL`,(e,t)=>{t.pattern??=en,D.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Kr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Jr=x(`$ZodE164`,(e,t)=>{t.pattern??=an,D.init(e,t)}),Yr=/[- ]/g;function Xr(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 Zr(e){return on.test(e)?Xr(e.replace(Yr,``)):!1}var Qr=x(`$ZodCreditCard`,(e,t)=>{t.pattern??=on,D.init(e,t),e._zod.check=n=>{Zr(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}});function $r(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 ei=x(`$ZodJWT`,(e,t)=>{D.init(e,t),e._zod.check=n=>{$r(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ti=x(`$ZodCustomStringFormat`,(e,t)=>{D.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})}}),ni=x(`$ZodNumber`,(e,t)=>{E.init(e,t),e._zod.pattern=e._zod.bag.pattern??gn,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}}),ri=x(`$ZodNumberFormat`,(e,t)=>{Kn.init(e,t),ni.init(e,t)}),ii=x(`$ZodBoolean`,(e,t)=>{E.init(e,t),e._zod.pattern=_n,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}}),ai=x(`$ZodBigInt`,(e,t)=>{E.init(e,t),e._zod.pattern=mn,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}}),oi=x(`$ZodBigIntFormat`,(e,t)=>{qn.init(e,t),ai.init(e,t)}),si=x(`$ZodSymbol`,(e,t)=>{E.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}}),ci=x(`$ZodUndefined`,(e,t)=>{E.init(e,t),e._zod.pattern=yn,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}}),li=x(`$ZodNull`,(e,t)=>{E.init(e,t),e._zod.pattern=vn,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}}),ui=x(`$ZodAny`,(e,t)=>{E.init(e,t),e._zod.parse=e=>e}),di=x(`$ZodUnknown`,(e,t)=>{E.init(e,t),e._zod.parse=e=>e}),fi=x(`$ZodNever`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),pi=x(`$ZodVoid`,(e,t)=>{E.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}}),mi=x(`$ZodDate`,(e,t)=>{E.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 hi(e,t,n){e.issues.length&&t.issues.push(...y(n,e.issues)),t.value[n]=e.value}var gi=x(`$ZodArray`,(e,t)=>{E.init(e,t);let n=S.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=>hi(t,r,e))):hi(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function _i(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(...y(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 vi=[];function yi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:vi,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=fe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function bi(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=>_i(e,n,i,t,u,d))):_i(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 xi=new WeakMap,Si=x(`$ZodObject`,(e,t)=>{if(E.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;xi.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),xi.set(t,n),n}})}let n=u(()=>yi(t));b(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)||g(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=re,i=t.catchall,a,o=S.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=>_i(n,t,e,c,r,i))):_i(a,t,e,c,r,i)}return i?bi(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Ci=x(`$ZodObjectJIT`,(e,t)=>{Si.init(e,t);let n=e._zod.parse,r=u(()=>yi(t)),i=S.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new dr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
10
+ `)}\n};`)(...Object.values(this.closed))}},fr={major:4,minor:5,patch:4},E=x(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fr;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=Se(t),a;for(let o of n){if(o._zod.def.when){if(Ce(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 Ye;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Te(t.issues,n,e),i||=Se(t,n))});else{if(t.issues.length===n)continue;Te(t.issues,n,e),i||=Se(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Se(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ye;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 Ye;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Fe(this,`~standard`,mr(this))},set"~standard"(e){Pe(this,`~standard`,e)}}),pr=e=>e.success?{value:e.data}:{issues:e.error?.issues};function mr(e){return{validate:t=>{try{return pr(mt(e,t))}catch{return gt(e,t).then(pr)}},vendor:`zod`,version:1}}var hr=x(`$ZodString`,(e,t)=>{E.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pn(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}}),D=x(`$ZodStringFormat`,(e,t)=>{er.init(e,t),hr.init(e,t)}),gr=x(`$ZodGUID`,(e,t)=>{t.pattern??=Ft,D.init(e,t)}),_r=x(`$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??=It(e)}else t.pattern??=It();D.init(e,t)}),vr=x(`$ZodEmail`,(e,t)=>{t.pattern??=Bt,D.init(e,t)});function yr(e,t){if(!t.normalize&&t.protocol?.source===rn.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var br=/[\t\n\r]/g;function xr(e){return e.replace(br,``)}function Sr(e,t){return t.lastIndex=0,t.test(e.hostname)}function Cr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var wr=x(`$ZodURL`,(e,t)=>{D.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=yr(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&&!Sr(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&&!Cr(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:xr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Tr=x(`$ZodEmoji`,(e,t)=>{t.pattern??=qt(),D.init(e,t)}),Er=x(`$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?jt:Mt(t.length),D.init(e,t)}),Dr=x(`$ZodCUID`,(e,t)=>{t.pattern??=Et,D.init(e,t)}),Or=x(`$ZodCUID2`,(e,t)=>{t.pattern??=Dt,D.init(e,t)}),kr=x(`$ZodULID`,(e,t)=>{t.pattern??=Ot,D.init(e,t)}),Ar=x(`$ZodXID`,(e,t)=>{t.pattern??=kt,D.init(e,t)}),jr=x(`$ZodKSUID`,(e,t)=>{t.pattern??=At,D.init(e,t)}),Mr=x(`$ZodISODateTime`,(e,t)=>{t.pattern??=fn(t),D.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Nr=x(`$ZodISODate`,(e,t)=>{t.pattern??=ln,D.init(e,t)}),Pr=x(`$ZodISOTime`,(e,t)=>{t.pattern??=dn(t),D.init(e,t)}),Fr=x(`$ZodISODuration`,(e,t)=>{t.pattern??=Nt,D.init(e,t)}),Ir=x(`$ZodIPv4`,(e,t)=>{t.pattern??=Jt,D.init(e,t),e._zod.bag.format=`ipv4`}),Lr=/^[0-9a-fA-F:.]+$/;function Rr(e){if(!Lr.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var zr=x(`$ZodIPv6`,(e,t)=>{t.pattern??=Yt,D.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Rr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Br=x(`$ZodMAC`,(e,t)=>{t.pattern??=Xt(t.delimiter),D.init(e,t),e._zod.bag.format=`mac`}),Vr=x(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Zt,D.init(e,t)});function Hr(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:Rr(n)}var Ur=x(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Qt,D.init(e,t),e._zod.check=n=>{Hr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Wr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Gr=x(`$ZodBase64`,(e,t)=>{t.pattern??=$t,D.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Wr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Kr(e){if(!en.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Wr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var qr=x(`$ZodBase64URL`,(e,t)=>{t.pattern??=en,D.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Kr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Jr=x(`$ZodE164`,(e,t)=>{t.pattern??=an,D.init(e,t)}),Yr=/[- ]/g;function Xr(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 Zr(e){return on.test(e)?Xr(e.replace(Yr,``)):!1}var Qr=x(`$ZodCreditCard`,(e,t)=>{t.pattern??=on,D.init(e,t),e._zod.check=n=>{Zr(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}});function $r(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 ei=x(`$ZodJWT`,(e,t)=>{D.init(e,t),e._zod.check=n=>{$r(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ti=x(`$ZodCustomStringFormat`,(e,t)=>{D.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})}}),ni=x(`$ZodNumber`,(e,t)=>{E.init(e,t),e._zod.pattern=e._zod.bag.pattern??gn,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}}),ri=x(`$ZodNumberFormat`,(e,t)=>{Kn.init(e,t),ni.init(e,t)}),ii=x(`$ZodBoolean`,(e,t)=>{E.init(e,t),e._zod.pattern=_n,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}}),ai=x(`$ZodBigInt`,(e,t)=>{E.init(e,t),e._zod.pattern=mn,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}}),oi=x(`$ZodBigIntFormat`,(e,t)=>{qn.init(e,t),ai.init(e,t)}),si=x(`$ZodSymbol`,(e,t)=>{E.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}}),ci=x(`$ZodUndefined`,(e,t)=>{E.init(e,t),e._zod.pattern=yn,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}}),li=x(`$ZodNull`,(e,t)=>{E.init(e,t),e._zod.pattern=vn,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}}),ui=x(`$ZodAny`,(e,t)=>{E.init(e,t),e._zod.parse=e=>e}),di=x(`$ZodUnknown`,(e,t)=>{E.init(e,t),e._zod.parse=e=>e}),fi=x(`$ZodNever`,(e,t)=>{E.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),pi=x(`$ZodVoid`,(e,t)=>{E.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}}),mi=x(`$ZodDate`,(e,t)=>{E.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 hi(e,t,n){e.issues.length&&t.issues.push(...y(n,e.issues)),t.value[n]=e.value}var gi=x(`$ZodArray`,(e,t)=>{E.init(e,t);let n=S.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=>hi(t,r,e))):hi(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function _i(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(...y(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 vi=[];function yi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:vi,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=fe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function bi(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=>_i(e,n,i,t,u,d))):_i(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 xi=new WeakMap,Si=x(`$ZodObject`,(e,t)=>{if(E.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;xi.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),xi.set(t,n),n}})}let n=u(()=>yi(t));b(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)||g(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=re,i=t.catchall,a,o=S.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=>_i(n,t,e,c,r,i))):_i(a,t,e,c,r,i)}return i?bi(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Ci=x(`$ZodObjectJIT`,(e,t)=>{Si.init(e,t);let n=e._zod.parse,r=u(()=>yi(t)),i=S.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new dr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
11
11
  for (let i = 0; i < ${e}.issues.length; i++) {
12
12
  const iss = ${e}.issues[i];
13
13
  iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
@@ -52,9 +52,9 @@
52
52
  newResult[${r}] = ${n}.value;
53
53
  }
54
54
 
55
- `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=re,c=!S.jitless,l=c&&ie.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?bi([],p,i,u,f,e):i):n(i,u):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function wi(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=>!Se(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=>Ee(e,r,C())))}),t)}var Ti=x(`$ZodUnion`,(e,t)=>{E.init(e,t),b(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),b(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),b(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)))}),b(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=>wi(t,r,e,i)):wi(o,r,e,i)}});function Ei(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=>Ee(e,r,C())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}var Di=x(`$ZodXor`,(e,t)=>{Ti.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=>Ei(t,r,e,i)):Ei(o,r,e,i)}}),Oi=x(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ti.init(e,t);let n=e._zod.parse;b(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)||g(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=xi.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(!re(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)}}),ki=x(`$ZodIntersection`,(e,t)=>{E.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])=>ji(e,t,n)):ji(e,i,a)}});function Ai(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ae(e)&&ae(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=Ai(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=Ai(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 ji(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=Ai(t.value,n.value);if(!c.valid){if(Se(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Mi=x(`$ZodTuple`,(e,t)=>{E.init(e,t);let n=t.items,r=S.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=Ni(n,`optin`),l=Ni(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=>Pi(t,i,e))):Pi(r,i,e)}}return s.length?Promise.all(s).then(()=>Fi(u,i,n,o,l)):Fi(u,i,n,o,l)}});function Ni(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 Pi(e,t,n){e.issues.length&&t.issues.push(...y(n,e.issues)),t.value[n]=e.value}function Fi(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(...y(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 Ii=x(`$ZodRecord`,(e,t)=>{E.init(e,t);let n=S.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!ae(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=>Ee(e,i,C())),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(...y(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...y(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`&&gn.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=>Ee(e,i,C())),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(...y(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...y(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}}),Li=x(`$ZodMap`,(e,t)=>{E.init(e,t);let n=S.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])=>{Ri(t,o,r,n,a,e,i)})):Ri(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Ri(e,t,n,r,i,a,o){e.issues.length&&(se.has(typeof r)?n.issues.push(...y(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>Ee(e,o,C()))})),t.issues.length&&(se.has(typeof r)?n.issues.push(...y(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>Ee(e,o,C()))})),n.value.set(e.value,t.value)}var zi=x(`$ZodSet`,(e,t)=>{E.init(e,t);let n=S.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=>Bi(e,r))):Bi(n,r)}return o.length?Promise.all(o).then(()=>r):r}});function Bi(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Vi=x(`$ZodEnum`,(e,t)=>{E.init(e,t);let n=s(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>se.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>le(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}}),Hi=x(`$ZodLiteral`,(e,t)=>{E.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`?le(e):e?le(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}}),Ui=x(`$ZodFile`,(e,t)=>{E.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}}),Wi=x(`$ZodTransform`,(e,t)=>{E.init(e,t),e._zod.optin=`optional`,S.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Xe(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 Ye;return n.value=i,n}});function Gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ki=x(`$ZodOptional`,(e,t)=>{E.init(e,t),b(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,b(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),b(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=>Gi(e,t)):Gi(e,r)}return t.innerType._zod.run(e,n)}}),qi=x(`$ZodExactOptional`,(e,t)=>{Ki.init(e,t),b(e,`values`,e=>e.def.innerType._zod.values),b(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ji=x(`$ZodNullable`,(e,t)=>{E.init(e,t),b(e,`optin`,e=>e.def.innerType._zod.optin),b(e,`optout`,e=>e.def.innerType._zod.optout),b(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)}|null)$`):void 0}),b(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)}),Yi=x(`$ZodDefault`,(e,t)=>{E.init(e,t),e._zod.optin=`defaulted`,b(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=>Xi(e,t)):Xi(r,t)}});function Xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Zi=x(`$ZodPrefault`,(e,t)=>{E.init(e,t),e._zod.optin=`defaulted`,b(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))}),Qi=x(`$ZodNonOptional`,(e,t)=>{E.init(e,t),b(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=>$i(t,e)):$i(i,e)}});function $i(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 ea=x(`$ZodSuccess`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Xe(`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 ta(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ee(e,r,C()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var na=x(`$ZodCatch`,(e,t)=>{E.init(e,t),b(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),b(e,`optout`,e=>e.def.innerType._zod.optout),b(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=>ta(e,r,t,n)):ta(e,r,t,n)}}),ra=x(`$ZodNaN`,(e,t)=>{E.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)}),ia=x(`$ZodPipe`,(e,t)=>{E.init(e,t),b(e,`values`,e=>e.def.in._zod.values),b(e,`optin`,e=>e.def.in._zod.optin),b(e,`optout`,e=>e.def.out._zod.optout),b(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=>aa(e,t.in,n)):aa(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>aa(e,t.out,n)):aa(r,t.out,n)}});function aa(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 oa=x(`$ZodCodec`,(e,t)=>{E.init(e,t),b(e,`values`,e=>e.def.in._zod.values),b(e,`optin`,e=>e.def.in._zod.optin),b(e,`optout`,e=>e.def.out._zod.optout),b(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=>sa(e,t,n)):sa(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>sa(e,t,n)):sa(r,t,n)}}});function sa(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=>ca(e,r,t.out,n)):ca(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>ca(e,r,t.in,n)):ca(e,r,t.in,n)}}function ca(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var la=x(`$ZodPreprocess`,(e,t)=>{ia.init(e,t)}),ua=x(`$ZodReadonly`,(e,t)=>{E.init(e,t),b(e,`propValues`,e=>e.def.innerType._zod.propValues),b(e,`values`,e=>e.def.innerType._zod.values),b(e,`optin`,e=>e.def.innerType?._zod?.optin),b(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(da):da(r)}});function da(e){return e.memo||(e.value=Object.freeze(e.value)),e}var fa=x(`$ZodTemplateLiteral`,(e,t)=>{E.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||ce.has(typeof e))n.push(le(`${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)}),pa=x(`$ZodFunction`,(e,t)=>(E.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?ut(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?ut(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 ft(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await ft(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 Mi({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)),ma=x(`$ZodPromise`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),ha=x(`$ZodLazy`,(e,t)=>{E.init(e,t),h(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),b(e,`pattern`,e=>e.innerType?._zod?.pattern),b(e,`propValues`,e=>e.innerType?._zod?.propValues),b(e,`optin`,e=>e.innerType?._zod?.optin??void 0),b(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ga=x(`$ZodCustom`,(e,t)=>{T.init(e,t),E.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=>_a(t,n,r,e));_a(i,n,r,e)}});function _a(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(Me(e))}}var va=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},ya=`~memo`,ba=[];function xa(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Sa=new WeakMap;function Ca(e,t){let n=Sa.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&&Ca(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),Sa.set(e,r),r}function wa(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}var Ta,Ea=[],Da={alloc(e,t,n){let r=Ta;if(!r)return n;Ta=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ea.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`&&ka(n,e.value))throw new va;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=Ca(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[ya];l||(l={buckets:new Map,backEdges:void 0},s[ya]=l);let u;r===s?u=i:(u=wa(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(...xa(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;Ta=u;let f=Ea.length,p=t(o,s);Ta=void 0;let m=Ea.length>f?Ea.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?xa(e.issues):ba),e)):(m&&(m.issues=p.issues.length?xa(p.issues):ba),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}};function Oa(){return Da}function ka(e,t){let n=e[ya]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var Aa=()=>{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(je(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${de(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 ja(){return{localeError:Aa()}}var Ma,Na=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 Pa(){return new Na}(Ma=globalThis).__zod_globalRegistry??(Ma.__zod_globalRegistry=Pa());var Fa=globalThis.__zod_globalRegistry;function Ia(e,t){return new e({type:`string`,...v(t)})}function La(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...v(t)})}function Ra(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...v(t)})}function za(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...v(t)})}function Ba(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...v(t)})}function Va(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...v(t)})}function Ha(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...v(t)})}function Ua(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...v(t)})}function Wa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...v(t)})}function Ga(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...v(t)})}function Ka(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...v(t)})}function qa(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...v(t)})}function Ja(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...v(t)})}function Ya(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...v(t)})}function Xa(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...v(t)})}function Za(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...v(t)})}function Qa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...v(t)})}function $a(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...v(t)})}function eo(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...v(t)})}function to(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...v(t)})}function no(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...v(t)})}function ro(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...v(t)})}function io(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...v(t)})}function ao(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...v(t)})}function oo(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...v(t)})}function so(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...v(t)})}function co(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...v(t)})}function lo(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...v(t)})}function uo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...v(t)})}function fo(e,t){return new e({type:`number`,checks:[],...v(t)})}function po(e,t){return new e({type:`number`,coerce:!0,checks:[],...v(t)})}function mo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...v(t)})}function ho(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...v(t)})}function go(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...v(t)})}function _o(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...v(t)})}function vo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...v(t)})}function yo(e,t){return new e({type:`boolean`,...v(t)})}function bo(e,t){return new e({type:`bigint`,...v(t)})}function xo(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...v(t)})}function So(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...v(t)})}function Co(e,t){return new e({type:`symbol`,...v(t)})}function wo(e,t){return new e({type:`undefined`,...v(t)})}function To(e,t){return new e({type:`null`,...v(t)})}function Eo(e){return new e({type:`any`})}function Do(e){return new e({type:`unknown`})}function Oo(e,t){return new e({type:`never`,...v(t)})}function ko(e,t){return new e({type:`void`,...v(t)})}function Ao(e,t){return new e({type:`date`,...v(t)})}function jo(e,t){return new e({type:`nan`,...v(t)})}function Mo(e,t){return new Un({check:`less_than`,...v(t),value:e,inclusive:!1})}function No(e,t){return new Un({check:`less_than`,...v(t),value:e,inclusive:!0})}function Po(e,t){return new Wn({check:`greater_than`,...v(t),value:e,inclusive:!1})}function Fo(e,t){return new Wn({check:`greater_than`,...v(t),value:e,inclusive:!0})}function Io(e){return Po(0,e)}function Lo(e){return Mo(0,e)}function Ro(e){return No(0,e)}function zo(e){return Fo(0,e)}function Bo(e,t){return new Gn({check:`multiple_of`,...v(t),value:e})}function Vo(e,t){return new Jn({check:`max_size`,...v(t),maximum:e})}function Ho(e,t){return new Yn({check:`min_size`,...v(t),minimum:e})}function Uo(e,t){return new Xn({check:`size_equals`,...v(t),size:e})}function Wo(e,t){return new Zn({check:`max_length`,...v(t),maximum:e})}function Go(e,t){return new Qn({check:`min_length`,...v(t),minimum:e})}function Ko(e,t){return new $n({check:`length_equals`,...v(t),length:e})}function qo(e,t){return new tr({check:`string_format`,format:`regex`,...v(t),pattern:e})}function Jo(e){return new nr({check:`string_format`,format:`lowercase`,...v(e)})}function Yo(e){return new rr({check:`string_format`,format:`uppercase`,...v(e)})}function Xo(e,t){return new ir({check:`string_format`,format:`includes`,...v(t),includes:e})}function Zo(e,t){return new ar({check:`string_format`,format:`starts_with`,...v(t),prefix:e})}function Qo(e,t){return new or({check:`string_format`,format:`ends_with`,...v(t),suffix:e})}function $o(e,t,n){return new cr({check:`property`,property:e,schema:t,...v(n)})}function es(e){return Object.entries(e).map(([e,t])=>new cr({check:`property`,property:e,schema:t}))}function ts(e,t){return new lr({check:`mime_type`,mime:e,...v(t)})}function ns(e){return new ur({check:`overwrite`,tx:e})}function rs(e){return ns(t=>t.normalize(e))}function is(){return ns(e=>e.trim())}function as(){return ns(e=>e.toLowerCase())}function os(){return ns(e=>e.toUpperCase())}function ss(){return ns(e=>te(e))}function cs(e,t,n){return new e({type:`array`,element:t,...v(n)})}function ls(e,t){return new e({type:`file`,...v(t)})}function us(e,t,n){let r=v(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ds(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...v(n)})}function fs(e,t){let n=ps(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Me(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(Me(r))}},e(t.value,t)),t);return n}function ps(e,t){let n=new T({check:`custom`,...v(t)});return n._zod.check=e,n}function ms(e){let t=new T({check:`describe`});return t._zod.onattach=[t=>{let n=Fa.get(t)??{};Fa.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function hs(e){let t=new T({check:`meta`});return t._zod.onattach=[t=>{let n=Fa.get(t)??{};Fa.add(t,{...n,...e})}],t._zod.check=()=>{},t}function gs(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??oa,c=e.Boolean??ii,l=new s({type:`pipe`,in:new(e.String??hr)({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 _s(e,t,n,r={}){let i=v(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 vs(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&g(e,t,n[t]);return e}function ys(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??Fa,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 O(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 k(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,k(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&vs(o.schema,c),t.io===`input`&&ks(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 bs(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function xs(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}/${bs(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+bs(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>
55
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=re,c=!S.jitless,l=c&&ie.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?bi([],p,i,u,f,e):i):n(i,u):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function wi(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=>!Se(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=>Ee(e,r,C())))}),t)}var Ti=x(`$ZodUnion`,(e,t)=>{E.init(e,t),b(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),b(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),b(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)))}),b(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=>wi(t,r,e,i)):wi(o,r,e,i)}});function Ei(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=>Ee(e,r,C())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}var Di=x(`$ZodXor`,(e,t)=>{Ti.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=>Ei(t,r,e,i)):Ei(o,r,e,i)}}),Oi=x(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ti.init(e,t);let n=e._zod.parse;b(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)||g(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=xi.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(!re(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)}}),ki=x(`$ZodIntersection`,(e,t)=>{E.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])=>ji(e,t,n)):ji(e,i,a)}});function Ai(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ae(e)&&ae(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=Ai(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=Ai(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 ji(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=Ai(t.value,n.value);if(!c.valid){if(Se(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Mi=x(`$ZodTuple`,(e,t)=>{E.init(e,t);let n=t.items,r=S.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=Ni(n,`optin`),l=Ni(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=>Pi(t,i,e))):Pi(r,i,e)}}return s.length?Promise.all(s).then(()=>Fi(u,i,n,o,l)):Fi(u,i,n,o,l)}});function Ni(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 Pi(e,t,n){e.issues.length&&t.issues.push(...y(n,e.issues)),t.value[n]=e.value}function Fi(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(...y(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 Ii=x(`$ZodRecord`,(e,t)=>{E.init(e,t);let n=S.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!ae(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=>Ee(e,i,C())),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(...y(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...y(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`&&gn.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=>Ee(e,i,C())),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(...y(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...y(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}}),Li=x(`$ZodMap`,(e,t)=>{E.init(e,t);let n=S.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])=>{Ri(t,o,r,n,a,e,i)})):Ri(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function Ri(e,t,n,r,i,a,o){e.issues.length&&(se.has(typeof r)?n.issues.push(...y(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>Ee(e,o,C()))})),t.issues.length&&(se.has(typeof r)?n.issues.push(...y(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>Ee(e,o,C()))})),n.value.set(e.value,t.value)}var zi=x(`$ZodSet`,(e,t)=>{E.init(e,t);let n=S.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=>Bi(e,r))):Bi(n,r)}return o.length?Promise.all(o).then(()=>r):r}});function Bi(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Vi=x(`$ZodEnum`,(e,t)=>{E.init(e,t);let n=s(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>se.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>le(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}}),Hi=x(`$ZodLiteral`,(e,t)=>{E.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`?le(e):e?le(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}}),Ui=x(`$ZodFile`,(e,t)=>{E.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}}),Wi=x(`$ZodTransform`,(e,t)=>{E.init(e,t),e._zod.optin=`optional`,S.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Xe(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 Ye;return n.value=i,n}});function Gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ki=x(`$ZodOptional`,(e,t)=>{E.init(e,t),b(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,b(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),b(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=>Gi(e,t)):Gi(e,r)}return t.innerType._zod.run(e,n)}}),qi=x(`$ZodExactOptional`,(e,t)=>{Ki.init(e,t),b(e,`values`,e=>e.def.innerType._zod.values),b(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ji=x(`$ZodNullable`,(e,t)=>{E.init(e,t),b(e,`optin`,e=>e.def.innerType._zod.optin),b(e,`optout`,e=>e.def.innerType._zod.optout),b(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${f(t.source)}|null)$`):void 0}),b(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)}),Yi=x(`$ZodDefault`,(e,t)=>{E.init(e,t),e._zod.optin=`defaulted`,b(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=>Xi(e,t)):Xi(r,t)}});function Xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Zi=x(`$ZodPrefault`,(e,t)=>{E.init(e,t),e._zod.optin=`defaulted`,b(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))}),Qi=x(`$ZodNonOptional`,(e,t)=>{E.init(e,t),b(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=>$i(t,e)):$i(i,e)}});function $i(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 ea=x(`$ZodSuccess`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Xe(`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 ta(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ee(e,r,C()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var na=x(`$ZodCatch`,(e,t)=>{E.init(e,t),b(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),b(e,`optout`,e=>e.def.innerType._zod.optout),b(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=>ta(e,r,t,n)):ta(e,r,t,n)}}),ra=x(`$ZodNaN`,(e,t)=>{E.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)}),ia=x(`$ZodPipe`,(e,t)=>{E.init(e,t),b(e,`values`,e=>e.def.in._zod.values),b(e,`optin`,e=>e.def.in._zod.optin),b(e,`optout`,e=>e.def.out._zod.optout),b(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=>aa(e,t.in,n)):aa(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>aa(e,t.out,n)):aa(r,t.out,n)}});function aa(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 oa=x(`$ZodCodec`,(e,t)=>{E.init(e,t),b(e,`values`,e=>e.def.in._zod.values),b(e,`optin`,e=>e.def.in._zod.optin),b(e,`optout`,e=>e.def.out._zod.optout),b(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=>sa(e,t,n)):sa(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>sa(e,t,n)):sa(r,t,n)}}});function sa(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=>ca(e,r,t.out,n)):ca(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>ca(e,r,t.in,n)):ca(e,r,t.in,n)}}function ca(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var la=x(`$ZodPreprocess`,(e,t)=>{ia.init(e,t)}),ua=x(`$ZodReadonly`,(e,t)=>{E.init(e,t),b(e,`propValues`,e=>e.def.innerType._zod.propValues),b(e,`values`,e=>e.def.innerType._zod.values),b(e,`optin`,e=>e.def.innerType?._zod?.optin),b(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(da):da(r)}});function da(e){return e.memo||(e.value=Object.freeze(e.value)),e}var fa=x(`$ZodTemplateLiteral`,(e,t)=>{E.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||ce.has(typeof e))n.push(le(`${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)}),pa=x(`$ZodFunction`,(e,t)=>(E.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?ut(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?ut(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 ft(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await ft(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 Mi({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)),ma=x(`$ZodPromise`,(e,t)=>{E.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),ha=x(`$ZodLazy`,(e,t)=>{E.init(e,t),h(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),b(e,`pattern`,e=>e.innerType?._zod?.pattern),b(e,`propValues`,e=>e.innerType?._zod?.propValues),b(e,`optin`,e=>e.innerType?._zod?.optin??void 0),b(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ga=x(`$ZodCustom`,(e,t)=>{T.init(e,t),E.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=>_a(t,n,r,e));_a(i,n,r,e)}});function _a(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(Me(e))}}var va=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},ya=`~memo`,ba=[];function xa(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Sa=new WeakMap;function Ca(e,t){let n=Sa.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&&Ca(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),Sa.set(e,r),r}function wa(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}var Ta,Ea=[],Da={alloc(e,t,n){let r=Ta;if(!r)return n;Ta=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ea.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`&&ka(n,e.value))throw new va;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=Ca(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[ya];l||(l={buckets:new Map,backEdges:void 0},s[ya]=l);let u;r===s?u=i:(u=wa(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(...xa(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;Ta=u;let f=Ea.length,p=t(o,s);Ta=void 0;let m=Ea.length>f?Ea.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?xa(e.issues):ba),e)):(m&&(m.issues=p.issues.length?xa(p.issues):ba),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}};function Oa(){return Da}function ka(e,t){let n=e[ya]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var Aa=()=>{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(je(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${de(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 ja(){return{localeError:Aa()}}var Ma,Na=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 Pa(){return new Na}(Ma=globalThis).__zod_globalRegistry??(Ma.__zod_globalRegistry=Pa());var Fa=globalThis.__zod_globalRegistry;function Ia(e,t){return new e({type:`string`,...v(t)})}function La(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...v(t)})}function Ra(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...v(t)})}function za(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...v(t)})}function Ba(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...v(t)})}function Va(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...v(t)})}function Ha(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...v(t)})}function Ua(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...v(t)})}function Wa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...v(t)})}function Ga(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...v(t)})}function Ka(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...v(t)})}function qa(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...v(t)})}function Ja(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...v(t)})}function Ya(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...v(t)})}function Xa(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...v(t)})}function Za(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...v(t)})}function Qa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...v(t)})}function $a(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...v(t)})}function eo(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...v(t)})}function to(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...v(t)})}function no(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...v(t)})}function ro(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...v(t)})}function io(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...v(t)})}function ao(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...v(t)})}function oo(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...v(t)})}function so(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...v(t)})}function co(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...v(t)})}function lo(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...v(t)})}function uo(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...v(t)})}function fo(e,t){return new e({type:`number`,checks:[],...v(t)})}function po(e,t){return new e({type:`number`,coerce:!0,checks:[],...v(t)})}function mo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...v(t)})}function ho(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...v(t)})}function go(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...v(t)})}function _o(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...v(t)})}function vo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...v(t)})}function yo(e,t){return new e({type:`boolean`,...v(t)})}function bo(e,t){return new e({type:`bigint`,...v(t)})}function xo(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...v(t)})}function So(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...v(t)})}function Co(e,t){return new e({type:`symbol`,...v(t)})}function wo(e,t){return new e({type:`undefined`,...v(t)})}function To(e,t){return new e({type:`null`,...v(t)})}function Eo(e){return new e({type:`any`})}function Do(e){return new e({type:`unknown`})}function Oo(e,t){return new e({type:`never`,...v(t)})}function ko(e,t){return new e({type:`void`,...v(t)})}function Ao(e,t){return new e({type:`date`,...v(t)})}function jo(e,t){return new e({type:`nan`,...v(t)})}function Mo(e,t){return new Un({check:`less_than`,...v(t),value:e,inclusive:!1})}function No(e,t){return new Un({check:`less_than`,...v(t),value:e,inclusive:!0})}function Po(e,t){return new Wn({check:`greater_than`,...v(t),value:e,inclusive:!1})}function Fo(e,t){return new Wn({check:`greater_than`,...v(t),value:e,inclusive:!0})}function Io(e){return Po(0,e)}function Lo(e){return Mo(0,e)}function Ro(e){return No(0,e)}function zo(e){return Fo(0,e)}function Bo(e,t){return new Gn({check:`multiple_of`,...v(t),value:e})}function Vo(e,t){return new Jn({check:`max_size`,...v(t),maximum:e})}function Ho(e,t){return new Yn({check:`min_size`,...v(t),minimum:e})}function Uo(e,t){return new Xn({check:`size_equals`,...v(t),size:e})}function Wo(e,t){return new Zn({check:`max_length`,...v(t),maximum:e})}function Go(e,t){return new Qn({check:`min_length`,...v(t),minimum:e})}function Ko(e,t){return new $n({check:`length_equals`,...v(t),length:e})}function qo(e,t){return new tr({check:`string_format`,format:`regex`,...v(t),pattern:e})}function Jo(e){return new nr({check:`string_format`,format:`lowercase`,...v(e)})}function Yo(e){return new rr({check:`string_format`,format:`uppercase`,...v(e)})}function Xo(e,t){return new ir({check:`string_format`,format:`includes`,...v(t),includes:e})}function Zo(e,t){return new ar({check:`string_format`,format:`starts_with`,...v(t),prefix:e})}function Qo(e,t){return new or({check:`string_format`,format:`ends_with`,...v(t),suffix:e})}function $o(e,t,n){return new cr({check:`property`,property:e,schema:t,...v(n)})}function es(e){return Object.entries(e).map(([e,t])=>new cr({check:`property`,property:e,schema:t}))}function ts(e,t){return new lr({check:`mime_type`,mime:e,...v(t)})}function ns(e){return new ur({check:`overwrite`,tx:e})}function rs(e){return ns(t=>t.normalize(e))}function is(){return ns(e=>e.trim())}function as(){return ns(e=>e.toLowerCase())}function os(){return ns(e=>e.toUpperCase())}function ss(){return ns(e=>te(e))}function cs(e,t,n){return new e({type:`array`,element:t,...v(n)})}function ls(e,t){return new e({type:`file`,...v(t)})}function us(e,t,n){let r=v(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ds(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...v(n)})}function fs(e,t){let n=ps(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Me(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(Me(r))}},e(t.value,t)),t);return n}function ps(e,t){let n=new T({check:`custom`,...v(t)});return n._zod.check=e,n}function ms(e){let t=new T({check:`describe`});return t._zod.onattach=[t=>{let n=Fa.get(t)??{};Fa.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function hs(e){let t=new T({check:`meta`});return t._zod.onattach=[t=>{let n=Fa.get(t)??{};Fa.add(t,{...n,...e})}],t._zod.check=()=>{},t}function gs(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??oa,c=e.Boolean??ii,l=new s({type:`pipe`,in:new(e.String??hr)({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 _s(e,t,n,r={}){let i=v(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 vs(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&g(e,t,n[t]);return e}function ys(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??Fa,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:[],deferred:[],external:e?.external??void 0}}function O(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 k(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,k(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&vs(o.schema,c),t.io===`input`&&ks(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 bs(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function xs(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}/${bs(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+bs(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
56
 
57
- 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 Ss(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;Ss(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 Cs=new Set([`type`,`properties`,`required`,`additionalProperties`]),ws=[`oneOf`,`anyOf`];function Ts(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Es(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Cs.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]??Ts(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}g(n,r,e.length===1?e[0]:Es(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=Ts(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 Ds(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Cs)if(t in e)return;let n=t.filter(e=>ws.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Es(t);else{let e=n[0],i=ws.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=>Es([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,vs(e,r))}function Os(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)):vs(i,s),vs(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())Ss(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)??[])Ds(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)}vs(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,g(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:js(t,`input`,e.processors),output:js(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ks(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 ks(r.element,n);if(r.type===`set`)return ks(r.valueType,n);if(r.type===`lazy`)return ks(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 ks(r.innerType,n);if(r.type===`intersection`)return ks(r.left,n)||ks(r.right,n);if(r.type===`record`||r.type===`map`)return ks(r.keyType,n)||ks(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ks(r.in,n)||ks(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ks(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ks(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ks(e,n))return!0;return!!(r.rest&&ks(r.rest,n))}return!1}var As=(e,t={})=>n=>{let r=ys({...n,processors:t});return k(e,r),xs(r,e),Os(r,e)},js=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ys({...i??{},target:a,io:t,processors:n});return k(e,o),xs(o,e),Os(o,e)},Ms={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ns=(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=Ms[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}))])}},Ps=(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):O(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},Fs=(e,t,n,r)=>{n.type=`boolean`},Is=(e,t,n,r)=>{O(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ls=(e,t,n,r)=>{O(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Rs=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},zs=(e,t,n,r)=>{O(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Bs=(e,t,n,r)=>{O(e,t,n,r,`Void cannot be represented in JSON Schema`)},Vs=(e,t,n,r)=>{n.not={}},Hs=(e,t,n,r)=>{},Us=(e,t,n,r)=>{},Ws=(e,t,n,r)=>{O(e,t,n,r,`Date cannot be represented in JSON Schema`)},Gs=(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},Ks=(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(O(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(O(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}},qs=(e,t,n,r)=>{O(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Js=(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},Ys=(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)},Xs=(e,t,n,r)=>{n.type=`boolean`},Zs=(e,t,n,r)=>{O(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Qs=(e,t,n,r)=>{O(e,t,n,r,`Function types cannot be represented in JSON Schema`)},$s=(e,t,n,r)=>{O(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ec=(e,t,n,r)=>{O(e,t,n,r,`Map cannot be represented in JSON Schema`)},tc=(e,t,n,r)=>{O(e,t,n,r,`Set cannot be represented in JSON Schema`)},nc=(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=k(a.element,t,{...r,path:[...r.path,`items`]})};function rc(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?rc(t.out):t.type===`catch`?rc(t.innerType):e._zod.optin}var ic=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&O(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)g(i.properties,e,k(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`?rc(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=k(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ac=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>k(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},oc=(e,t,n,r)=>{let i=e._zod.def,a=k(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=k(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)},sc=(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)=>k(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?k(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`?rc(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)},cc=(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=k(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)g(i.patternProperties,t.source,e)}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=k(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=k(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values,l=t.io===`input`&&rc(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)}},lc=(e,t,n,r)=>{let i=e._zod.def,a=k(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`}]},uc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},dc=Symbol();function fc(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(O(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),dc):JSON.parse(o)}var pc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=fc(i.defaultValue,e,t,n,r);o!==dc&&(n.default=o)},mc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=fc(i.defaultValue,e,t,n,r);o!==dc&&(n._prefault=o)},hc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{O(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},gc=(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;k(o,t,r);let s=t.seen.get(e);s.ref=o},_c=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},vc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},yc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},bc=(e,t,n,r)=>{let i=e._zod.innerType;k(i,t,r);let a=t.seen.get(e);a.ref=i},xc={string:Ns,number:Ps,boolean:Fs,bigint:Is,symbol:Ls,null:Rs,undefined:zs,void:Bs,never:Vs,any:Hs,unknown:Us,date:Ws,enum:Gs,literal:Ks,nan:qs,template_literal:Js,file:Ys,success:Xs,custom:Zs,function:Qs,transform:$s,map:ec,set:tc,array:nc,object:ic,union:ac,intersection:oc,tuple:sc,record:cc,nullable:lc,nonoptional:uc,default:pc,prefault:mc,catch:hc,pipe:gc,readonly:_c,promise:vc,optional:yc,lazy:bc};function Sc(e,t){if(`_idmap`in e){let n=e,r=ys({...t,processors:xc}),i={};for(let e of n._idmap.entries()){let[t,n]=e;k(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;xs(r,n),g(a,t,Os(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=ys({...t,processors:xc});return k(e,n),xs(n,e),Os(n,e)}var Cc=t({endsWith:()=>Qo,gt:()=>Po,gte:()=>Fo,includes:()=>Xo,length:()=>Ko,lowercase:()=>Jo,lt:()=>Mo,lte:()=>No,maxLength:()=>Wo,maxSize:()=>Vo,mime:()=>ts,minLength:()=>Go,minSize:()=>Ho,multipleOf:()=>Bo,negative:()=>Lo,nonnegative:()=>zo,nonpositive:()=>Ro,normalize:()=>rs,overwrite:()=>ns,positive:()=>Io,properties:()=>es,property:()=>$o,regex:()=>qo,size:()=>Uo,slugify:()=>ss,startsWith:()=>Zo,toLowerCase:()=>as,toUpperCase:()=>os,trim:()=>is,uppercase:()=>Yo}),wc=new WeakSet([Object.prototype,Error.prototype]);function Tc(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 Ec=x(`ZodError`,(e,t)=>{w.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);wc.has(n)||(wc.add(n),Tc(n,`format`,e=>t=>st(e,t)),Tc(n,`flatten`,e=>t=>ot(e,t)),Tc(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,l,2)}),Tc(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}),Dc=lt(Ec),Oc=dt(Ec),kc=pt(Ec),Ac=ht(Ec),jc=_t(Ec),Mc=vt(Ec),Nc=yt(Ec),Pc=bt(Ec),Fc=xt(Ec),Ic=St(Ec),Lc=Ct(Ec),Rc=wt(Ec),zc=t({ZodAny:()=>uu,ZodArray:()=>yu,ZodBase64:()=>Al,ZodBase64URL:()=>Ml,ZodBigInt:()=>$l,ZodBigIntFormat:()=>tu,ZodBoolean:()=>Ql,ZodCIDRv4:()=>El,ZodCIDRv6:()=>Ol,ZodCUID:()=>ul,ZodCUID2:()=>fl,ZodCatch:()=>od,ZodCodec:()=>fd,ZodCreditCard:()=>Il,ZodCustom:()=>Ed,ZodCustomStringFormat:()=>Bl,ZodDate:()=>_u,ZodDefault:()=>Qu,ZodDiscriminatedUnion:()=>Eu,ZodE164:()=>Pl,ZodEmail:()=>Jc,ZodEmoji:()=>ol,ZodEnum:()=>zu,ZodExactOptional:()=>qu,ZodFile:()=>Hu,ZodFunction:()=>wd,ZodGUID:()=>Xc,ZodIPv4:()=>bl,ZodIPv6:()=>wl,ZodISODate:()=>Gc,ZodISODateTime:()=>Wc,ZodISODuration:()=>qc,ZodISOTime:()=>Kc,ZodIntersection:()=>Ou,ZodJWT:()=>Rl,ZodKSUID:()=>vl,ZodLazy:()=>bd,ZodLiteral:()=>Vu,ZodMAC:()=>Sl,ZodMap:()=>Fu,ZodNaN:()=>cd,ZodNanoID:()=>cl,ZodNever:()=>pu,ZodNonOptional:()=>nd,ZodNull:()=>cu,ZodNullable:()=>Yu,ZodNumber:()=>Gl,ZodNumberFormat:()=>Kl,ZodObject:()=>xu,ZodOptional:()=>Ku,ZodPipe:()=>ud,ZodPrefault:()=>ed,ZodPreprocess:()=>hd,ZodPromise:()=>Sd,ZodReadonly:()=>gd,ZodRecord:()=>Mu,ZodSet:()=>Lu,ZodString:()=>Uc,ZodStringFormat:()=>M,ZodSuccess:()=>id,ZodSymbol:()=>iu,ZodTemplateLiteral:()=>vd,ZodTransform:()=>Wu,ZodTuple:()=>Au,ZodType:()=>A,ZodULID:()=>ml,ZodURL:()=>rl,ZodUUID:()=>Qc,ZodUndefined:()=>ou,ZodUnion:()=>Cu,ZodUnknown:()=>fu,ZodVoid:()=>hu,ZodXID:()=>gl,ZodXor:()=>wu,_ZodString:()=>Hc,_default:()=>$u,_function:()=>Td,any:()=>du,array:()=>I,base64:()=>jl,base64url:()=>Nl,bigint:()=>eu,boolean:()=>P,catch:()=>sd,check:()=>Dd,cidrv4:()=>Dl,cidrv6:()=>kl,codec:()=>pd,creditCard:()=>Ll,cuid:()=>dl,cuid2:()=>pl,custom:()=>Od,date:()=>vu,describe:()=>jd,discriminatedUnion:()=>Du,e164:()=>Fl,email:()=>Yc,emoji:()=>sl,enum:()=>V,exactOptional:()=>Ju,file:()=>Uu,float32:()=>Jl,float64:()=>Yl,function:()=>Td,guid:()=>Zc,hash:()=>Wl,hex:()=>Ul,hostname:()=>Hl,httpUrl:()=>al,instanceof:()=>Nd,int:()=>ql,int32:()=>Xl,int64:()=>nu,intersection:()=>ku,invertCodec:()=>md,ipv4:()=>xl,ipv6:()=>Tl,json:()=>Fd,jwt:()=>zl,keyof:()=>bu,ksuid:()=>yl,lazy:()=>xd,literal:()=>H,looseObject:()=>R,looseRecord:()=>Pu,mac:()=>Cl,map:()=>Iu,meta:()=>Md,nan:()=>ld,nanoid:()=>ll,nativeEnum:()=>Bu,never:()=>mu,nonoptional:()=>rd,null:()=>lu,nullable:()=>Xu,nullish:()=>Zu,number:()=>N,object:()=>L,optional:()=>U,partialRecord:()=>Nu,pipe:()=>dd,prefault:()=>td,preprocess:()=>Id,promise:()=>Cd,readonly:()=>_d,record:()=>B,refine:()=>kd,set:()=>Ru,strictObject:()=>Su,string:()=>j,stringFormat:()=>Vl,stringbool:()=>Pd,success:()=>ad,superRefine:()=>Ad,symbol:()=>au,templateLiteral:()=>yd,transform:()=>Gu,tuple:()=>ju,uint32:()=>Zl,uint64:()=>ru,ulid:()=>hl,undefined:()=>su,union:()=>z,unknown:()=>F,url:()=>il,uuid:()=>$c,uuidv4:()=>el,uuidv6:()=>tl,uuidv7:()=>nl,void:()=>gu,xid:()=>_l,xor:()=>Tu});function Bc(){S.localeError||C(ja())}function Vc(){S.memoizer||C({memoizer:Oa()})}var A=x(`ZodType`,(e,t)=>(Bc(),E.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_(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 ue(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(kd(e,t))},superRefine(e,t){return this.check(Ad(e,t))},overwrite(e){return this.check(ns(e))},optional(){return U(this)},exactOptional(){return Ju(this)},nullable(){return Xu(this)},nullish(){return U(Xu(this))},nonoptional(e){return rd(this,e)},array(){return I(this)},or(e){return z([this,e])},and(e){return ku(this,e)},transform(e){return dd(this,Gu(e))},default(e){return $u(this,e)},prefault(e){return td(this,e)},catch(e){return sd(this,e)},pipe(e){return dd(this,e)},readonly(){return _d(this)},describe(e){let t=this.clone();return Fa.add(t,{description:e}),t},meta(...e){if(e.length===0)return Fa.get(this);let t=this.clone();return Fa.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 Fe(this,`~standard`,{...mr(this),jsonSchema:{input:js(this,`input`),output:js(this,`output`)}})},set"~standard"(e){Pe(this,`~standard`,e)},parse:function e(t,n){return Dc(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Oc(this,t,n,{callee:e})},safeParse(e,t){return kc(this,e,t)},async safeParseAsync(e,t){return Ac(this,e,t)},get spa(){return this.safeParseAsync},set spa(e){Pe(this,`spa`,e)},encode:function e(t,n){return jc(this,t,n,{callee:e})},decode:function e(t,n){return Mc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Nc(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Pc(this,t,n,{callee:e})},safeEncode(e,t){return Fc(this,e,t)},safeDecode(e,t){return Ic(this,e,t)},async safeEncodeAsync(e,t){return Lc(this,e,t)},async safeDecodeAsync(e,t){return Rc(this,e,t)},get toJSONSchema(){return Pe(this,`toJSONSchema`,As(this,{}))},set toJSONSchema(e){Pe(this,`toJSONSchema`,e)},get description(){return Fa.get(this)?.description},get _def(){return this._zod.def}}),Hc=x(`_ZodString`,(e,t)=>{hr.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ns(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(qo(...e))},includes(...e){return this.check(Xo(...e))},startsWith(...e){return this.check(Zo(...e))},endsWith(...e){return this.check(Qo(...e))},min(...e){return this.check(Go(...e))},max(...e){return this.check(Wo(...e))},length(...e){return this.check(Ko(...e))},nonempty(...e){return this.check(Go(1,...e))},lowercase(e){return this.check(Jo(e))},uppercase(e){return this.check(Yo(e))},trim(){return this.check(is())},normalize(...e){return this.check(rs(...e))},toLowerCase(){return this.check(as())},toUpperCase(){return this.check(os())},slugify(){return this.check(ss())}}),Uc=x(`ZodString`,(e,t)=>{hr.init(e,t),Hc.init(e,t)},{email(e){return this.check(La(Jc,e))},url(e){return this.check(Ua(rl,e))},jwt(e){return this.check(oo(Rl,e))},emoji(e){return this.check(Wa(ol,e))},guid(e){return this.check(Ra(Xc,e))},uuid(e){return this.check(za(Qc,e))},uuidv4(e){return this.check(Ba(Qc,e))},uuidv6(e){return this.check(Va(Qc,e))},uuidv7(e){return this.check(Ha(Qc,e))},nanoid(e){return this.check(Ga(cl,e))},cuid(e){return this.check(Ka(ul,e))},cuid2(e){return this.check(qa(fl,e))},ulid(e){return this.check(Ja(ml,e))},base64(e){return this.check(no(Al,e))},base64url(e){return this.check(ro(Ml,e))},xid(e){return this.check(Ya(gl,e))},ksuid(e){return this.check(Xa(vl,e))},ipv4(e){return this.check(Za(bl,e))},ipv6(e){return this.check(Qa(wl,e))},cidrv4(e){return this.check(eo(El,e))},cidrv6(e){return this.check(to(Ol,e))},e164(e){return this.check(io(Pl,e))},datetime(e){return this.check(so(Wc,e))},date(e){return this.check(co(Gc,e))},time(e){return this.check(lo(Kc,e))},duration(e){return this.check(uo(qc,e))}});function j(e){return Ia(Uc,e)}var M=x(`ZodStringFormat`,(e,t)=>{D.init(e,t),Hc.init(e,t)}),Wc=x(`ZodISODateTime`,(e,t)=>{Mr.init(e,t),M.init(e,t)}),Gc=x(`ZodISODate`,(e,t)=>{Nr.init(e,t),M.init(e,t)}),Kc=x(`ZodISOTime`,(e,t)=>{Pr.init(e,t),M.init(e,t)}),qc=x(`ZodISODuration`,(e,t)=>{Fr.init(e,t),M.init(e,t)}),Jc=x(`ZodEmail`,(e,t)=>{vr.init(e,t),M.init(e,t)});function Yc(e){return La(Jc,e)}var Xc=x(`ZodGUID`,(e,t)=>{gr.init(e,t),M.init(e,t)});function Zc(e){return Ra(Xc,e)}var Qc=x(`ZodUUID`,(e,t)=>{_r.init(e,t),M.init(e,t)});function $c(e){return za(Qc,e)}function el(e){return Ba(Qc,e)}function tl(e){return Va(Qc,e)}function nl(e){return Ha(Qc,e)}var rl=x(`ZodURL`,(e,t)=>{wr.init(e,t),M.init(e,t)});function il(e){return Ua(rl,e)}function al(e){return Ua(rl,{protocol:rn,hostname:nn,...v(e)})}var ol=x(`ZodEmoji`,(e,t)=>{Tr.init(e,t),M.init(e,t)});function sl(e){return Wa(ol,e)}var cl=x(`ZodNanoID`,(e,t)=>{Er.init(e,t),M.init(e,t)});function ll(e){return Ga(cl,e)}var ul=x(`ZodCUID`,(e,t)=>{Dr.init(e,t),M.init(e,t)});function dl(e){return Ka(ul,e)}var fl=x(`ZodCUID2`,(e,t)=>{Or.init(e,t),M.init(e,t)});function pl(e){return qa(fl,e)}var ml=x(`ZodULID`,(e,t)=>{kr.init(e,t),M.init(e,t)});function hl(e){return Ja(ml,e)}var gl=x(`ZodXID`,(e,t)=>{Ar.init(e,t),M.init(e,t)});function _l(e){return Ya(gl,e)}var vl=x(`ZodKSUID`,(e,t)=>{jr.init(e,t),M.init(e,t)});function yl(e){return Xa(vl,e)}var bl=x(`ZodIPv4`,(e,t)=>{Ir.init(e,t),M.init(e,t)});function xl(e){return Za(bl,e)}var Sl=x(`ZodMAC`,(e,t)=>{Br.init(e,t),M.init(e,t)});function Cl(e){return $a(Sl,e)}var wl=x(`ZodIPv6`,(e,t)=>{zr.init(e,t),M.init(e,t)});function Tl(e){return Qa(wl,e)}var El=x(`ZodCIDRv4`,(e,t)=>{Vr.init(e,t),M.init(e,t)});function Dl(e){return eo(El,e)}var Ol=x(`ZodCIDRv6`,(e,t)=>{Ur.init(e,t),M.init(e,t)});function kl(e){return to(Ol,e)}var Al=x(`ZodBase64`,(e,t)=>{Gr.init(e,t),M.init(e,t)});function jl(e){return no(Al,e)}var Ml=x(`ZodBase64URL`,(e,t)=>{qr.init(e,t),M.init(e,t)});function Nl(e){return ro(Ml,e)}var Pl=x(`ZodE164`,(e,t)=>{Jr.init(e,t),M.init(e,t)});function Fl(e){return io(Pl,e)}var Il=x(`ZodCreditCard`,(e,t)=>{Qr.init(e,t),M.init(e,t)});function Ll(e){return ao(Il,e)}var Rl=x(`ZodJWT`,(e,t)=>{ei.init(e,t),M.init(e,t)});function zl(e){return oo(Rl,e)}var Bl=x(`ZodCustomStringFormat`,(e,t)=>{ti.init(e,t),M.init(e,t)});function Vl(e,t,n={}){return _s(Bl,e,t,n)}function Hl(e){return _s(Bl,`hostname`,tn,e)}function Ul(e){return _s(Bl,`hex`,Sn,e)}function Wl(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Tt[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return _s(Bl,n,r,t)}var Gl=x(`ZodNumber`,(e,t)=>{ni.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ps(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(Po(e,t))},gte(e,t){return this.check(Fo(e,t))},min(e,t){return this.check(Fo(e,t))},lt(e,t){return this.check(Mo(e,t))},lte(e,t){return this.check(No(e,t))},max(e,t){return this.check(No(e,t))},int(e){return this.check(ql(e))},safe(e){return this.check(ql(e))},positive(e){return this.check(Po(0,e))},nonnegative(e){return this.check(Fo(0,e))},negative(e){return this.check(Mo(0,e))},nonpositive(e){return this.check(No(0,e))},multipleOf(e,t){return this.check(Bo(e,t))},step(e,t){return this.check(Bo(e,t))},finite(){return this}});function N(e){return fo(Gl,e)}var Kl=x(`ZodNumberFormat`,(e,t)=>{ri.init(e,t),Gl.init(e,t)});function ql(e){return mo(Kl,e)}function Jl(e){return ho(Kl,e)}function Yl(e){return go(Kl,e)}function Xl(e){return _o(Kl,e)}function Zl(e){return vo(Kl,e)}var Ql=x(`ZodBoolean`,(e,t)=>{ii.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fs(e,t,n,r)});function P(e){return yo(Ql,e)}var $l=x(`ZodBigInt`,(e,t)=>{ai.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Is(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(Fo(e,t))},min(e,t){return this.check(Fo(e,t))},gt(e,t){return this.check(Po(e,t))},lt(e,t){return this.check(Mo(e,t))},lte(e,t){return this.check(No(e,t))},max(e,t){return this.check(No(e,t))},positive(e){return this.check(Po(BigInt(0),e))},negative(e){return this.check(Mo(BigInt(0),e))},nonpositive(e){return this.check(No(BigInt(0),e))},nonnegative(e){return this.check(Fo(BigInt(0),e))},multipleOf(e,t){return this.check(Bo(e,t))}});function eu(e){return bo($l,e)}var tu=x(`ZodBigIntFormat`,(e,t)=>{oi.init(e,t),$l.init(e,t)});function nu(e){return xo(tu,e)}function ru(e){return So(tu,e)}var iu=x(`ZodSymbol`,(e,t)=>{si.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ls(e,t,n,r)});function au(e){return Co(iu,e)}var ou=x(`ZodUndefined`,(e,t)=>{ci.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zs(e,t,n,r)});function su(e){return wo(ou,e)}var cu=x(`ZodNull`,(e,t)=>{li.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rs(e,t,n,r)});function lu(e){return To(cu,e)}var uu=x(`ZodAny`,(e,t)=>{ui.init(e,t),A.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function du(){return Eo(uu)}var fu=x(`ZodUnknown`,(e,t)=>{di.init(e,t),A.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function F(){return Do(fu)}var pu=x(`ZodNever`,(e,t)=>{fi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vs(e,t,n,r)});function mu(e){return Oo(pu,e)}var hu=x(`ZodVoid`,(e,t)=>{pi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bs(e,t,n,r)});function gu(e){return ko(hu,e)}var _u=x(`ZodDate`,(e,t)=>{mi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ws(e,t,n,r),e.min=(t,n)=>e.check(Fo(t,n)),e.max=(t,n)=>e.check(No(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 vu(e){return Ao(_u,e)}var yu=x(`ZodArray`,(e,t)=>{Vc(),gi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nc(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Go(e,t))},nonempty(e){return this.check(Go(1,e))},max(e,t){return this.check(Wo(e,t))},length(e,t){return this.check(Ko(e,t))},unwrap(){return this.element}});function I(e,t){return cs(yu,e,t)}function bu(e){let t=e._zod.def.shape;return V(Object.keys(t))}var xu=x(`ZodObject`,(e,t)=>{Vc(),Ci.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ic(e,t,n,r),Ve(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return V(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:F()})},loose(){return this.clone({...this._zod.def,catchall:F()})},strict(){return this.clone({...this._zod.def,catchall:mu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return _e(this,e)},safeExtend(e){return ve(this,e)},merge(e){return ye(this,e)},pick(e){return he(this,e)},omit(e){return ge(this,e)},partial(...e){return be(Ku,this,e[0])},exactPartial(...e){return be(qu,this,e[0],`exactPartial`)},required(...e){return xe(nd,this,e[0])}});function L(e,t){return new xu({type:`object`,shape:e??{},...v(t)})}function Su(e,t){return new xu({type:`object`,shape:e,catchall:mu(),...v(t)})}function R(e,t){return new xu({type:`object`,shape:e,catchall:F(),...v(t)})}var Cu=x(`ZodUnion`,(e,t)=>{Ti.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ac(e,t,n,r),e.options=t.options});function z(e,t){return new Cu({type:`union`,options:e,...v(t)})}var wu=x(`ZodXor`,(e,t)=>{Cu.init(e,t),Di.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ac(e,t,n,r),e.options=t.options});function Tu(e,t){return new wu({type:`union`,options:e,inclusive:!1,...v(t)})}var Eu=x(`ZodDiscriminatedUnion`,(e,t)=>{Cu.init(e,t),Oi.init(e,t)});function Du(e,t,n){return new Eu({type:`union`,options:t,discriminator:e,...v(n)})}var Ou=x(`ZodIntersection`,(e,t)=>{ki.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oc(e,t,n,r)});function ku(e,t){return new Ou({type:`intersection`,left:e,right:t})}var Au=x(`ZodTuple`,(e,t)=>{Vc(),Mi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sc(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 Ku({type:`optional`,innerType:e}))})}});function ju(e,t,n){let r=t instanceof E;return new Au({type:`tuple`,items:e,rest:r?t:null,...v(r?n:t)})}var Mu=x(`ZodRecord`,(e,t)=>{Vc(),Ii.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function B(e,t,n){return!t||!t._zod?new Mu({type:`record`,keyType:j(),valueType:e,...v(t)}):new Mu({type:`record`,keyType:e,valueType:t,...v(n)})}function Nu(e,t,n){return new Mu({type:`record`,keyType:e,valueType:t,...v(n),partial:!0})}function Pu(e,t,n){return new Mu({type:`record`,keyType:e,valueType:t,mode:`loose`,...v(n)})}var Fu=x(`ZodMap`,(e,t)=>{Vc(),Li.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ec(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(Ho(...t)),e.nonempty=t=>e.check(Ho(1,t)),e.max=(...t)=>e.check(Vo(...t)),e.size=(...t)=>e.check(Uo(...t))});function Iu(e,t,n){return new Fu({type:`map`,keyType:e,valueType:t,...v(n)})}var Lu=x(`ZodSet`,(e,t)=>{Vc(),zi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tc(e,t,n,r),e.min=(...t)=>e.check(Ho(...t)),e.nonempty=t=>e.check(Ho(1,t)),e.max=(...t)=>e.check(Vo(...t)),e.size=(...t)=>e.check(Uo(...t))});function Ru(e,t){return new Lu({type:`set`,valueType:e,...v(t)})}var zu=x(`ZodEnum`,(e,t)=>{Vi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gs(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 zu({...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 zu({...t,checks:[],...v(r),entries:i})}});function V(e,t){return new zu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...v(t)})}function Bu(e,t){return new zu({type:`enum`,entries:e,...v(t)})}var Vu=x(`ZodLiteral`,(e,t)=>{Hi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ks(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 H(e,t){return new Vu({type:`literal`,values:Array.isArray(e)?e:[e],...v(t)})}var Hu=x(`ZodFile`,(e,t)=>{Ui.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ys(e,t,n,r),e.min=(t,n)=>e.check(Ho(t,n)),e.max=(t,n)=>e.check(Vo(t,n)),e.mime=(t,n)=>e.check(ts(Array.isArray(t)?t:[t],n))});function Uu(e){return ls(Hu,e)}var Wu=x(`ZodTransform`,(e,t)=>{Vc(),Wi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$s(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Xe(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Me(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(Me(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Gu(e){return new Wu({type:`transform`,transform:e})}var Ku=x(`ZodOptional`,(e,t)=>{Ki.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function U(e){return new Ku({type:`optional`,innerType:e})}var qu=x(`ZodExactOptional`,(e,t)=>{qi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ju(e){return new qu({type:`optional`,innerType:e})}var Yu=x(`ZodNullable`,(e,t)=>{Ji.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xu(e){return new Yu({type:`nullable`,innerType:e})}function Zu(e){return U(Xu(e))}var Qu=x(`ZodDefault`,(e,t)=>{Yi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $u(e,t){return new Qu({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var ed=x(`ZodPrefault`,(e,t)=>{Zi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function td(e,t){return new ed({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var nd=x(`ZodNonOptional`,(e,t)=>{Qi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rd(e,t){return new nd({type:`nonoptional`,innerType:e,...v(t)})}var id=x(`ZodSuccess`,(e,t)=>{ea.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ad(e){return new id({type:`success`,innerType:e})}var od=x(`ZodCatch`,(e,t)=>{na.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function sd(e,t){return new od({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ue(t)})}var cd=x(`ZodNaN`,(e,t)=>{ra.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qs(e,t,n,r)});function ld(e){return jo(cd,e)}var ud=x(`ZodPipe`,(e,t)=>{ia.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gc(e,t,n,r),e.in=t.in,e.out=t.out});function dd(e,t){return new ud({type:`pipe`,in:e,out:t})}var fd=x(`ZodCodec`,(e,t)=>{ud.init(e,t),oa.init(e,t)});function pd(e,t,n){return new fd({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function md(e){let t=e._zod.def;return new fd({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var hd=x(`ZodPreprocess`,(e,t)=>{ud.init(e,t),la.init(e,t)}),gd=x(`ZodReadonly`,(e,t)=>{ua.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_c(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _d(e){return new gd({type:`readonly`,innerType:e})}var vd=x(`ZodTemplateLiteral`,(e,t)=>{fa.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Js(e,t,n,r)});function yd(e,t){return new vd({type:`template_literal`,parts:e,...v(t)})}var bd=x(`ZodLazy`,(e,t)=>{ha.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bc(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function xd(e){return new bd({type:`lazy`,getter:e})}var Sd=x(`ZodPromise`,(e,t)=>{ma.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cd(e){return new Sd({type:`promise`,innerType:e})}var wd=x(`ZodFunction`,(e,t)=>{pa.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qs(e,t,n,r)});function Td(e){return new wd({type:`function`,input:Array.isArray(e?.input)?ju(e?.input):e?.input??I(F()),output:e?.output??F()})}var Ed=x(`ZodCustom`,(e,t)=>{ga.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zs(e,t,n,r)});function Dd(e){let t=new T({check:`custom`});return t._zod.check=e,t}function Od(e,t){return us(Ed,e??(()=>!0),t)}function kd(e,t={}){return ds(Ed,e,t)}function Ad(e,t){return fs(e,t)}var jd=ms,Md=hs;function Nd(e,t={}){let n=new Ed({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 Pd=(...e)=>gs({Codec:fd,Boolean:Ql,String:Uc},...e);function Fd(e){let t=xd(()=>z([j(e),N(),P(),lu(),I(t),B(j(),t)]));return t}function Id(e,t){return new hd({type:`pipe`,in:Gu(e),out:t})}var Ld={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`},Rd;Rd||={};var zd=t({ZodISODate:()=>Gc,ZodISODateTime:()=>Wc,ZodISODuration:()=>qc,ZodISOTime:()=>Kc,date:()=>Vd,datetime:()=>Bd,duration:()=>Ud,time:()=>Hd});function Bd(e){return so(Wc,e)}function Vd(e){return co(Gc,e)}function Hd(e){return lo(Kc,e)}function Ud(e){return uo(qc,e)}var W={...zc,...Cc,iso:zd},Wd=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 Gd(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 Kd(e,t){return e.map((e,n)=>n<t?e:e.optional())}function qd(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Jd(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:qd(n[1]);if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Yd(e,t){return W.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 Xd(e,t){if(e!==!1)return e===void 0||e===!0?W.any():$d(e,t)}var Zd=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Qd(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return W.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 W.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$d(Jd(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 W.null();if(n.length===0)return W.never();if(n.length===1)return W.literal(n[0]);if(n.every(e=>typeof e==`string`))return W.enum(n);let r=n.map(e=>W.literal(e));return r.length<2?r[0]:W.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return W.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Qd({...e,type:n},t));return r.length===0?W.never():r.length===1?r[0]:W.union(r)}if(!n)return W.any();let r;switch(n){case`string`:{let t=W.string();if(e.format){let n=e.format;n===`email`?t=t.check(W.email()):n===`uri`||n===`uri-reference`?t=t.check(W.url()):n===`uuid`||n===`guid`?t=t.check(W.uuid()):n===`date-time`?t=t.check(W.iso.datetime({offset:!0})):n===`date`?t=t.check(W.iso.date()):n===`time`?t=t.check(W.regex(Zd)):n===`duration`?t=t.check(W.iso.duration()):n===`hostname`?t=t.check(W.hostname()):n===`ipv4`?t=t.check(W.ipv4()):n===`ipv6`?t=t.check(W.ipv6()):n===`mac`?t=t.check(W.mac()):n===`cidr`?t=t.check(W.cidrv4()):n===`cidr-v6`?t=t.check(W.cidrv6()):n===`base64`?t=t.check(W.base64()):n===`base64url`?t=t.check(W.base64url()):n===`e164`?t=t.check(W.e164()):n===`credit_card`?t=t.check(W.creditCard()):n===`jwt`?t=t.check(W.jwt()):n===`emoji`?t=t.check(W.emoji()):n===`nanoid`?t=t.check(W.nanoid()):n===`cuid`?t=t.check(W.cuid()):n===`cuid2`?t=t.check(W.cuid2()):n===`ulid`?t=t.check(W.ulid()):n===`xid`?t=t.check(W.xid()):n===`ksuid`&&(t=t.check(W.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`?W.number().int():W.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=W.boolean();break;case`null`:r=W.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?$d(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=$d(r,t);g(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=$d(i[e],t),r=W.string().regex(new RegExp(e));o.push(W.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(W.object(n).passthrough()),s.push(...o),s.length===0)r=W.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=W.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=W.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(!ae(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=W.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=Yd(r,$d(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=Kd(n.map(e=>$d(e,t)),a),s=Array.isArray(i)?void 0:Xd(i,t),c=W.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check(W.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(W.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=Kd(i.map(e=>$d(e,t)),n),o=Xd(e.additionalItems,t),s=W.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check(W.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(W.maxLength(e.maxItems)))}else if(i!==void 0){let n=$d(i,t),a=W.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=W.array(W.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $d(e,t){if(typeof e==`boolean`)return e?W.any():W.never();let n=Qd(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=>$d(e,t)),a=W.union(i);n=r?W.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$d(e,t)),a=W.xor(i);n=r?W.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:W.any();else{let i=r?n:$d(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=W.intersection(i,$d(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=W.nullable(n)),e.readOnly===!0&&(n=W.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))Wd.has(t)||g(i,t,e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function ef(e,t){if(typeof e==`boolean`)return e?W.any():W.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:Gd(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Fa};return $d(n,r)}function tf(e){return po(Gl,e)}var nf=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],rf=`io.modelcontextprotocol/related-task`,af=`io.modelcontextprotocol/protocolVersion`,of=`io.modelcontextprotocol/clientInfo`,sf=`io.modelcontextprotocol/serverInfo`,cf=`io.modelcontextprotocol/clientCapabilities`,lf=`io.modelcontextprotocol/subscriptionId`,uf=`io.modelcontextprotocol/logLevel`,df=xd(()=>z([j(),N(),P(),lu(),B(j(),df),I(df)])),G=B(j(),df),ff=I(df),pf=z([j(),N().int()]),mf=j(),hf=L({ttl:N().optional()}),gf=L({taskId:j()}),_f=R({progressToken:pf.optional(),[rf]:gf.optional()}),vf=L({_meta:_f.optional()}),yf=vf.extend({task:hf.optional()}),K=L({method:j(),params:vf.loose().optional()}),bf=L({_meta:_f.optional()}),xf=L({method:j(),params:bf.loose().optional()}),Sf=R({get[sf](){return If.optional().catch(void 0)}}),q=R({_meta:Sf.optional()}),Cf=z([j(),N().int()]),wf=L({jsonrpc:H(`2.0`),id:Cf,...K.shape}).strict(),Tf=L({jsonrpc:H(`2.0`),...xf.shape}).strict(),Ef=L({jsonrpc:H(`2.0`),id:Cf,result:q}).strict(),Df=L({jsonrpc:H(`2.0`),id:Cf.optional(),error:L({code:N().int(),message:j(),data:F().optional()})}).strict(),Of=z([wf,Tf,Ef,Df]),kf=z([Ef,Df]),Af=q.strict(),jf=bf.extend({requestId:Cf.optional(),reason:j().optional()}),Mf=xf.extend({method:H(`notifications/cancelled`),params:jf}),Nf=L({src:j(),mimeType:j().optional(),sizes:I(j()).optional(),theme:V([`light`,`dark`]).optional()}),Pf=L({icons:I(Nf).optional()}),Ff=L({name:j(),title:j().optional()}),If=Ff.extend({...Ff.shape,...Pf.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),Lf=Id(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ku(L({form:ku(L({applyDefaults:P().optional()}),G).optional(),url:G.optional()}),G.optional())),Rf=R({list:G.optional(),cancel:G.optional(),requests:R({sampling:R({createMessage:G.optional()}).optional(),elicitation:R({create:G.optional()}).optional()}).optional()}),zf=R({list:G.optional(),cancel:G.optional(),requests:R({tools:R({call:G.optional()}).optional()}).optional()}),Bf=L({experimental:B(j(),G).optional(),sampling:L({context:G.optional(),tools:G.optional()}).optional(),elicitation:Lf.optional(),roots:L({listChanged:P().optional()}).optional(),tasks:Rf.optional(),extensions:B(j(),G).optional()}),Vf=vf.extend({protocolVersion:j(),capabilities:Bf,clientInfo:If}),Hf=K.extend({method:H(`initialize`),params:Vf}),Uf=L({experimental:B(j(),G).optional(),logging:G.optional(),completions:G.optional(),prompts:L({listChanged:P().optional()}).optional(),resources:L({subscribe:P().optional(),listChanged:P().optional()}).optional(),tools:L({listChanged:P().optional()}).optional(),tasks:zf.optional(),extensions:B(j(),G).optional()}),Wf=q.extend({protocolVersion:j(),capabilities:Uf,serverInfo:If,instructions:j().optional()}),Gf=xf.extend({method:H(`notifications/initialized`),params:bf.optional()}),Kf=K.extend({method:H(`server/discover`),params:vf.optional()}),qf=q.extend({supportedVersions:I(j()),capabilities:Uf,instructions:j().optional()}),Jf=K.extend({method:H(`ping`),params:vf.optional()}),Yf=L({progress:N(),total:U(N()),message:U(j())}),Xf=L({...bf.shape,...Yf.shape,progressToken:pf}),Zf=xf.extend({method:H(`notifications/progress`),params:Xf}),Qf=vf.extend({cursor:mf.optional()}),$f=K.extend({params:Qf.optional()}),ep=q.extend({nextCursor:mf.optional()}),tp=L({uri:j(),mimeType:U(j()),_meta:B(j(),F()).optional()}),np=tp.extend({text:j()}),rp=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ip=tp.extend({blob:rp}),ap=V([`user`,`assistant`]),op=L({audience:I(ap).optional(),priority:N().min(0).max(1).optional(),lastModified:Bd({offset:!0}).optional()}),sp=L({...Ff.shape,...Pf.shape,uri:j(),description:U(j()),mimeType:U(j()),size:U(N()),annotations:op.optional(),_meta:U(R({}))}),cp=L({...Ff.shape,...Pf.shape,uriTemplate:j(),description:U(j()),mimeType:U(j()),annotations:op.optional(),_meta:U(R({}))}),lp=$f.extend({method:H(`resources/list`)}),up=ep.extend({resources:I(sp)}),dp=$f.extend({method:H(`resources/templates/list`)}),fp=ep.extend({resourceTemplates:I(cp)}),pp=vf.extend({uri:j()}),mp=pp,hp=K.extend({method:H(`resources/read`),params:mp}),gp=q.extend({contents:I(z([np,ip]))}),_p=xf.extend({method:H(`notifications/resources/list_changed`),params:bf.optional()}),vp=pp,yp=K.extend({method:H(`resources/subscribe`),params:vp}),bp=pp,xp=K.extend({method:H(`resources/unsubscribe`),params:bp}),Sp=L({toolsListChanged:P().optional(),promptsListChanged:P().optional(),resourcesListChanged:P().optional(),resourceSubscriptions:I(j()).optional()}),Cp=vf.extend({notifications:Sp}),wp=K.extend({method:H(`subscriptions/listen`),params:Cp}),Tp=bf.extend({notifications:Sp}),Ep=xf.extend({method:H(`notifications/subscriptions/acknowledged`),params:Tp}),Dp=Sf.extend({[lf]:Cf}),Op=q.extend({_meta:Dp}),kp=bf.extend({uri:j()}),Ap=xf.extend({method:H(`notifications/resources/updated`),params:kp}),jp=L({name:j(),description:U(j()),required:U(P())}),Mp=L({...Ff.shape,...Pf.shape,description:U(j()),arguments:U(I(jp)),_meta:U(R({}))}),Np=$f.extend({method:H(`prompts/list`)}),Pp=ep.extend({prompts:I(Mp)}),Fp=vf.extend({name:j(),arguments:B(j(),j()).optional()}),Ip=K.extend({method:H(`prompts/get`),params:Fp}),Lp=L({type:H(`text`),text:j(),annotations:op.optional(),_meta:B(j(),F()).optional()}),Rp=L({type:H(`image`),data:rp,mimeType:j(),annotations:op.optional(),_meta:B(j(),F()).optional()}),zp=L({type:H(`audio`),data:rp,mimeType:j(),annotations:op.optional(),_meta:B(j(),F()).optional()}),Bp=L({type:H(`tool_use`),name:j(),id:j(),input:B(j(),F()),_meta:B(j(),F()).optional()}),Vp=L({type:H(`resource`),resource:z([np,ip]),annotations:op.optional(),_meta:B(j(),F()).optional()}),Hp=sp.extend({type:H(`resource_link`)}),Up=z([Lp,Rp,zp,Hp,Vp]),Wp=L({role:ap,content:Up}),Gp=q.extend({description:j().optional(),messages:I(Wp)}),Kp=xf.extend({method:H(`notifications/prompts/list_changed`),params:bf.optional()}),qp=L({title:j().optional(),readOnlyHint:P().optional(),destructiveHint:P().optional(),idempotentHint:P().optional(),openWorldHint:P().optional()}),Jp=L({taskSupport:V([`required`,`optional`,`forbidden`]).optional()}),Yp=L({...Ff.shape,...Pf.shape,description:j().optional(),inputSchema:L({type:H(`object`),properties:B(j(),df).optional(),required:I(j()).optional()}).catchall(F()),outputSchema:R({$schema:j().optional()}).optional(),annotations:qp.optional(),execution:Jp.optional(),_meta:B(j(),F()).optional()}),Xp=$f.extend({method:H(`tools/list`)}),Zp=ep.extend({tools:I(Yp)}),Qp=q.extend({content:I(Up).default([]),structuredContent:F().optional(),isError:P().optional()}),$p=Qp.or(q.extend({toolResult:F()})),em=yf.extend({name:j(),arguments:B(j(),F()).optional()}),tm=K.extend({method:H(`tools/call`),params:em}),nm=xf.extend({method:H(`notifications/tools/list_changed`),params:bf.optional()}),rm=L({autoRefresh:P().default(!0),debounceMs:N().int().nonnegative().default(300)}),im=V([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),am=vf.extend({level:im}),om=K.extend({method:H(`logging/setLevel`),params:am}),sm=bf.extend({level:im,logger:j().optional(),data:F()}),cm=xf.extend({method:H(`notifications/message`),params:sm}),lm=L({name:j().optional()}),um=L({hints:I(lm).optional(),costPriority:N().min(0).max(1).optional(),speedPriority:N().min(0).max(1).optional(),intelligencePriority:N().min(0).max(1).optional()}),dm=L({mode:V([`auto`,`required`,`none`]).optional()}),fm=L({type:H(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:I(Up),structuredContent:F().optional(),isError:P().optional(),_meta:B(j(),F()).optional()}),pm=Du(`type`,[Lp,Rp,zp]),mm=Du(`type`,[Lp,Rp,zp,Bp,fm]),hm=L({role:ap,content:z([mm,I(mm)]),_meta:B(j(),F()).optional()}),gm=yf.extend({messages:I(hm),modelPreferences:um.optional(),systemPrompt:j().optional(),includeContext:V([`none`,`thisServer`,`allServers`]).optional(),temperature:N().optional(),maxTokens:N().int(),stopSequences:I(j()).optional(),metadata:G.optional(),tools:I(Yp).optional(),toolChoice:dm.optional()}),_m=K.extend({method:H(`sampling/createMessage`),params:gm}),vm=q.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:ap,content:pm}),ym=q.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:ap,content:z([mm,I(mm)])}),bm=L({type:H(`boolean`),title:j().optional(),description:j().optional(),default:P().optional()}),xm=L({type:H(`string`),title:j().optional(),description:j().optional(),minLength:N().optional(),maxLength:N().optional(),format:V([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),Sm=L({type:V([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:N().optional(),maximum:N().optional(),default:N().optional()}),Cm=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),default:j().optional()}),wm=L({type:H(`string`),title:j().optional(),description:j().optional(),oneOf:I(L({const:j(),title:j()})),default:j().optional()}),Tm=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),enumNames:I(j()).optional(),default:j().optional()}),Em=z([Cm,wm]),Dm=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({type:H(`string`),enum:I(j())}),default:I(j()).optional()}),Om=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({anyOf:I(L({const:j(),title:j()}))}),default:I(j()).optional()}),km=z([Dm,Om]),Am=z([Tm,Em,km]),jm=z([Am,bm,xm,Sm]),Mm=yf.extend({mode:H(`form`).optional(),message:j(),requestedSchema:L({type:H(`object`),properties:B(j(),jm),required:I(j()).optional()}).catchall(F())}),Nm=yf.extend({mode:H(`url`),message:j(),elicitationId:j(),url:j().url()}),Pm=z([Mm,Nm]),Fm=K.extend({method:H(`elicitation/create`),params:Pm}),Im=bf.extend({elicitationId:j()}),Lm=xf.extend({method:H(`notifications/elicitation/complete`),params:Im}),Rm=q.extend({action:V([`accept`,`decline`,`cancel`]),content:Id(e=>e===null?void 0:e,B(j(),z([j(),N(),P(),I(j())])).optional())}),zm=L({type:H(`ref/resource`),uri:j()}),Bm=L({type:H(`ref/prompt`),name:j()}),Vm=vf.extend({ref:z([Bm,zm]),argument:L({name:j(),value:j()}),context:L({arguments:B(j(),j()).optional()}).optional()}),Hm=K.extend({method:H(`completion/complete`),params:Vm}),Um=q.extend({completion:R({values:I(j()).max(100),total:U(N().int()),hasMore:U(P())})}),Wm=L({uri:j().startsWith(`file://`),name:j().optional(),_meta:B(j(),F()).optional()}),Gm=K.extend({method:H(`roots/list`),params:vf.optional()}),Km=q.extend({roots:I(Wm)}),qm=xf.extend({method:H(`notifications/roots/list_changed`),params:bf.optional()}),Jm=R({ttl:N().optional(),pollInterval:N().optional()}),Ym=V([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Xm=L({taskId:j(),status:Ym,ttl:z([N(),lu()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:U(N()),statusMessage:U(j())}),Zm=q.extend({task:Xm}),Qm=bf.merge(Xm),$m=xf.extend({method:H(`notifications/tasks/status`),params:Qm}),eh=K.extend({method:H(`tasks/get`),params:vf.extend({taskId:j()})}),th=q.merge(Xm),nh=K.extend({method:H(`tasks/result`),params:vf.extend({taskId:j()})}),rh=q.loose(),ih=$f.extend({method:H(`tasks/list`)}),ah=ep.extend({tasks:I(Xm)}),oh=K.extend({method:H(`tasks/cancel`),params:vf.extend({taskId:j()})}),sh=q.merge(Xm),ch=z([Jf,Hf,Kf,Hm,om,Ip,Np,lp,dp,hp,yp,xp,wp,tm,Xp]),lh=z([Mf,Zf,Gf,qm]),uh=z([Af,vm,ym,Rm,Km]),dh=z([Jf,_m,Fm,Gm]),fh=z([Mf,Zf,cm,Ap,_p,nm,Kp,Ep,Lm]),ph=z([Af,Wf,qf,Um,Gp,Pp,up,fp,gp,Qp,Zp,Op]),J=il().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Ld.custom,message:`URL must be parseable`,fatal:!0}),Ge}).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`}),mh=R({resource:j().url(),authorization_servers:I(J).optional(),jwks_uri:j().url().optional(),scopes_supported:I(j()).optional(),bearer_methods_supported:I(j()).optional(),resource_signing_alg_values_supported:I(j()).optional(),resource_name:j().optional(),resource_documentation:j().optional(),resource_policy_uri:j().url().optional(),resource_tos_uri:j().url().optional(),tls_client_certificate_bound_access_tokens:P().optional(),authorization_details_types_supported:I(j()).optional(),dpop_signing_alg_values_supported:I(j()).optional(),dpop_bound_access_tokens_required:P().optional()}),hh=R({issuer:j(),authorization_endpoint:J,token_endpoint:J,registration_endpoint:J.optional(),scopes_supported:I(j()).optional(),response_types_supported:I(j()),response_modes_supported:I(j()).optional(),grant_types_supported:I(j()).optional(),token_endpoint_auth_methods_supported:I(j()).optional(),token_endpoint_auth_signing_alg_values_supported:I(j()).optional(),service_documentation:J.optional(),revocation_endpoint:J.optional(),revocation_endpoint_auth_methods_supported:I(j()).optional(),revocation_endpoint_auth_signing_alg_values_supported:I(j()).optional(),introspection_endpoint:j().optional(),introspection_endpoint_auth_methods_supported:I(j()).optional(),introspection_endpoint_auth_signing_alg_values_supported:I(j()).optional(),code_challenge_methods_supported:I(j()).optional(),client_id_metadata_document_supported:P().optional(),authorization_response_iss_parameter_supported:P().optional().catch(void 0)}),gh=R({issuer:j(),authorization_endpoint:J,token_endpoint:J,userinfo_endpoint:J.optional(),jwks_uri:J,registration_endpoint:J.optional(),scopes_supported:I(j()).optional(),response_types_supported:I(j()),response_modes_supported:I(j()).optional(),grant_types_supported:I(j()).optional(),acr_values_supported:I(j()).optional(),subject_types_supported:I(j()),id_token_signing_alg_values_supported:I(j()),id_token_encryption_alg_values_supported:I(j()).optional(),id_token_encryption_enc_values_supported:I(j()).optional(),userinfo_signing_alg_values_supported:I(j()).optional(),userinfo_encryption_alg_values_supported:I(j()).optional(),userinfo_encryption_enc_values_supported:I(j()).optional(),request_object_signing_alg_values_supported:I(j()).optional(),request_object_encryption_alg_values_supported:I(j()).optional(),request_object_encryption_enc_values_supported:I(j()).optional(),token_endpoint_auth_methods_supported:I(j()).optional(),token_endpoint_auth_signing_alg_values_supported:I(j()).optional(),display_values_supported:I(j()).optional(),claim_types_supported:I(j()).optional(),claims_supported:I(j()).optional(),service_documentation:j().optional(),claims_locales_supported:I(j()).optional(),ui_locales_supported:I(j()).optional(),claims_parameter_supported:P().optional(),request_parameter_supported:P().optional(),request_uri_parameter_supported:P().optional(),require_request_uri_registration:P().optional(),op_policy_uri:J.optional(),op_tos_uri:J.optional(),client_id_metadata_document_supported:P().optional(),authorization_response_iss_parameter_supported:P().optional().catch(void 0)}),_h=L({...gh.shape,...hh.pick({code_challenge_methods_supported:!0}).shape}),vh=L({access_token:j(),id_token:j().optional(),token_type:j(),expires_in:tf().optional(),scope:j().optional(),refresh_token:j().optional()}).strip(),yh=L({issued_token_type:H(`urn:ietf:params:oauth:token-type:id-jag`),access_token:j(),token_type:j().optional(),expires_in:N().optional(),scope:j().optional()}).strip(),bh=L({error:j(),error_description:j().optional(),error_uri:j().optional()}),xh=J.optional().or(H(``).transform(()=>void 0)),Sh=L({redirect_uris:I(J),token_endpoint_auth_method:j().optional(),grant_types:I(j()).optional(),response_types:I(j()).optional(),application_type:j().optional(),client_name:j().optional(),client_uri:J.optional(),logo_uri:xh,scope:j().optional(),contacts:I(j()).optional(),tos_uri:xh,policy_uri:j().optional(),jwks_uri:J.optional(),jwks:du().optional(),software_id:j().optional(),software_version:j().optional(),software_statement:j().optional()}).strip(),Ch=L({client_id:j(),client_secret:j().optional(),client_id_issued_at:N().optional(),client_secret_expires_at:N().optional()}).strip(),wh=Sh.merge(Ch),Th=L({error:j(),error_description:j().optional()}).strip(),Eh=L({token:j(),token_type_hint:j().optional()}).strip(),Dh=Symbol.for(`mcp.sdk.errorBrands`);function Oh(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,Dh,{value:n,enumerable:!1,configurable:!0})}function kh(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Dh)){let n=t[Dh];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 kh(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 kh(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Oh(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 Ah=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}({}),Y=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return kh(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 kh(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,Oh(this,new.target)}};(class extends Y{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 jh=`2026-07-28`;function Mh(e){return e>=jh}function Nh(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 Ph=[`task`,`inputRequests`,`requestState`];function Fh(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Ph.some(t=>t in e)?e:{...e,content:[]}}function Ih(){let e=xd(()=>z([j(),N(),P(),lu(),B(j(),e),I(e)])),t=B(j(),e),n=z([j(),N().int()]),r=j(),i=L({ttl:N().optional()}),a=L({taskId:j()}),o=R({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=L({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=L({method:j(),params:s.loose().optional()}),u=L({_meta:o.optional()}),d=L({method:j(),params:u.loose().optional()}),f=R({_meta:o.optional()}),p=z([j(),N().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:j().optional()}),g=d.extend({method:H(`notifications/cancelled`),params:h}),_=L({src:j(),mimeType:j().optional(),sizes:I(j()).optional(),theme:V([`light`,`dark`]).optional()}),ee=L({icons:I(_).optional()}),te=L({name:j(),title:j().optional()}),ne=te.extend({...te.shape,...ee.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),re=Id(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ku(L({form:ku(L({applyDefaults:P().optional()}),t).optional(),url:t.optional()}),t.optional())),ie=R({list:t.optional(),cancel:t.optional(),requests:R({sampling:R({createMessage:t.optional()}).optional(),elicitation:R({create:t.optional()}).optional()}).optional()}),ae=R({list:t.optional(),cancel:t.optional(),requests:R({tools:R({call:t.optional()}).optional()}).optional()}),oe=L({experimental:B(j(),t).optional(),sampling:L({context:t.optional(),tools:t.optional()}).optional(),elicitation:re.optional(),roots:L({listChanged:P().optional()}).optional(),tasks:ie.optional(),extensions:B(j(),t).optional()}),se=s.extend({protocolVersion:j(),capabilities:oe,clientInfo:ne}),ce=l.extend({method:H(`initialize`),params:se}),le=L({experimental:B(j(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:L({listChanged:P().optional()}).optional(),resources:L({subscribe:P().optional(),listChanged:P().optional()}).optional(),tools:L({listChanged:P().optional()}).optional(),tasks:ae.optional(),extensions:B(j(),t).optional()}),ue=f.extend({protocolVersion:j(),capabilities:le,serverInfo:ne,instructions:j().optional()}),v=d.extend({method:H(`notifications/initialized`),params:u.optional()}),de=l.extend({method:H(`ping`),params:s.optional()}),fe=L({progress:N(),total:U(N()),message:U(j())}),pe=L({...u.shape,...fe.shape,progressToken:n}),me=d.extend({method:H(`notifications/progress`),params:pe}),he=s.extend({cursor:r.optional()}),ge=l.extend({params:he.optional()}),_e=f.extend({nextCursor:r.optional()}),ve=L({uri:j(),mimeType:U(j()),_meta:B(j(),F()).optional()}),ye=ve.extend({text:j()}),be=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),xe=ve.extend({blob:be}),Se=V([`user`,`assistant`]),Ce=L({audience:I(Se).optional(),priority:N().min(0).max(1).optional(),lastModified:Bd({offset:!0}).optional()}),y=L({...te.shape,...ee.shape,uri:j(),description:U(j()),mimeType:U(j()),size:U(N()),annotations:Ce.optional(),_meta:U(R({}))}),we=L({...te.shape,...ee.shape,uriTemplate:j(),description:U(j()),mimeType:U(j()),annotations:Ce.optional(),_meta:U(R({}))}),Te=ge.extend({method:H(`resources/list`)}),Ee=_e.extend({resources:I(y)}),De=ge.extend({method:H(`resources/templates/list`)}),Oe=_e.extend({resourceTemplates:I(we)}),ke=s.extend({uri:j()}),Ae=ke,je=l.extend({method:H(`resources/read`),params:Ae}),Me=f.extend({contents:I(z([ye,xe]))}),Ne=d.extend({method:H(`notifications/resources/list_changed`),params:u.optional()}),Pe=ke,Fe=l.extend({method:H(`resources/subscribe`),params:Pe}),Ie=ke,Le=l.extend({method:H(`resources/unsubscribe`),params:Ie}),Re=u.extend({uri:j()}),ze=d.extend({method:H(`notifications/resources/updated`),params:Re}),Be=L({name:j(),description:U(j()),required:U(P())}),b=L({...te.shape,...ee.shape,description:U(j()),arguments:U(I(Be)),_meta:U(R({}))}),Ve=ge.extend({method:H(`prompts/list`)}),He=_e.extend({prompts:I(b)}),Ue=s.extend({name:j(),arguments:B(j(),j()).optional()}),We=l.extend({method:H(`prompts/get`),params:Ue}),Ge=L({type:H(`text`),text:j(),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),Ke=L({type:H(`image`),data:be,mimeType:j(),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),qe=L({type:H(`audio`),data:be,mimeType:j(),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),Je=L({type:H(`tool_use`),name:j(),id:j(),input:B(j(),F()),_meta:B(j(),F()).optional()}),x=L({type:H(`resource`),resource:z([ye,xe]),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),Ye=y.extend({type:H(`resource_link`)}),Xe=z([Ge,Ke,qe,Ye,x]),S=L({role:Se,content:Xe}),C=f.extend({description:j().optional(),messages:I(S)}),Ze=d.extend({method:H(`notifications/prompts/list_changed`),params:u.optional()}),Qe=L({title:j().optional(),readOnlyHint:P().optional(),destructiveHint:P().optional(),idempotentHint:P().optional(),openWorldHint:P().optional()}),$e=L({taskSupport:V([`required`,`optional`,`forbidden`]).optional()}),et=L({...te.shape,...ee.shape,description:j().optional(),inputSchema:L({type:H(`object`),properties:B(j(),e).optional(),required:I(j()).optional()}).catchall(F()),outputSchema:L({type:H(`object`),properties:B(j(),e).optional(),required:I(j()).optional()}).catchall(F()).optional(),annotations:Qe.optional(),execution:$e.optional(),_meta:B(j(),F()).optional()}),tt=ge.extend({method:H(`tools/list`)}),nt=_e.extend({tools:I(et)}),rt=f.extend({content:I(Xe),structuredContent:B(j(),F()).optional(),isError:P().optional()}),w=c.extend({name:j(),arguments:B(j(),F()).optional()}),it=l.extend({method:H(`tools/call`),params:w}),at=d.extend({method:H(`notifications/tools/list_changed`),params:u.optional()}),ot=V([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),st=s.extend({level:ot}),ct=l.extend({method:H(`logging/setLevel`),params:st}),lt=u.extend({level:ot,logger:j().optional(),data:F()}),ut=d.extend({method:H(`notifications/message`),params:lt}),dt=L({name:j().optional()}),ft=L({hints:I(dt).optional(),costPriority:N().min(0).max(1).optional(),speedPriority:N().min(0).max(1).optional(),intelligencePriority:N().min(0).max(1).optional()}),pt=L({mode:V([`auto`,`required`,`none`]).optional()}),mt=L({type:H(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:I(Xe),structuredContent:L({}).loose().optional(),isError:P().optional(),_meta:B(j(),F()).optional()}),ht=Du(`type`,[Ge,Ke,qe]),gt=Du(`type`,[Ge,Ke,qe,Je,mt]),_t=L({role:Se,content:z([gt,I(gt)]),_meta:B(j(),F()).optional()}),vt=c.extend({messages:I(_t),modelPreferences:ft.optional(),systemPrompt:j().optional(),includeContext:V([`none`,`thisServer`,`allServers`]).optional(),temperature:N().optional(),maxTokens:N().int(),stopSequences:I(j()).optional(),metadata:t.optional(),tools:I(et).optional(),toolChoice:pt.optional()}),yt=l.extend({method:H(`sampling/createMessage`),params:vt}),bt=f.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:Se,content:ht}),xt=f.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:Se,content:z([gt,I(gt)])}),St=L({type:H(`boolean`),title:j().optional(),description:j().optional(),default:P().optional()}),Ct=L({type:H(`string`),title:j().optional(),description:j().optional(),minLength:N().optional(),maxLength:N().optional(),format:V([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),wt=L({type:V([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:N().optional(),maximum:N().optional(),default:N().optional()}),Tt=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),default:j().optional()}),Et=L({type:H(`string`),title:j().optional(),description:j().optional(),oneOf:I(L({const:j(),title:j()})),default:j().optional()}),Dt=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),enumNames:I(j()).optional(),default:j().optional()}),Ot=z([Tt,Et]),kt=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({type:H(`string`),enum:I(j())}),default:I(j()).optional()}),At=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({anyOf:I(L({const:j(),title:j()}))}),default:I(j()).optional()}),jt=z([kt,At]),Mt=z([Dt,Ot,jt]),Nt=z([Mt,St,Ct,wt]),Pt=c.extend({mode:H(`form`).optional(),message:j(),requestedSchema:L({type:H(`object`),properties:B(j(),Nt),required:I(j()).optional()}).catchall(F())}),Ft=c.extend({mode:H(`url`),message:j(),elicitationId:j(),url:j().url()}),It=z([Pt,Ft]),Lt=l.extend({method:H(`elicitation/create`),params:It}),Rt=u.extend({elicitationId:j()}),zt=d.extend({method:H(`notifications/elicitation/complete`),params:Rt}),Bt=f.extend({action:V([`accept`,`decline`,`cancel`]),content:Id(e=>e===null?void 0:e,B(j(),z([j(),N(),P(),I(j())])).optional())}),Vt=L({type:H(`ref/resource`),uri:j()}),Ht=L({type:H(`ref/prompt`),name:j()}),Ut=s.extend({ref:z([Ht,Vt]),argument:L({name:j(),value:j()}),context:L({arguments:B(j(),j()).optional()}).optional()}),Wt=l.extend({method:H(`completion/complete`),params:Ut}),Gt=f.extend({completion:R({values:I(j()).max(100),total:U(N().int()),hasMore:U(P())})}),Kt=L({uri:j().startsWith(`file://`),name:j().optional(),_meta:B(j(),F()).optional()}),qt=l.extend({method:H(`roots/list`),params:s.optional()}),Jt=f.extend({roots:I(Kt)}),Yt=d.extend({method:H(`notifications/roots/list_changed`),params:u.optional()}),Xt=R({ttl:N().optional(),pollInterval:N().optional()}),Zt=V([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Qt=L({taskId:j(),status:Zt,ttl:z([N(),lu()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:U(N()),statusMessage:U(j())}),$t=f.extend({task:Qt}),en=u.merge(Qt),tn=d.extend({method:H(`notifications/tasks/status`),params:en}),nn=l.extend({method:H(`tasks/get`),params:s.extend({taskId:j()})}),rn=f.merge(Qt),an=l.extend({method:H(`tasks/result`),params:s.extend({taskId:j()})}),on=f.loose(),sn=ge.extend({method:H(`tasks/list`)}),cn=_e.extend({tasks:I(Qt)}),ln=l.extend({method:H(`tasks/cancel`),params:s.extend({taskId:j()})});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:g,IconSchema:_,IconsSchema:ee,BaseMetadataSchema:te,ImplementationSchema:ne,ClientTasksCapabilitySchema:ie,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:se,InitializeRequestSchema:ce,ServerCapabilitiesSchema:le,InitializeResultSchema:ue,InitializedNotificationSchema:v,PingRequestSchema:de,ProgressSchema:fe,ProgressNotificationParamsSchema:pe,ProgressNotificationSchema:me,PaginatedRequestParamsSchema:he,PaginatedRequestSchema:ge,PaginatedResultSchema:_e,ResourceContentsSchema:ve,TextResourceContentsSchema:ye,BlobResourceContentsSchema:xe,RoleSchema:Se,AnnotationsSchema:Ce,ResourceSchema:y,ResourceTemplateSchema:we,ListResourcesRequestSchema:Te,ListResourcesResultSchema:Ee,ListResourceTemplatesRequestSchema:De,ListResourceTemplatesResultSchema:Oe,ResourceRequestParamsSchema:ke,ReadResourceRequestParamsSchema:Ae,ReadResourceRequestSchema:je,ReadResourceResultSchema:Me,ResourceListChangedNotificationSchema:Ne,SubscribeRequestParamsSchema:Pe,SubscribeRequestSchema:Fe,UnsubscribeRequestParamsSchema:Ie,UnsubscribeRequestSchema:Le,ResourceUpdatedNotificationParamsSchema:Re,ResourceUpdatedNotificationSchema:ze,PromptArgumentSchema:Be,PromptSchema:b,ListPromptsRequestSchema:Ve,ListPromptsResultSchema:He,GetPromptRequestParamsSchema:Ue,GetPromptRequestSchema:We,TextContentSchema:Ge,ImageContentSchema:Ke,AudioContentSchema:qe,ToolUseContentSchema:Je,EmbeddedResourceSchema:x,ResourceLinkSchema:Ye,ContentBlockSchema:Xe,PromptMessageSchema:S,GetPromptResultSchema:C,PromptListChangedNotificationSchema:Ze,ToolAnnotationsSchema:Qe,ToolExecutionSchema:$e,ToolSchema:et,ListToolsRequestSchema:tt,ListToolsResultSchema:nt,CallToolResultSchema:rt,CallToolRequestParamsSchema:w,CallToolRequestSchema:it,ToolListChangedNotificationSchema:at,LoggingLevelSchema:ot,SetLevelRequestParamsSchema:st,SetLevelRequestSchema:ct,LoggingMessageNotificationParamsSchema:lt,LoggingMessageNotificationSchema:ut,ModelHintSchema:dt,ModelPreferencesSchema:ft,ToolChoiceSchema:pt,ToolResultContentSchema:mt,SamplingContentSchema:ht,SamplingMessageContentBlockSchema:gt,SamplingMessageSchema:_t,CreateMessageRequestParamsSchema:vt,CreateMessageRequestSchema:yt,CreateMessageResultSchema:bt,CreateMessageResultWithToolsSchema:xt,BooleanSchemaSchema:St,StringSchemaSchema:Ct,NumberSchemaSchema:wt,UntitledSingleSelectEnumSchemaSchema:Tt,TitledSingleSelectEnumSchemaSchema:Et,LegacyTitledEnumSchemaSchema:Dt,SingleSelectEnumSchemaSchema:Ot,UntitledMultiSelectEnumSchemaSchema:kt,TitledMultiSelectEnumSchemaSchema:At,MultiSelectEnumSchemaSchema:jt,EnumSchemaSchema:Mt,PrimitiveSchemaDefinitionSchema:Nt,ElicitRequestFormParamsSchema:Pt,ElicitRequestURLParamsSchema:Ft,ElicitRequestParamsSchema:It,ElicitRequestSchema:Lt,ElicitationCompleteNotificationParamsSchema:Rt,ElicitationCompleteNotificationSchema:zt,ElicitResultSchema:Bt,ResourceTemplateReferenceSchema:Vt,PromptReferenceSchema:Ht,CompleteRequestParamsSchema:Ut,CompleteRequestSchema:Wt,CompleteResultSchema:Gt,RootSchema:Kt,ListRootsRequestSchema:qt,ListRootsResultSchema:Jt,RootsListChangedNotificationSchema:Yt,TaskCreationParamsSchema:Xt,TaskStatusSchema:Zt,TaskSchema:Qt,CreateTaskResultSchema:$t,TaskStatusNotificationParamsSchema:en,TaskStatusNotificationSchema:tn,GetTaskRequestSchema:nn,GetTaskResultSchema:rn,GetTaskPayloadRequestSchema:an,GetTaskPayloadResultSchema:on,ListTasksRequestSchema:sn,ListTasksResultSchema:cn,CancelTaskRequestSchema:ln,CancelTaskResultSchema:f.merge(Qt),ClientRequestSchema:z([de,ce,Wt,ct,We,Ve,Te,De,je,Fe,Le,it,tt,nn,an,sn,ln]),ClientNotificationSchema:z([g,me,v,Yt,tn]),ClientResultSchema:z([m,bt,xt,Bt,Jt,rn,cn,$t]),ServerRequestSchema:z([de,yt,Lt,qt,nn,an,sn,ln]),ServerNotificationSchema:z([g,me,ut,ze,Ne,at,Ze,tn,zt]),ServerResultSchema:z([m,ue,Gt,C,He,Ee,Oe,Me,rt,nt,rn,cn,$t]),CallToolResultWireSchema:F().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of Ph)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(Fh).pipe(rt)}}var Lh;function Rh(){return Lh??=Ih()}function zh(e){return e.type!==`object`}var Bh=new Set([`const`,`enum`,`default`,`examples`]),Vh=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Hh(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Uh(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Hh(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&&Hh(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]=Bh.has(o)?s:Vh.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 Wh={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},Gh={"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},Kh={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},qh;function Jh(){if(qh)return qh;let e=Rh();return qh={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}},qh}function Yh(e){return Object.prototype.hasOwnProperty.call(Wh,e)}function Xh(e){return Object.prototype.hasOwnProperty.call(Gh,e)}function Zh(e){return Object.prototype.hasOwnProperty.call(Kh,e)}function Qh(e){return Zh(e)?Jh().resultSchemas[e]:void 0}function $h(e){return Yh(e)?Jh().requestSchemas[e]:void 0}function eg(e){return Xh(e)?Jh().notificationSchemas[e]:void 0}Object.keys(Wh),Object.keys(Gh);function tg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ng(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 rg={ok:!1,reason:`not-in-era`};function ig(e){return tg(e)&&tg(e.outputSchema)&&zh(e.outputSchema)}function ag(e){return e}var og={era:`2025-11-25`,hasRequestMethod:Yh,hasNotificationMethod:Xh,validateRequest:(e,t)=>ng($h(e),t),validateResult:(e,t)=>ng(Qh(e),t),validateNotification:(e,t)=>ng(eg(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>rg,validateInputResponse:()=>rg,samplingResultVariant:((e,t)=>{let n=Rh();return ng(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Nh(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&zh(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(tg(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:ag(e)}}return{kind:`complete`,result:ag(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>ig(e))?t:{...t,tools:n.map(e=>ig(e)?{...e,outputSchema:Uh(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function sg(){let e=xd(()=>z([j(),N(),P(),lu(),B(j(),e),I(e)])),t=B(j(),e),n=z([j(),N().int()]),r=j(),i=z([j(),N().int()]),a=V([`user`,`assistant`]),o=V([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=L({ttl:N().optional()}),l=L({taskId:j()}),u=R({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=L({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=L({_meta:u.optional()}),m=L({method:j(),params:p.loose().optional()}),h=L({src:j(),mimeType:j().optional(),sizes:I(j()).optional(),theme:V([`light`,`dark`]).optional()}),g=L({icons:I(h).optional()}),_=L({name:j(),title:j().optional()}),ee=_.extend({..._.shape,...g.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),te=Id(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ku(L({form:ku(L({applyDefaults:P().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=R({list:t.optional(),cancel:t.optional(),requests:R({sampling:R({createMessage:t.optional()}).optional(),elicitation:R({create:t.optional()}).optional()}).optional()}),re=R({list:t.optional(),cancel:t.optional(),requests:R({tools:R({call:t.optional()}).optional()}).optional()}),ie=L({experimental:B(j(),t).optional(),sampling:L({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:L({listChanged:P().optional()}).optional(),tasks:ne.optional(),extensions:B(j(),t).optional()}),ae=L({experimental:B(j(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:L({listChanged:P().optional()}).optional(),resources:L({subscribe:P().optional(),listChanged:P().optional()}).optional(),tools:L({listChanged:P().optional()}).optional(),tasks:re.optional(),extensions:B(j(),t).optional()}),oe=L({progress:N(),total:U(N()),message:U(j())}),se=L({...p.shape,...oe.shape,progressToken:n}),ce=m.extend({method:H(`notifications/progress`),params:se}),le=p.extend({level:o,logger:j().optional(),data:F()}),ue=m.extend({method:H(`notifications/message`),params:le}),v=L({uri:j(),mimeType:U(j()),_meta:B(j(),F()).optional()}),de=v.extend({text:j()}),fe=v.extend({blob:s}),pe=L({audience:I(a).optional(),priority:N().min(0).max(1).optional(),lastModified:Bd({offset:!0}).optional()}),me=L({..._.shape,...g.shape,uri:j(),description:U(j()),mimeType:U(j()),size:U(N()),annotations:pe.optional(),_meta:U(R({}))}),he=L({..._.shape,...g.shape,uriTemplate:j(),description:U(j()),mimeType:U(j()),annotations:pe.optional(),_meta:U(R({}))}),ge=m.extend({method:H(`notifications/resources/list_changed`),params:p.optional()}),_e=p.extend({uri:j()}),ve=m.extend({method:H(`notifications/resources/updated`),params:_e}),ye=L({name:j(),description:U(j()),required:U(P())}),be=L({..._.shape,...g.shape,description:U(j()),arguments:U(I(ye)),_meta:U(R({}))}),xe=m.extend({method:H(`notifications/prompts/list_changed`),params:p.optional()}),Se=L({type:H(`text`),text:j(),annotations:pe.optional(),_meta:B(j(),F()).optional()}),Ce=L({type:H(`image`),data:s,mimeType:j(),annotations:pe.optional(),_meta:B(j(),F()).optional()}),y=L({type:H(`audio`),data:s,mimeType:j(),annotations:pe.optional(),_meta:B(j(),F()).optional()}),we=L({type:H(`tool_use`),name:j(),id:j(),input:B(j(),F()),_meta:B(j(),F()).optional()}),Te=L({type:H(`resource`),resource:z([de,fe]),annotations:pe.optional(),_meta:B(j(),F()).optional()}),Ee=me.extend({type:H(`resource_link`)}),De=z([Se,Ce,y,Ee,Te]),Oe=L({role:a,content:De}),ke=L({title:j().optional(),readOnlyHint:P().optional(),destructiveHint:P().optional(),idempotentHint:P().optional(),openWorldHint:P().optional()}),Ae=m.extend({method:H(`notifications/tools/list_changed`),params:p.optional()}),je=L({name:j().optional()}),Me=L({hints:I(je).optional(),costPriority:N().min(0).max(1).optional(),speedPriority:N().min(0).max(1).optional(),intelligencePriority:N().min(0).max(1).optional()}),Ne=L({mode:V([`auto`,`required`,`none`]).optional()}),Pe=L({type:H(`boolean`),title:j().optional(),description:j().optional(),default:P().optional()}),Fe=L({type:H(`string`),title:j().optional(),description:j().optional(),minLength:N().optional(),maxLength:N().optional(),format:V([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),Ie=L({type:V([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:N().optional(),maximum:N().optional(),default:N().optional()}),Le=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),default:j().optional()}),Re=L({type:H(`string`),title:j().optional(),description:j().optional(),oneOf:I(L({const:j(),title:j()})),default:j().optional()}),ze=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),enumNames:I(j()).optional(),default:j().optional()}),Be=z([Le,Re]),b=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({type:H(`string`),enum:I(j())}),default:I(j()).optional()}),Ve=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({anyOf:I(L({const:j(),title:j()}))}),default:I(j()).optional()}),He=z([b,Ve]),Ue=z([ze,Be,He]),We=z([Ue,Pe,Fe,Ie]),Ge=f.extend({mode:H(`form`).optional(),message:j(),requestedSchema:L({type:H(`object`),properties:B(j(),We),required:I(j()).optional()}).catchall(F())}),Ke=L({type:H(`ref/resource`),uri:j()}),qe=L({type:H(`ref/prompt`),name:j()}),Je=L({uri:j().startsWith(`file://`),name:j().optional(),_meta:B(j(),F()).optional()}),x=ie.shape,Ye=L({experimental:x.experimental,sampling:x.sampling,elicitation:x.elicitation,roots:x.roots,extensions:x.extensions}),Xe=ae.shape,S=L({experimental:Xe.experimental,logging:Xe.logging,completions:Xe.completions,prompts:Xe.prompts,resources:Xe.resources,tools:Xe.tools,extensions:Xe.extensions}),C=R({progressToken:n.optional(),[af]:j(),[of]:ee.optional(),[cf]:Ye,[uf]:o.optional()}),Ze=L({..._.shape,...g.shape,description:j().optional(),inputSchema:R({$schema:j().optional(),type:H(`object`)}),outputSchema:R({$schema:j().optional()}).optional(),annotations:ke.optional(),_meta:B(j(),F()).optional()}),Qe=L({type:H(`tool_result`),toolUseId:j(),content:I(De),structuredContent:F().optional(),isError:P().optional(),_meta:B(j(),F()).optional()}),$e=z([Se,Ce,y,we,Qe]),et=L({role:a,content:z([$e,I($e)]),_meta:B(j(),F()).optional()}),tt=j(),nt=R({[sf]:ee.optional().catch(void 0)}),rt=nt.optional();function w(e){return R({_meta:rt,resultType:tt.default(`complete`),...e})}let it=w({}),at=w({nextCursor:r.optional()}),ot=w({content:I(De),structuredContent:F().optional(),isError:P().optional()}),st=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),tools:I(Ze),nextCursor:r.optional()}),ct=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),prompts:I(be),nextCursor:r.optional()}),lt=w({description:j().optional(),messages:I(Oe)}),ut=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resources:I(me),nextCursor:r.optional()}),dt=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resourceTemplates:I(he),nextCursor:r.optional()}),ft=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),contents:I(z([de,fe]))}),pt=w({completion:L({values:I(j()).max(100),total:N().int().optional(),hasMore:P().optional()}).loose()}),mt=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`])}),ht=w({ttlMs:N().int().min(0).catch(0),cacheScope:V([`public`,`private`]).catch(`private`),supportedVersions:I(j()),capabilities:S,instructions:j().optional()}),gt=L({messages:I(et),modelPreferences:Me.optional(),systemPrompt:j().optional(),includeContext:V([`none`,`thisServer`,`allServers`]).optional(),temperature:N().optional(),maxTokens:N().int(),stopSequences:I(j()).optional(),metadata:t.optional(),tools:I(Ze).optional(),toolChoice:Ne.optional()}),_t=L({method:H(`sampling/createMessage`),params:gt}),vt=L({method:H(`roots/list`),params:L({_meta:B(j(),F()).optional()}).optional()}),yt=L({...et.shape,model:j(),stopReason:j().optional()}),bt=L({roots:I(Je)}),xt=L({action:V([`accept`,`decline`,`cancel`]),content:B(j(),z([j(),N(),P(),I(j())])).optional()}),St=L({mode:H(`url`),message:j(),url:j().url()}),Ct=z([Ge,St]),wt=L({method:H(`elicitation/create`),params:Ct}),Tt=z([_t,vt,wt]),Et=z([yt,bt,xt]),Dt=B(j(),Tt),Ot=B(j(),Et),kt=w({inputRequests:Dt.optional(),requestState:j().optional()}),At={inputResponses:Ot.optional(),requestState:j().optional()},jt=L({_meta:C,...At}),Mt=R({progressToken:n.optional()});function Nt(e,t){return L({method:H(e),params:L({_meta:C,...t})})}function Pt(e,t){return L({method:H(e),params:L({_meta:Mt.optional(),...t}).optional()})}let Ft={name:j(),arguments:B(j(),F()).optional(),...At},It={cursor:r.optional()},Lt=Nt(`tools/call`,Ft),Rt=Nt(`tools/list`,It),zt=Nt(`prompts/list`,It),Bt=Nt(`prompts/get`,{name:j(),arguments:B(j(),j()).optional(),...At}),Vt=Nt(`resources/list`,It),Ht=Nt(`resources/templates/list`,It),Ut=Nt(`resources/read`,{uri:j(),...At}),Wt={ref:z([qe,Ke]),argument:L({name:j(),value:j()}),context:L({arguments:B(j(),j()).optional()}).optional()},Gt=Nt(`completion/complete`,Wt),Kt=Nt(`server/discover`,{}),qt=L({toolsListChanged:P().optional(),promptsListChanged:P().optional(),resourcesListChanged:P().optional(),resourceSubscriptions:I(j()).optional()}),Jt={notifications:qt},Yt=Nt(`subscriptions/listen`,Jt),Xt=nt.extend({"io.modelcontextprotocol/subscriptionId":i}),Zt=R({_meta:Xt,resultType:tt.default(`complete`)}),Qt={"tools/call":Pt(`tools/call`,Ft),"tools/list":Pt(`tools/list`,It),"prompts/get":Pt(`prompts/get`,{name:j(),arguments:B(j(),j()).optional()}),"prompts/list":Pt(`prompts/list`,It),"resources/list":Pt(`resources/list`,It),"resources/templates/list":Pt(`resources/templates/list`,It),"resources/read":Pt(`resources/read`,{uri:j()}),"completion/complete":Pt(`completion/complete`,Wt),"server/discover":Pt(`server/discover`,{}),"subscriptions/listen":Pt(`subscriptions/listen`,Jt)};function $t(e){return R({_meta:rt,...e})}let en={"tools/call":$t({content:I(De),structuredContent:F().optional(),isError:P().optional()}),"tools/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),tools:I(Ze),nextCursor:r.optional()}),"prompts/get":$t({description:j().optional(),messages:I(Oe)}),"prompts/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),prompts:I(be),nextCursor:r.optional()}),"resources/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resources:I(me),nextCursor:r.optional()}),"resources/templates/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resourceTemplates:I(he),nextCursor:r.optional()}),"resources/read":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),contents:I(z([de,fe]))}),"completion/complete":$t({completion:L({values:I(j()).max(100),total:N().int().optional(),hasMore:P().optional()}).loose()}),"server/discover":$t({ttlMs:N().int().min(0).catch(0),cacheScope:V([`public`,`private`]).catch(`private`),supportedVersions:I(j()),capabilities:S,instructions:j().optional()}),"subscriptions/listen":$t({})},tn=R({"io.modelcontextprotocol/subscriptionId":i.optional()}),nn=L({method:H(`notifications/subscriptions/acknowledged`),params:L({_meta:tn.optional(),notifications:qt})}),rn=L({_meta:tn.optional(),requestId:i,reason:j().optional()}),an=L({method:H(`notifications/cancelled`),params:rn}),on={"notifications/cancelled":an,"notifications/progress":ce,"notifications/message":ue,"notifications/resources/updated":ve,"notifications/resources/list_changed":ge,"notifications/tools/list_changed":Ae,"notifications/prompts/list_changed":xe,"notifications/subscriptions/acknowledged":nn},sn=e=>L({jsonrpc:H(`2.0`),id:z([j(),N().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:g,BaseMetadataSchema:_,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:ce,LoggingMessageNotificationParamsSchema:le,LoggingMessageNotificationSchema:ue,ResourceContentsSchema:v,TextResourceContentsSchema:de,BlobResourceContentsSchema:fe,AnnotationsSchema:pe,ResourceSchema:me,ResourceTemplateSchema:he,ResourceListChangedNotificationSchema:ge,ResourceUpdatedNotificationParamsSchema:_e,ResourceUpdatedNotificationSchema:ve,PromptArgumentSchema:ye,PromptSchema:be,PromptListChangedNotificationSchema:xe,TextContentSchema:Se,ImageContentSchema:Ce,AudioContentSchema:y,ToolUseContentSchema:we,EmbeddedResourceSchema:Te,ResourceLinkSchema:Ee,ContentBlockSchema:De,PromptMessageSchema:Oe,ToolAnnotationsSchema:ke,ToolListChangedNotificationSchema:Ae,ModelHintSchema:je,ModelPreferencesSchema:Me,ToolChoiceSchema:Ne,BooleanSchemaSchema:Pe,StringSchemaSchema:Fe,NumberSchemaSchema:Ie,UntitledSingleSelectEnumSchemaSchema:Le,TitledSingleSelectEnumSchemaSchema:Re,LegacyTitledEnumSchemaSchema:ze,SingleSelectEnumSchemaSchema:Be,UntitledMultiSelectEnumSchemaSchema:b,TitledMultiSelectEnumSchemaSchema:Ve,MultiSelectEnumSchemaSchema:He,EnumSchemaSchema:Ue,PrimitiveSchemaDefinitionSchema:We,ElicitRequestFormParamsSchema:Ge,ResourceTemplateReferenceSchema:Ke,PromptReferenceSchema:qe,RootSchema:Je,ClientCapabilities2026Schema:Ye,ServerCapabilities2026Schema:S,RequestMetaEnvelopeSchema:C,ToolSchema:Ze,ToolResultContentSchema:Qe,SamplingMessageContentBlockSchema:$e,SamplingMessageSchema:et,ResultTypeSchema:tt,ResultMetaSchema:nt,ResultSchema:it,PaginatedResultSchema:at,CallToolResultSchema:ot,ListToolsResultSchema:st,ListPromptsResultSchema:ct,GetPromptResultSchema:lt,ListResourcesResultSchema:ut,ListResourceTemplatesResultSchema:dt,ReadResourceResultSchema:ft,CompleteResultSchema:pt,CacheableResultSchema:mt,DiscoverResultSchema:ht,CreateMessageRequestParamsSchema:gt,CreateMessageRequestSchema:_t,ListRootsRequestSchema:vt,CreateMessageResultSchema:yt,ListRootsResultSchema:bt,ElicitResultSchema:xt,ElicitRequestURLParamsSchema:St,ElicitRequestParamsSchema:Ct,ElicitRequestSchema:wt,InputRequestSchema:Tt,InputResponseSchema:Et,InputRequestsSchema:Dt,InputResponsesSchema:Ot,InputRequiredResultSchema:kt,InputResponseRequestParamsSchema:jt,CallToolRequestSchema:Lt,ListToolsRequestSchema:Rt,ListPromptsRequestSchema:zt,GetPromptRequestSchema:Bt,ListResourcesRequestSchema:Vt,ListResourceTemplatesRequestSchema:Ht,ReadResourceRequestSchema:Ut,CompleteRequestSchema:Gt,DiscoverRequestSchema:Kt,SubscriptionFilterSchema:qt,SubscriptionsListenRequestSchema:Yt,SubscriptionsListenResultMetaSchema:Xt,SubscriptionsListenResultSchema:Zt,dispatchRequestSchemas:Qt,dispatchResultSchemas:en,NotificationMetaSchema:tn,SubscriptionsAcknowledgedNotificationSchema:nn,CancelledNotificationParamsSchema:rn,CancelledNotificationSchema:an,notificationSchemas2026:on,JSONRPCResultResponseSchema:sn(it),CallToolResultResponseSchema:sn(z([ot,kt])),ListToolsResultResponseSchema:sn(st),ListPromptsResultResponseSchema:sn(ct),GetPromptResultResponseSchema:sn(z([lt,kt])),ListResourcesResultResponseSchema:sn(ut),ListResourceTemplatesResultResponseSchema:sn(dt),ReadResourceResultResponseSchema:sn(z([ft,kt])),CompleteResultResponseSchema:sn(pt),DiscoverResultResponseSchema:sn(ht)}}var cg;function lg(){return cg??=sg()}var ug=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function dg(e){return ug.includes(e)}var fg=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function pg(e){return e[fg]}function mg(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function hg(e){return e===`public`||e===`private`}var X=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}({}),gg=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return kh(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 kh(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Oh(this,new.target)}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new vg(e.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new yg({supported:e.supported,requested:e.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===X.ResourceNotFound||Object.keys(e).length===1))return new _g(e.uri,n)}if(t===X.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new bg({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},_g=class extends gg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},vg=class extends gg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},yg=class extends gg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},bg=class extends gg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},xg=0,Sg=`private`,Cg=[`tools/call`,`prompts/get`,`resources/read`];function wg(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||Cg.includes(e))return t;throw new gg(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Tg(e,t){let n=pg(t);if(t.resultType!==`complete`||!dg(e))return n===void 0?t:Ag(t);let r=t,i=mg(r.ttlMs)?r.ttlMs:Og(n),a=hg(r.cacheScope)?r.cacheScope:kg(n),o={...r,ttlMs:i,cacheScope:a};return delete o[fg],o}function Eg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Dg(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[sf]:t}}:!Eg(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[sf]:t}}}function Og(e){return e!==void 0&&mg(e.ttlMs)?e.ttlMs:xg}function kg(e){return e!==void 0&&hg(e.cacheScope)?e.cacheScope:Sg}function Ag(e){let t={...e};return delete t[fg],t}var jg=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Mg;function Ng(){if(Mg)return Mg;let e=lg();return Mg={request:{"elicitation/create":L({method:H(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":L({method:H(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":L({method:H(`roots/list`),params:R({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Mg}function Pg(e){return jg.includes(e)}function Fg(e){return Pg(e)?Ng().request[e]:void 0}function Ig(e){return Pg(e)?Ng().response[e]:void 0}var Lg={"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},Rg={"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 zg(e){return Object.prototype.hasOwnProperty.call(Lg,e)}function Bg(e){return Object.prototype.hasOwnProperty.call(Rg,e)}function Vg(e){return Object.prototype.hasOwnProperty.call(Lg,e)}function Hg(e){return zg(e)?lg().dispatchRequestSchemas[e]:void 0}function Ug(e){return Vg(e)?lg().dispatchResultSchemas[e]:void 0}function Wg(e){return Bg(e)?lg().notificationSchemas2026[e]:void 0}Object.keys(Lg),Object.keys(Rg);function Gg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Kg(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 qg={ok:!1,reason:`not-in-era`},Jg=[af,cf];function Yg(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=>Gg(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Gg(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Gg(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Xg={era:`2026-07-28`,hasRequestMethod:zg,hasNotificationMethod:Bg,hasInputRequestMethod:e=>Fg(e)!==void 0,validateRequest:(e,t)=>Kg(Hg(e),t),validateResult:(e,t)=>Kg(Ug(e),t),validateNotification:(e,t)=>Kg(Wg(e),t),validateInputRequest:(e,t)=>Kg(Fg(e),t),validateInputResponse:(e,t)=>Kg(Ig(e),t),samplingResultVariant:()=>qg,outboundEnvelope(e){return{[af]:e.protocolVersion,[of]:e.clientInfo,[cf]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Jg)n in e||t.push({key:n,problem:`missing`});let n=lg().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=>Nh(e),inputRequestSchema:Fg,decodeResult(e,t){if(!Gg(t))return{kind:`invalid`,error:new Y(Ah.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Y(Ah.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 Y(Ah.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Gg(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Y(Ah.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 Y(Ah.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Qg(),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 Y(Ah.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 Dg(Tg(e,wg(e,Yg(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=lg().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(`; `)}`}},Zg;function Qg(){if(Zg)return Zg;let e=lg();return Zg={"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},Zg}var $g=`2026-07-28`;function e_(e){return e!==void 0&&Mh(e)?Xg:og}function t_(e){return e.revision===void 0?e.era===`modern`?Xg.era:og.era:e_(e.revision).era}function n_(e){return i_.some(t=>t.hasRequestMethod(e))}function r_(e){return i_.some(t=>t.hasNotificationMethod(e))}var i_=[og,Xg],a_=i({AnnotationsSchema:()=>op,AudioContentSchema:()=>zp,BaseMetadataSchema:()=>Ff,BaseRequestParamsSchema:()=>vf,BlobResourceContentsSchema:()=>ip,BooleanSchemaSchema:()=>bm,CallToolRequestParamsSchema:()=>em,CallToolRequestSchema:()=>tm,CallToolResultSchema:()=>Qp,CancelTaskRequestSchema:()=>oh,CancelTaskResultSchema:()=>sh,CancelledNotificationParamsSchema:()=>jf,CancelledNotificationSchema:()=>Mf,ClientCapabilitiesSchema:()=>Bf,ClientNotificationSchema:()=>lh,ClientRequestSchema:()=>ch,ClientResultSchema:()=>uh,ClientTasksCapabilitySchema:()=>Rf,CompatibilityCallToolResultSchema:()=>$p,CompleteRequestParamsSchema:()=>Vm,CompleteRequestSchema:()=>Hm,CompleteResultSchema:()=>Um,ContentBlockSchema:()=>Up,CreateMessageRequestParamsSchema:()=>gm,CreateMessageRequestSchema:()=>_m,CreateMessageResultSchema:()=>vm,CreateMessageResultWithToolsSchema:()=>ym,CreateTaskResultSchema:()=>Zm,CursorSchema:()=>mf,DiscoverRequestSchema:()=>Kf,DiscoverResultSchema:()=>qf,ElicitRequestFormParamsSchema:()=>Mm,ElicitRequestParamsSchema:()=>Pm,ElicitRequestSchema:()=>Fm,ElicitRequestURLParamsSchema:()=>Nm,ElicitResultSchema:()=>Rm,ElicitationCompleteNotificationParamsSchema:()=>Im,ElicitationCompleteNotificationSchema:()=>Lm,EmbeddedResourceSchema:()=>Vp,EmptyResultSchema:()=>Af,EnumSchemaSchema:()=>Am,GetPromptRequestParamsSchema:()=>Fp,GetPromptRequestSchema:()=>Ip,GetPromptResultSchema:()=>Gp,GetTaskPayloadRequestSchema:()=>nh,GetTaskPayloadResultSchema:()=>rh,GetTaskRequestSchema:()=>eh,GetTaskResultSchema:()=>th,IconSchema:()=>Nf,IconsSchema:()=>Pf,ImageContentSchema:()=>Rp,ImplementationSchema:()=>If,InitializeRequestParamsSchema:()=>Vf,InitializeRequestSchema:()=>Hf,InitializeResultSchema:()=>Wf,InitializedNotificationSchema:()=>Gf,JSONArraySchema:()=>ff,JSONObjectSchema:()=>G,JSONRPCErrorResponseSchema:()=>Df,JSONRPCMessageSchema:()=>Of,JSONRPCNotificationSchema:()=>Tf,JSONRPCRequestSchema:()=>wf,JSONRPCResponseSchema:()=>kf,JSONRPCResultResponseSchema:()=>Ef,JSONValueSchema:()=>df,LegacyTitledEnumSchemaSchema:()=>Tm,ListChangedOptionsBaseSchema:()=>rm,ListPromptsRequestSchema:()=>Np,ListPromptsResultSchema:()=>Pp,ListResourceTemplatesRequestSchema:()=>dp,ListResourceTemplatesResultSchema:()=>fp,ListResourcesRequestSchema:()=>lp,ListResourcesResultSchema:()=>up,ListRootsRequestSchema:()=>Gm,ListRootsResultSchema:()=>Km,ListTasksRequestSchema:()=>ih,ListTasksResultSchema:()=>ah,ListToolsRequestSchema:()=>Xp,ListToolsResultSchema:()=>Zp,LoggingLevelSchema:()=>im,LoggingMessageNotificationParamsSchema:()=>sm,LoggingMessageNotificationSchema:()=>cm,ModelHintSchema:()=>lm,ModelPreferencesSchema:()=>um,MultiSelectEnumSchemaSchema:()=>km,NotificationSchema:()=>xf,NotificationsParamsSchema:()=>bf,NumberSchemaSchema:()=>Sm,PaginatedRequestParamsSchema:()=>Qf,PaginatedRequestSchema:()=>$f,PaginatedResultSchema:()=>ep,PingRequestSchema:()=>Jf,PrimitiveSchemaDefinitionSchema:()=>jm,ProgressNotificationParamsSchema:()=>Xf,ProgressNotificationSchema:()=>Zf,ProgressSchema:()=>Yf,ProgressTokenSchema:()=>pf,PromptArgumentSchema:()=>jp,PromptListChangedNotificationSchema:()=>Kp,PromptMessageSchema:()=>Wp,PromptReferenceSchema:()=>Bm,PromptSchema:()=>Mp,ReadResourceRequestParamsSchema:()=>mp,ReadResourceRequestSchema:()=>hp,ReadResourceResultSchema:()=>gp,RelatedTaskMetadataSchema:()=>gf,RequestIdSchema:()=>Cf,RequestMetaSchema:()=>_f,RequestSchema:()=>K,ResourceContentsSchema:()=>tp,ResourceLinkSchema:()=>Hp,ResourceListChangedNotificationSchema:()=>_p,ResourceRequestParamsSchema:()=>pp,ResourceSchema:()=>sp,ResourceTemplateReferenceSchema:()=>zm,ResourceTemplateSchema:()=>cp,ResourceUpdatedNotificationParamsSchema:()=>kp,ResourceUpdatedNotificationSchema:()=>Ap,ResultMetaObjectSchema:()=>Sf,ResultSchema:()=>q,RoleSchema:()=>ap,RootSchema:()=>Wm,RootsListChangedNotificationSchema:()=>qm,SamplingContentSchema:()=>pm,SamplingMessageContentBlockSchema:()=>mm,SamplingMessageSchema:()=>hm,ServerCapabilitiesSchema:()=>Uf,ServerNotificationSchema:()=>fh,ServerRequestSchema:()=>dh,ServerResultSchema:()=>ph,ServerTasksCapabilitySchema:()=>zf,SetLevelRequestParamsSchema:()=>am,SetLevelRequestSchema:()=>om,SingleSelectEnumSchemaSchema:()=>Em,StringSchemaSchema:()=>xm,SubscribeRequestParamsSchema:()=>vp,SubscribeRequestSchema:()=>yp,SubscriptionFilterSchema:()=>Sp,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Tp,SubscriptionsAcknowledgedNotificationSchema:()=>Ep,SubscriptionsListenRequestParamsSchema:()=>Cp,SubscriptionsListenRequestSchema:()=>wp,SubscriptionsListenResultMetaSchema:()=>Dp,SubscriptionsListenResultSchema:()=>Op,TaskAugmentedRequestParamsSchema:()=>yf,TaskCreationParamsSchema:()=>Jm,TaskMetadataSchema:()=>hf,TaskSchema:()=>Xm,TaskStatusNotificationParamsSchema:()=>Qm,TaskStatusNotificationSchema:()=>$m,TaskStatusSchema:()=>Ym,TextContentSchema:()=>Lp,TextResourceContentsSchema:()=>np,TitledMultiSelectEnumSchemaSchema:()=>Om,TitledSingleSelectEnumSchemaSchema:()=>wm,ToolAnnotationsSchema:()=>qp,ToolChoiceSchema:()=>dm,ToolExecutionSchema:()=>Jp,ToolListChangedNotificationSchema:()=>nm,ToolResultContentSchema:()=>fm,ToolSchema:()=>Yp,ToolUseContentSchema:()=>Bp,UnsubscribeRequestParamsSchema:()=>bp,UnsubscribeRequestSchema:()=>xp,UntitledMultiSelectEnumSchemaSchema:()=>Dm,UntitledSingleSelectEnumSchemaSchema:()=>Cm}),o_=e=>wf.safeParse(e).success,s_=e=>Tf.safeParse(e).success,c_=e=>Ef.safeParse(e).success,l_=e=>Df.safeParse(e).success;X.InvalidRequest,X.UnsupportedProtocolVersion,X.InvalidParams,X.MethodNotFound,X.InvalidParams,X.MissingRequiredClientCapability,X.ParseError,X.InvalidRequest,X.MethodNotFound,X.UnsupportedProtocolVersion,X.MissingRequiredClientCapability;function u_(e,t){return kc(e,t)}function d_(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function f_(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 p_=!1,m_=`draft-2020-12`;function h_(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:m_});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().`);p_||(p_=!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=Sc(e,{target:m_,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&&g_(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 g_(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`||g_(e)))}return!1}function __(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function v_(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>__(e)).join(`, `)}:{success:!0,data:n.value}}function y_(e){let t=Sc(e,{target:m_,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var b_=/\\\.\\d\{(\d+)\}/;function x_(e){let t=b_.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=>Bd({local:e,offset:t,precision:n}))))}function S_(e,t){let n;switch(e){case`email`:n=[Yc()];break;case`uri`:n=[il()];break;case`date`:n=[Vd()];break;case`date-time`:n=x_(t)}return new Set(n.map(e=>y_(e)).filter(e=>e!==void 0))}function C_(e,t,n){return n!==`zod`||S_(e,t).has(t)}function w_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function T_(e){try{return h_(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new gg(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var E_=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function D_(e){return E_.has(e)||e.startsWith(`x-`)}var O_=new Set([`$schema`,...Object.keys(Mm.shape.requestedSchema.shape)]),k_={string:d_([xm,Cm,wm,Tm]),number:d_([Sm]),integer:d_([Sm]),boolean:d_([bm]),array:d_([Dm,Om])},A_=new Set(xm.shape.format.unwrap().options);function j_(e,t,n,r){if(!w_(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(k_,e.type)?k_[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||D_(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?A_.has(e.format)?(typeof s!=`string`||!C_(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function M_(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&w_(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,j_(n,`properties.${e}`,t,r)])):O_.has(i)?n[i]=a:D_(i)||r.push(i);if(r.length>0)throw new gg(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function N_(e,t){if(!w_(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!u_(jm,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function P_(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>P_(e,t[r],`${n}[${r}]`)):!w_(e)||!w_(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?P_(r,t[e],i):D_(e)?[]:[i]})}function F_(e){if(!f_(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=M_(T_(e.requestedSchema),t),r=u_(Mm.shape.requestedSchema,n);if(!r.success)throw new gg(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${N_(n,r.error.message)}`);let i=P_(n,r.data);if(i.length>0)throw new gg(X.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 gg(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function I_(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(I_,{elicit(e){try{return{method:`elicitation/create`,params:F_(e)}}catch(e){throw e instanceof gg?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 L_=`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(`.`),R_={IdJagTokenExchangeResponseSchema:yh,OAuthClientInformationFullSchema:wh,OAuthClientInformationSchema:Ch,OAuthClientMetadataSchema:Sh,OAuthClientRegistrationErrorSchema:Th,OAuthErrorResponseSchema:bh,OAuthMetadataSchema:hh,OAuthProtectedResourceMetadataSchema:mh,OAuthTokenRevocationRequestSchema:Eh,OAuthTokensSchema:vh,OpenIdProviderDiscoveryMetadataSchema:_h,OpenIdProviderMetadataSchema:gh},z_={},B_={};function V_(e,t){let n=e.slice(0,-6);z_[n]=t,B_[n]=e=>t.safeParse(e).success}for(let e of L_)V_(e,a_[e]);for(let[e,t]of Object.entries(R_))V_(e,t);Object.freeze(z_),Object.freeze(B_);function H_(e){switch(e){case`initialize`:case`notifications/initialized`:return e_(void 0);case`server/discover`:return e_($g);default:return}}var U_=[af,of,cf,uf],W_=[`inputResponses`,`requestState`];function G_(e,t){let n=e.params;if(!X_(n))return{message:e,lifted:{}};let r=n._meta,i=X_(r)?U_.filter(e=>e in r):[],a=t===`request`?W_.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&X_(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 K_(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 q_(e){return()=>e}var J_=q_(void 0),Y_=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??nf,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 Y(Ah.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 Y(Ah.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),c_(e)||l_(e)?this._onresponse(e):o_(e)?this._onrequest(e,t):s_(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 Y(Ah.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}=G_(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=t_(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(r_(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}=G_(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=t_(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(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(n_(n.method)&&!i.hasRequestMethod(n.method)){o(X.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(X.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(X.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:Q_(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?J_:q_(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),f_(t))return u(e,t,n);let i=K_(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(X.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:X.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),c_(e)?n(e):n(gg.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),f_(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=K_(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 e_(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=H_(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(n_(t)&&!e.hasRequestMethod(t))throw new Y(Ah.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 Y?e:new Y(Ah.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),ee=!1,te=e=>{ee||(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 Y?e:new Y(Ah.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(ee=!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($_(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;v_(n,o).then(e=>{e.success?d(e.data):f(new Y(Ah.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>te(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ne=r?.timeout??6e4;this._setupTimeout(h,ne,r?.maxTotalTimeout,()=>te(new Y(Ah.RequestTimeout,`Request timed out`,{timeout:ne})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{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 Y(Ah.NotConnected,`Not connected`);if(r_(t.method)&&!e.hasNotificationMethod(t.method))throw new Y(Ah.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(!n_(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 gg(X.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 v_(t.params,{...r.params});if(!a.success)throw new gg(X.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(!r_(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 gg(X.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 v_(t.params,{...r.params});if(!i.success)throw new gg(X.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function X_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Z_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Q_(e){let t={},n=[];if(!Z_(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!Z_(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function $_(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 ev=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,tv=/^(?=.{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,nv=/^(?:[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,rv=/^(?:(?:[^\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,iv=/^(?:(?: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,av=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ov=/^(?:\/(?:[^~/]|~0|~1)*)*$/,sv=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,cv=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,lv=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,uv=/^((([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 dv(e){return e.test.bind(e)}fv.bind(void 0,!1),dv(nv),dv(rv),dv(iv),dv(tv),dv(lv),dv(uv),dv(av),dv(ov),dv(sv),dv(cv);function fv(e,t){let n=t.match(ev);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 pv=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return kh(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 kh(this,e)}constructor(e){super(e),this.name=new.target.name,Oh(this,new.target)}};(class extends pv{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 pv{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 pv{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 pv{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 pv{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 kh(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 kh(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Oh(this,new.target)}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return kh(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 kh(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Oh(this,new.target)}};var mv=`2026-01-26`,hv=L({}).passthrough(),gv=L({arguments:B(j(),F()).optional()}).passthrough(),_v=L({reason:j().optional()}).passthrough(),vv=L({theme:V([`light`,`dark`]).optional(),displayMode:V([`inline`,`fullscreen`,`pip`]).optional(),availableDisplayModes:I(V([`inline`,`fullscreen`,`pip`])).optional(),styles:L({variables:B(j(),z([j(),su()])).optional(),css:L({fonts:j().optional()}).passthrough().optional()}).passthrough().optional(),safeAreaInsets:L({top:N(),right:N(),bottom:N(),left:N()}).optional()}).passthrough(),yv=L({protocolVersion:j(),hostInfo:L({name:j(),version:j()}).passthrough(),hostCapabilities:B(j(),F()),hostContext:vv}).passthrough(),bv=L({mode:V([`inline`,`fullscreen`,`pip`])}).passthrough(),xv=L({}).passthrough(),Sv=class{eventTarget;eventSource;onclose;onerror;onmessage;sessionId;setProtocolVersion;setSupportedProtocolVersions;started=!1;messageListener=e=>{if(e.source!==this.eventSource)return;let t=Of.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?.())}},Cv=class extends Y_{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:hv,result:xv},()=>({})),this.setNotificationHandler(`ui/notifications/tool-input`,{params:gv},e=>this.ontoolinput?.(e)),this.setNotificationHandler(`ui/notifications/tool-result`,{params:Qp},e=>this.ontoolresult?.(e)),this.setNotificationHandler(`ui/notifications/tool-cancelled`,{params:_v},e=>this.ontoolcancelled?.(e)),this.setNotificationHandler(`ui/notifications/host-context-changed`,{params:vv},e=>{this.hostContext={...this.hostContext,...e},this.onhostcontextchanged?.(e)}),this.setRequestHandler(`ui/resource-teardown`,{params:hv,result:xv},(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},Qp,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async requestDisplayMode(e,t){return this.request({method:`ui/request-display-mode`,params:e},bv,t)}async connect(e=new Sv,t){await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this.capabilities,appInfo:this.appInfo,protocolVersion:mv}},yv,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 wv(e){document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e}function Tv(e,t=document.documentElement){for(let[n,r]of Object.entries(e))n.startsWith(`--`)&&r!==void 0&&t.style.setProperty(n,r)}function Ev(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 Dv={name:`qyl-mcp-server`,version:`2.1.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.4.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.5.0`},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`}},Ov={$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"}}`)};function kv(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema root must be an object`);let t=e,n=Mv(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=Av(t,a),r={};if(n.length>0){let e;for(let t of n){let n=Nv(r.properties),i=Nv(t.properties),a=Pv(r.required),o=Pv(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={...Nv(r.properties),...c(t.properties)};let i=[...new Set([...Pv(r.required),...Pv(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),r},s=e=>Array.isArray(e)?e.map(s):typeof e==`object`&&e?o(e):e,c=e=>{let t=Nv(e);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,s(t)]))},l=e=>!Fv(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 Av(e,t){if(e.type!==`object`||!Array.isArray(e.allOf))return[];let n=e.allOf.map(e=>jv(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 jv(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 Mv(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema ${t} must be an object`);return e}function Nv(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function Pv(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?e:[]}function Fv(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 Iv=kv(Ov),Lv=Mv(Iv.$defs,`$defs`),Rv=new Map;function Z(e){let t=Rv.get(e);if(t)return t;if(!Object.hasOwn(Lv,e))throw Error(`Published Qyl JSON Schema has no '${e}' definition`);let n=ef({$schema:Iv.$schema,$defs:Lv,$ref:`#/$defs/${e}`});return Rv.set(e,n),n}Object.freeze(Object.keys(Lv).sort()),typeof Ov.$id==`string`&&Ov.$id;function Q(e){return Z(`Workbench.${e}`)}Z(`OTel.Traces.Span`),Z(`OTel.Traces.TraceSummary`),Z(`OTel.Traces.Trace`),Z(`OTel.Logs.LogRecord`),Z(`Domains.Observe.Session.SessionEntity`),Z(`Operations.TracesApi_list.Response.200`),Z(`Operations.TracesApi_getSpans.Response.200`),Z(`Operations.SessionsApi_getTraces.Response.200`),Z(`Operations.LogsApi_list.Response.200`),Z(`Operations.SessionsApi_list.Response.200`),Z(`Common.Errors.ProblemDetails`),Z(`Mcp.Tools.McpDataMode`),Z(`Mcp.Tools.McpDashboardStats`),Z(`Mcp.Tools.DisplayTracesInput`),Z(`Mcp.Tools.DisplayTracesOutput`),Z(`Mcp.Tools.DisplayMcpDashboardInput`);var zv=Z(`Mcp.Tools.DisplayMcpDashboardOutput`);Z(`Mcp.Tools.ListTracesInput`),Z(`Mcp.Tools.ListTracesOutput`),Z(`Mcp.Tools.GetTraceInput`),Z(`Mcp.Tools.GetTraceOutput`),Z(`Mcp.Tools.ListSessionsInput`),Z(`Mcp.Tools.ListSessionsOutput`),Z(`Mcp.Tools.SearchLogsInput`),Z(`Mcp.Tools.SearchLogsOutput`),Z(`Mcp.Tools.FetchTelemetryInput`);var Bv=Z(`Mcp.Tools.FetchTelemetryOutput`);Z(`Mcp.Tools.CiLogInput`),Z(`Mcp.Tools.CiRunSummary`),Z(`Mcp.Tools.CiPhase`),Z(`Mcp.Tools.CiLogOutput`),Z(`Workflow.WorkflowRun`),Z(`Operations.WorkflowRunsApi_list.Response.200`),Z(`Operations.WorkflowRunsApi_readEvents.Response.200`),Z(`Operations.WorkflowRunsApi_getGraph.Response.200`),Z(`Operations.WorkflowRunsApi_getContent.Response.200`),Z(`Operations.WorkflowRunsApi_submitControl.Response.200`),Z(`Mcp.Tools.ListWorkflowRunsInput`),Z(`Mcp.Tools.ListWorkflowRunsOutput`),Z(`Mcp.Tools.GetWorkflowGraphInput`),Z(`Mcp.Tools.GetWorkflowGraphOutput`),Z(`Mcp.Tools.DisplayWorkflowGraphInput`),Z(`Mcp.Tools.DisplayWorkflowGraphOutput`),Z(`Mcp.Tools.FetchWorkflowGraphUpdatesInput`),Z(`Mcp.Tools.FetchWorkflowGraphUpdatesOutput`),Z(`Mcp.Tools.InspectWorkflowEventsInput`),Z(`Mcp.Tools.InspectWorkflowEventsOutput`),Z(`Mcp.Tools.ControlWorkflowRunInput`),Z(`Mcp.Tools.ControlWorkflowRunOutput`),Z(`Runner.RunnerResourceState`),Z(`Runner.RunnerLogLine`),Q(`WorkbenchSessionId`),Q(`WorkbenchWorkspaceId`),Q(`WorkbenchServerId`),Q(`WorkbenchExecutionId`),Q(`WorkbenchEvaluationRunId`),Q(`WorkbenchTestCaseId`),Q(`WorkbenchSuiteId`),Q(`WorkbenchEvaluationExportId`),Q(`WorkbenchPrincipalIdentity`),Q(`WorkbenchSession`),Q(`WorkbenchSessionBootstrapResponse`),Q(`WorkbenchWorkspace`),Q(`WorkbenchWorkspaceCreateRequest`),Q(`WorkbenchWorkspaceUpdateRequest`),Q(`WorkbenchWorkspaceListResponse`),Q(`WorkbenchToolInputMode`),Q(`WorkbenchWorkspacePreferences`),Q(`WorkbenchWorkspacePreferencesUpdateRequest`),Q(`WorkbenchTransportKind`),Q(`WorkbenchHeaderSecretScheme`),Q(`WorkbenchSecretReference`),Q(`WorkbenchEnvironmentSecretReference`),Q(`WorkbenchHeaderSecretReference`),Q(`WorkbenchStdioServerConfiguration`),Q(`WorkbenchStreamableHttpServerConfiguration`),Q(`WorkbenchBuiltinServerConfiguration`),Q(`WorkbenchServerConfiguration`),Q(`WorkbenchErrorCategory`),Q(`WorkbenchError`),Q(`WorkbenchInitializationSnapshot`),Q(`WorkbenchConnectionStatus`),Q(`WorkbenchConnectionSnapshot`),Q(`WorkbenchServer`),Q(`WorkbenchServerCreateRequest`),Q(`WorkbenchServerUpdateRequest`),Q(`WorkbenchServerListResponse`),Q(`WorkbenchServerActionAccepted`),Q(`WorkbenchDiscoveryCollection`),Q(`WorkbenchDiscoverySnapshot`),Q(`WorkbenchProtocolDirection`),Q(`WorkbenchProtocolEventKind`),Q(`WorkbenchProtocolEvent`),Q(`WorkbenchProtocolEventPage`),Q(`WorkbenchProtocolEvents`),Q(`WorkbenchExecutionEffect`),Q(`WorkbenchExecutionStatus`),Q(`WorkbenchExecutionConfirmationRequest`),Q(`WorkbenchExecutionConfirmationEvidence`),Q(`WorkbenchExecutionRequest`),Q(`WorkbenchExecutionTokenUsage`),Q(`WorkbenchExecutionCost`),Q(`WorkbenchTelemetryCorrelation`),Q(`WorkbenchExecutionUpdateEvents`),Q(`WorkbenchExecutionRecord`),Q(`WorkbenchExecutionAccepted`),Q(`WorkbenchExecutionCancelRequest`),Q(`WorkbenchExecutionPage`),Q(`WorkbenchTelemetryAvailability`),Q(`WorkbenchTelemetrySignalAvailability`),Q(`WorkbenchTelemetrySignalSummary`),Q(`WorkbenchExecutionTelemetryResponse`),Q(`WorkbenchAssertionStatus`),Q(`WorkbenchStatusAssertion`),Q(`WorkbenchExactAssertion`),Q(`WorkbenchPartialAssertion`),Q(`WorkbenchSchemaAssertion`),Q(`WorkbenchPatternAssertion`),Q(`WorkbenchLatencyAssertion`),Q(`WorkbenchTestAssertion`),Q(`WorkbenchTestCase`),Q(`WorkbenchTestCaseCreateRequest`),Q(`WorkbenchTestCaseUpdateRequest`),Q(`WorkbenchTestCasePage`),Q(`WorkbenchTestSuite`),Q(`WorkbenchTestSuiteCreateRequest`),Q(`WorkbenchTestSuiteUpdateRequest`),Q(`WorkbenchTestSuitePage`),Q(`WorkbenchEvaluationResultStatus`),Q(`WorkbenchEvaluationRunStatus`),Q(`WorkbenchRegressionStatus`),Q(`WorkbenchEvaluationRunRequest`),Q(`WorkbenchTestCaseRunRequest`),Q(`WorkbenchSuiteRunRequest`),Q(`WorkbenchAssertionResult`),Q(`WorkbenchEvaluationTestCaseSnapshot`),Q(`WorkbenchEvaluationSuiteSnapshot`),Q(`WorkbenchEvaluationTestResult`),Q(`WorkbenchEvaluationSummary`),Q(`WorkbenchEvaluationRun`),Q(`WorkbenchEvaluationRunAccepted`),Q(`WorkbenchEvaluationRunPage`),Q(`WorkbenchEvaluationComparisonRequest`),Q(`WorkbenchEvaluationTestComparison`),Q(`WorkbenchEvaluationRunComparison`),Q(`WorkbenchEvaluationExportFormat`),Q(`WorkbenchEvaluationExportStatus`),Q(`WorkbenchEvaluationExportRequest`),Q(`WorkbenchEvaluationExport`),Q(`WorkbenchEvaluationJsonExportPayload`),Q(`WorkbenchEvaluationReportExportPayload`),Q(`WorkbenchEvaluationExportPayload`),Q(`WorkbenchEvaluationExportArtifact`),Q(`WorkbenchEvaluationExportAccepted`),Z(`Common.Errors.UnauthorizedError`),Z(`Common.Errors.ForbiddenError`),Z(`Common.Errors.NotFoundError`),Z(`Common.Errors.ValidationError`),Z(`Common.Errors.ConflictError`),Z(`Common.Errors.BadGatewayError`),Z(`Common.Errors.ServiceUnavailableError`),Z(`Common.Errors.InternalServerError`);var Vv=[1,24,168],$={mode:void 0,stats:void 0,hours:24,requestSeq:0,toolsSort:{key:`requests`,dir:-1}},Hv=document.querySelector(`.main`),Uv=document.getElementById(`demo-badge`),Wv=document.getElementById(`analyzed-label`),Gv=document.getElementById(`refresh-btn`),Kv=document.getElementById(`empty-refresh-btn`),qv=document.getElementById(`retry-btn`),Jv=document.getElementById(`banner`),Yv=document.getElementById(`truncation-note`),Xv=document.getElementById(`state-loading`),Zv=document.getElementById(`loading-text`),Qv=document.getElementById(`state-empty`),$v=document.getElementById(`state-error`),ey=document.getElementById(`error-message`),ty=document.getElementById(`dashboard`),ny=document.getElementById(`traffic-chart`),ry=document.getElementById(`traffic-tip`),iy=document.getElementById(`by-server`),ay=document.getElementById(`by-transport`),oy=document.getElementById(`most-used`),sy=document.getElementById(`slowest`),cy=document.getElementById(`most-failing`),ly=document.getElementById(`tools-table`),uy=Array.from(document.querySelectorAll(`.win-btn`));function dy(e){return e>=100?String(Math.round(e)):(e>=10?e.toFixed(1):e.toFixed(2)).replace(/\.?0+$/,``)}function fy(e){if(!Number.isFinite(e))return`—`;if(e<1e3)return String(e);for(let[t,n]of[[1e9,`B`],[1e6,`M`],[1e3,`K`]])if(e>=t){let r=e/t;return`${r>=100?Math.round(r).toString():r.toFixed(1).replace(/\.0$/,``)}${n}`}return String(e)}function py(e){return!Number.isFinite(e)||e<0?`—`:e>=1e3?`${dy(e/1e3)} s`:e>=1?`${dy(e)} ms`:`${e.toFixed(2)} ms`}function my(e){if(!Number.isFinite(e)||e<0)return`—`;let t=e*100;return t===0?`0%`:t<.1?`<0.1%`:t<10?`${t.toFixed(1).replace(/\.0$/,``)}%`:`${Math.round(t)}%`}function hy(e){return String(e).padStart(2,`0`)}function gy(e,t){let n=new Date(e);if(Number.isNaN(n.getTime()))return`—`;let r=`${hy(n.getHours())}:${hy(n.getMinutes())}`;return t<=48?r:`${n.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${r}`}function _y(e){return e.content?.map(e=>`text`in e?e.text:``).filter(Boolean).join(` `)||void 0}function vy(e){let t=zv.safeParse(e.structuredContent);if(t.success)return t.data.stats;let n=Bv.safeParse(e.structuredContent);return n.success&&n.data.stats!==void 0?n.data.stats:null}function yy(e){Xv.hidden=e!==`loading`,Qv.hidden=e!==`empty`,$v.hidden=e!==`error`,ty.hidden=e!==`dashboard`}function by(e){ey.textContent=e,yy(`error`)}var xy;function Sy(e){Jv.textContent=e,Jv.hidden=!1,xy&&clearTimeout(xy),xy=setTimeout(()=>{Jv.hidden=!0},6e3)}function Cy(){Uv.hidden=$.mode!==`demo`;let e=$.stats;Wv.textContent=e?`analyzed ${e.span_count_analyzed.toLocaleString()} span${e.span_count_analyzed===1?``:`s`}`:``,Yv.hidden=!e?.truncated;for(let e of uy){let t=Number(e.dataset.hours)===$.hours;e.classList.toggle(`active`,t),e.setAttribute(`aria-pressed`,String(t))}}var wy=`http://www.w3.org/2000/svg`;function Ty(e,t={},n){let r=document.createElementNS(wy,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,n);return n&&r.setAttribute(`class`,n),r}function Ey(e){if(!(e>0))return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function Dy(e,t,n,r){let i=Math.min(4,n/2,r),a=e+n;return`M${e.toFixed(2)},${(t+r).toFixed(2)} L${e.toFixed(2)},${(t+i).toFixed(2)} Q${e.toFixed(2)},${t.toFixed(2)} ${(e+i).toFixed(2)},${t.toFixed(2)} L${(a-i).toFixed(2)},${t.toFixed(2)} Q${a.toFixed(2)},${t.toFixed(2)} ${a.toFixed(2)},${(t+i).toFixed(2)} L${a.toFixed(2)},${(t+r).toFixed(2)} Z`}function Oy(e){let t=new Date(e.window.start).getTime(),n=new Date(e.window.end).getTime();return Number.isFinite(t)&&Number.isFinite(n)&&n>t?(n-t)/36e5:$.hours}function ky(e){return e.requests>0?e.errors/e.requests:0}function Ay(){ry.hidden=!0}function jy(e,t,n,r){let i=document.createElement(`div`);i.className=`tip-title`,i.textContent=gy(e.start,t);let a=document.createDocumentFragment(),o=(e,t,n)=>{let r=document.createElement(`div`);r.className=`tip-row`;let i=document.createElement(`span`);i.className=e?`tip-key ${e}`:`tip-key`,r.appendChild(i);let o=document.createElement(`span`);o.className=`tip-value`,o.textContent=t,r.appendChild(o);let s=document.createElement(`span`);s.className=`tip-label`,s.textContent=n,r.appendChild(s),a.appendChild(r)};o(`ok`,fy(Math.max(0,e.requests-e.errors)),`ok`),o(`err`,fy(e.errors),`errors`),o(`err`,my(ky(e)),`error rate`),ry.replaceChildren(i,a),ry.hidden=!1;let s=ry.parentElement.getBoundingClientRect(),c=ry.offsetWidth,l=ry.offsetHeight,u=n-s.left+12;u+c>s.width-4&&(u=n-s.left-c-12);let d=r-s.top-l-8;d<0&&(d=r-s.top+12),ry.style.left=`${Math.max(0,u)}px`,ry.style.top=`${Math.max(0,d)}px`}function My(){let e=$.stats;if(Ay(),ny.replaceChildren(),!e||e.buckets.length===0){let e=document.createElement(`div`);e.className=`chart-empty`,e.textContent=`No traffic in this window.`,ny.appendChild(e);return}let t=e.buckets,n=Oy(e),r=Math.max(300,Math.floor(ny.clientWidth)||560),i=r-38-44,a=t.length,o=i/a,s=Math.min(24,Math.max(2,o-2)),c=Ey(Math.max(...t.map(e=>e.requests))),l=Math.max(...t.map(e=>ky(e)*100)),u=Math.min(100,Ey(Math.max(l,1))),d=Ty(`svg`,{width:String(r),height:`200`,viewBox:`0 0 ${r} 200`,role:`img`});d.setAttribute(`aria-label`,`MCP traffic: ${e.totals.requests} requests, ${e.totals.errors} errors (${my(e.totals.error_rate)}) across ${a} buckets`);for(let e of[.5,1]){let t=180-172*e;d.appendChild(Ty(`line`,{x1:`38`,y1:t.toFixed(2),x2:String(38+i),y2:t.toFixed(2)},`grid-line`));let n=Ty(`text`,{x:`33`,y:(t+3).toFixed(2),"text-anchor":`end`},`tick-label`);n.textContent=fy(c*e),d.appendChild(n)}d.appendChild(Ty(`line`,{x1:`38`,y1:`180`,x2:String(38+i),y2:`180`},`axis-line`));let f=Ty(`text`,{x:String(38+i+5),y:`11`,"text-anchor":`start`},`tick-label rate`);f.textContent=`${u}%`,d.appendChild(f);let p=Ty(`text`,{x:String(38+i+5),y:`183`,"text-anchor":`start`},`tick-label rate`);p.textContent=`0%`,d.appendChild(p);let m=Ty(`g`);for(let e=0;e<a;e++){let n=t[e],r=Math.max(0,n.requests-n.errors),i=Math.min(n.errors,n.requests);if(r<=0&&i<=0)continue;let a=38+e*o+(o-s)/2,l=r>0?Math.max(r/c*172,1.5):0,u=i>0?Math.max(i/c*172,1.5):0;r>0&&i>0?(m.appendChild(Ty(`rect`,{x:a.toFixed(2),y:(180-l).toFixed(2),width:s.toFixed(2),height:l.toFixed(2)},`bar-ok`)),m.appendChild(Ty(`path`,{d:Dy(a,180-l-2-u,s,u)},`bar-err`))):r>0?m.appendChild(Ty(`path`,{d:Dy(a,180-l,s,l)},`bar-ok`)):m.appendChild(Ty(`path`,{d:Dy(a,180-u,s,u)},`bar-err`))}d.appendChild(m);let h=t.map((e,t)=>{let n=38+t*o+o/2,r=180-Math.min(ky(e)*100,u)/u*172;return`${n.toFixed(2)},${r.toFixed(2)}`});h.length>1&&d.appendChild(Ty(`path`,{d:`M${h.join(` L`)}`},`traffic-rate-line`));let g=h[h.length-1].split(`,`);d.appendChild(Ty(`circle`,{cx:g[0],cy:g[1],r:`4`},`rate-dot`));let _=a>=3?[0,Math.floor((a-1)/2),a-1]:[0,a-1],ee=[`start`,`middle`,`end`];_.forEach((e,r)=>{let a=_.length===2?r===0?`start`:`end`:ee[r],s=Ty(`text`,{x:(a===`start`?38:a===`end`?38+i:38+e*o+o/2).toFixed(2),y:`194`,"text-anchor":a},`tick-label`);s.textContent=gy(t[e].start,n),d.appendChild(s)});for(let e=0;e<a;e++){let r=t[e],i=Ty(`rect`,{x:(38+e*o).toFixed(2),y:`8`,width:o.toFixed(2),height:`172`,tabindex:`0`},`traffic-hit`);i.setAttribute(`aria-label`,`${gy(r.start,n)}: ${Math.max(0,r.requests-r.errors)} ok, ${r.errors} errors, ${my(ky(r))} error rate`),i.addEventListener(`pointermove`,e=>jy(r,n,e.clientX,e.clientY)),i.addEventListener(`pointerleave`,Ay),i.addEventListener(`focus`,()=>{let e=i.getBoundingClientRect();jy(r,n,e.left+e.width/2,e.top+20)}),i.addEventListener(`blur`,Ay),d.appendChild(i)}ny.appendChild(d)}var Ny=0;new ResizeObserver(()=>{let e=ny.clientWidth;Math.abs(e-Ny)>8&&$.stats&&!ty.hidden&&(Ny=e,My())}).observe(ny);function Py(e,t,n,r){if(e.replaceChildren(),t.length===0){let t=document.createElement(`div`);t.className=`bl-empty`,t.textContent=r,e.appendChild(t);return}let i=Math.max(...t.map(e=>e.value),1e-9),a=document.createDocumentFragment();for(let e of t){let t=document.createElement(`div`);t.className=`bl-row`,t.title=e.title??e.name;let r=document.createElement(`span`);r.className=`bl-name`,r.textContent=e.name,t.appendChild(r);let o=document.createElement(`div`);o.className=`bl-track`;let s=document.createElement(`div`);s.className=`bl-fill ${n}`;let c=e.value/i*100;s.style.width=`${Math.max(c,e.value>0?1.5:0).toFixed(2)}%`,o.appendChild(s),t.appendChild(o);let l=document.createElement(`span`);l.className=`bl-value`,l.textContent=e.label,t.appendChild(l),a.appendChild(t)}e.replaceChildren(a)}var Fy=6;function Iy(e){let t=(e,t)=>t.requests-e.requests;Py(iy,[...e.by_server].sort(t).slice(0,Fy).map(e=>({name:e.name,value:e.requests,label:fy(e.requests)})),`fill-ok`,`No server data.`),Py(ay,[...e.by_transport].sort(t).slice(0,Fy).map(e=>({name:e.name,value:e.requests,label:fy(e.requests)})),`fill-ok`,`No transport data.`),Py(oy,[...e.tools].sort((e,t)=>t.requests-e.requests).slice(0,Fy).map(e=>({name:e.name,value:e.requests,label:fy(e.requests)})),`fill-ok`,`No tool calls in this window.`),Py(sy,[...e.tools].sort((e,t)=>t.p95_ms-e.p95_ms).slice(0,Fy).map(e=>({name:e.name,value:e.p95_ms,label:py(e.p95_ms),title:`${e.name} — p95 ${py(e.p95_ms)}, avg ${py(e.avg_ms)}`})),`fill-p95`,`No tool calls in this window.`),Py(cy,[...e.tools].filter(e=>e.requests>=5&&e.error_rate>0).sort((e,t)=>t.error_rate-e.error_rate).slice(0,Fy).map(e=>({name:e.name,value:e.error_rate,label:my(e.error_rate),title:`${e.name} — ${e.errors} of ${e.requests} requests failed`})),`fill-err`,`No failing tools (≥5 requests).`)}var Ly=[{key:`name`,label:`Name`,numeric:!1},{key:`requests`,label:`Requests`,numeric:!0},{key:`error_rate`,label:`Error rate`,numeric:!0},{key:`avg_ms`,label:`Avg`,numeric:!0},{key:`p95_ms`,label:`P95`,numeric:!0}];function Ry(e,t){return[...e].sort((e,n)=>{let r;return r=t.key===`name`?e.name.localeCompare(n.name):e[t.key]-n[t.key],r===0&&(r=e.name.localeCompare(n.name)),r*t.dir})}function zy(e,t,n,r,i){if(e.replaceChildren(),t.length===0){let t=document.createElement(`div`);t.className=`table-empty`,t.textContent=i,e.appendChild(t);return}let a=document.createElement(`table`);a.className=`data-table`;let o=document.createElement(`thead`),s=document.createElement(`tr`);for(let e of Ly){let t=document.createElement(`th`);t.scope=`col`,e.numeric&&t.classList.add(`num`);let i=n.key===e.key;i&&t.setAttribute(`aria-sort`,n.dir===1?`ascending`:`descending`);let a=document.createElement(`button`);a.type=`button`,a.className=`th-btn${i?` sorted`:``}`;let o=document.createElement(`span`);o.textContent=e.label,a.appendChild(o);let c=document.createElement(`span`);c.className=`sort-indicator`,c.textContent=i?n.dir===1?`▲`:`▼`:``,a.appendChild(c),a.addEventListener(`click`,()=>r(e.key)),t.appendChild(a),s.appendChild(t)}o.appendChild(s),a.appendChild(o);let c=document.createElement(`tbody`);for(let e of Ry(t,n)){let t=document.createElement(`tr`),n=document.createElement(`td`);n.className=`name-cell`,n.textContent=e.name,n.title=e.name,t.appendChild(n);let r=document.createElement(`td`);r.className=`num`,r.textContent=fy(e.requests),t.appendChild(r);let i=document.createElement(`td`);i.className=`num err-cell${e.error_rate>.01?` err-hot`:``}`,i.textContent=my(e.error_rate),t.appendChild(i);let a=document.createElement(`td`);a.className=`num`,a.textContent=py(e.avg_ms),t.appendChild(a);let o=document.createElement(`td`);o.className=`num`,o.textContent=py(e.p95_ms),t.appendChild(o),c.appendChild(t)}a.appendChild(c),e.appendChild(a)}function By(e,t){return e.key===t?{key:t,dir:e.dir===1?-1:1}:{key:t,dir:t===`name`?1:-1}}function Vy(){zy(ly,$.stats?.tools??[],$.toolsSort,e=>{$.toolsSort=By($.toolsSort,e),Vy()},`No tool calls in this window.`)}function Hy(e){if($.stats=e,$.mode=e.mode,Cy(),e.span_count_analyzed===0){yy(`empty`);return}yy(`dashboard`),My(),Iy(e),Vy()}async function Uy(){let e=++$.requestSeq;Gv.disabled=!0,Gv.classList.add(`spinning`);let t=!!$.stats;t?ty.classList.add(`refreshing`):(Zv.textContent=`Loading MCP stats…`,yy(`loading`));try{let t=await Ky.callServerTool({name:`fetch_telemetry`,arguments:{view:`mcp_stats`,hours:$.hours}});if(e!==$.requestSeq)return;if(t.isError)throw Error(_y(t)??`fetch_telemetry failed`);let n=vy(t);if(!n)throw Error(`fetch_telemetry returned an invalid stats payload`);Hy(n)}catch(n){if(e!==$.requestSeq)return;t?(yy(`dashboard`),Sy(`Refresh failed: ${n instanceof Error?n.message:String(n)}`)):by(n instanceof Error?n.message:String(n))}finally{e===$.requestSeq&&(Gv.disabled=!1,Gv.classList.remove(`spinning`),ty.classList.remove(`refreshing`))}}function Wy(e){$.hours!==e&&($.hours=e,Cy(),Uy())}for(let e of uy)e.addEventListener(`click`,()=>{let t=Number(e.dataset.hours);Vv.includes(t)&&Wy(t)});Gv.addEventListener(`click`,()=>void Uy()),Kv.addEventListener(`click`,()=>void Uy()),qv.addEventListener(`click`,()=>void Uy());function Gy(e){e.theme&&wv(e.theme),e.styles?.variables&&Tv(e.styles.variables),e.styles?.css?.fonts&&Ev(e.styles.css.fonts),e.safeAreaInsets&&(Hv.style.paddingTop=`${e.safeAreaInsets.top}px`,Hv.style.paddingRight=`${e.safeAreaInsets.right}px`,Hv.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,Hv.style.paddingLeft=`${e.safeAreaInsets.left}px`)}var Ky=new Cv({name:`qyl MCP Dashboard`,version:Dv.version});Ky.onteardown=async()=>(console.info(`App is being torn down`),{}),Ky.ontoolinput=e=>{let t=e.arguments??{};typeof t.hours==`number`&&Number.isFinite(t.hours)?($.hours=t.hours<=1?1:t.hours<=24?24:168,Cy(),Zv.textContent=`Loading MCP stats (last ${t.hours}h)…`):Zv.textContent=`Loading MCP stats…`,yy(`loading`)},Ky.ontoolresult=e=>{let t=vy(e);if(!t){by(_y(e)??`Received an invalid tool result.`);return}Hy(t)},Ky.ontoolcancelled=()=>{yy($.stats?`dashboard`:`empty`)},Ky.onerror=console.error,Ky.onhostcontextchanged=Gy,Ky.connect().then(()=>{let e=Ky.getHostContext();e&&Gy(e)}).catch(e=>{by(e instanceof Error?e.message:String(e))});</script>
57
+ 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 Ss(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;Ss(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 Cs=new Set([`type`,`properties`,`required`,`additionalProperties`]),ws=[`oneOf`,`anyOf`];function Ts(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Es(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Cs.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]??Ts(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}g(n,r,e.length===1?e[0]:Es(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=Ts(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 Ds(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Cs)if(t in e)return;let n=t.filter(e=>ws.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Es(t);else{let e=n[0],i=ws.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=>Es([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,vs(e,r))}function Os(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)):vs(i,s),vs(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())Ss(t[1].def??t[1].schema);for(let t of e.deferred)t();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)??[])Ds(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)}vs(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,g(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:js(t,`input`,e.processors),output:js(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ks(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 ks(r.element,n);if(r.type===`set`)return ks(r.valueType,n);if(r.type===`lazy`)return ks(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 ks(r.innerType,n);if(r.type===`intersection`)return ks(r.left,n)||ks(r.right,n);if(r.type===`record`||r.type===`map`)return ks(r.keyType,n)||ks(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ks(r.in,n)||ks(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ks(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ks(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ks(e,n))return!0;return!!(r.rest&&ks(r.rest,n))}return!1}var As=(e,t={})=>n=>{let r=ys({...n,processors:t});return k(e,r),xs(r,e),Os(r,e)},js=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ys({...i??{},target:a,io:t,processors:n});return k(e,o),xs(o,e),Os(o,e)},Ms={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ns=(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=Ms[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}))])}},Ps=(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):O(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},Fs=(e,t,n,r)=>{n.type=`boolean`},Is=(e,t,n,r)=>{O(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ls=(e,t,n,r)=>{O(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Rs=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},zs=(e,t,n,r)=>{O(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Bs=(e,t,n,r)=>{O(e,t,n,r,`Void cannot be represented in JSON Schema`)},Vs=(e,t,n,r)=>{n.not={}},Hs=(e,t,n,r)=>{},Us=(e,t,n,r)=>{},Ws=(e,t,n,r)=>{O(e,t,n,r,`Date cannot be represented in JSON Schema`)},Gs=(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},Ks=(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(O(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(O(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}},qs=(e,t,n,r)=>{O(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Js=(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},Ys=(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)},Xs=(e,t,n,r)=>{n.type=`boolean`},Zs=(e,t,n,r)=>{O(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Qs=(e,t,n,r)=>{O(e,t,n,r,`Function types cannot be represented in JSON Schema`)},$s=(e,t,n,r)=>{O(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ec=(e,t,n,r)=>{O(e,t,n,r,`Map cannot be represented in JSON Schema`)},tc=(e,t,n,r)=>{O(e,t,n,r,`Set cannot be represented in JSON Schema`)},nc=(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=k(a.element,t,{...r,path:[...r.path,`items`]})};function rc(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?rc(t.out):t.type===`catch`?rc(t.innerType):e._zod.optin}var ic=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&O(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)g(i.properties,e,k(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`?rc(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=k(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ac=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>k(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},oc=(e,t,n,r)=>{let i=e._zod.def,a=k(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=k(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)},sc=(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)=>k(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?k(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`?rc(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)};function cc(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=cc(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>cc(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?gn:hn).source),p):p}var lc=new WeakMap;function uc(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of lc.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=cc(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var dc=(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=k(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)g(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=k(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=lc.get(t);n||(n=[],lc.set(t,n),t.deferred.push(()=>uc(t))),n.push(e)}i.additionalProperties=k(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&rc(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.map(String))}},fc=(e,t,n,r)=>{let i=e._zod.def,a=k(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`}]},pc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},mc=Symbol();function hc(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(O(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),mc):JSON.parse(o)}var gc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=hc(i.defaultValue,e,t,n,r);o!==mc&&(n.default=o)},_c=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=hc(i.defaultValue,e,t,n,r);o!==mc&&(n._prefault=o)},vc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{O(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},yc=(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;k(o,t,r);let s=t.seen.get(e);s.ref=o},bc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},xc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Sc=(e,t,n,r)=>{let i=e._zod.def;k(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Cc=(e,t,n,r)=>{let i=e._zod.innerType;k(i,t,r);let a=t.seen.get(e);a.ref=i},wc={string:Ns,number:Ps,boolean:Fs,bigint:Is,symbol:Ls,null:Rs,undefined:zs,void:Bs,never:Vs,any:Hs,unknown:Us,date:Ws,enum:Gs,literal:Ks,nan:qs,template_literal:Js,file:Ys,success:Xs,custom:Zs,function:Qs,transform:$s,map:ec,set:tc,array:nc,object:ic,union:ac,intersection:oc,tuple:sc,record:dc,nullable:fc,nonoptional:pc,default:gc,prefault:_c,catch:vc,pipe:yc,readonly:bc,promise:xc,optional:Sc,lazy:Cc};function Tc(e,t){if(`_idmap`in e){let n=e,r=ys({...t,processors:wc}),i={};for(let e of n._idmap.entries()){let[t,n]=e;k(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;xs(r,n),g(a,t,Os(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=ys({...t,processors:wc});return k(e,n),xs(n,e),Os(n,e)}var Ec=t({endsWith:()=>Qo,gt:()=>Po,gte:()=>Fo,includes:()=>Xo,length:()=>Ko,lowercase:()=>Jo,lt:()=>Mo,lte:()=>No,maxLength:()=>Wo,maxSize:()=>Vo,mime:()=>ts,minLength:()=>Go,minSize:()=>Ho,multipleOf:()=>Bo,negative:()=>Lo,nonnegative:()=>zo,nonpositive:()=>Ro,normalize:()=>rs,overwrite:()=>ns,positive:()=>Io,properties:()=>es,property:()=>$o,regex:()=>qo,size:()=>Uo,slugify:()=>ss,startsWith:()=>Zo,toLowerCase:()=>as,toUpperCase:()=>os,trim:()=>is,uppercase:()=>Yo}),Dc=new WeakSet([Object.prototype,Error.prototype]);function Oc(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 kc=x(`ZodError`,(e,t)=>{w.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Dc.has(n)||(Dc.add(n),Oc(n,`format`,e=>t=>st(e,t)),Oc(n,`flatten`,e=>t=>ot(e,t)),Oc(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,l,2)}),Oc(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}),Ac=lt(kc),jc=dt(kc),Mc=pt(kc),Nc=ht(kc),Pc=_t(kc),Fc=vt(kc),Ic=yt(kc),Lc=bt(kc),Rc=xt(kc),zc=St(kc),Bc=Ct(kc),Vc=wt(kc),Hc=t({ZodAny:()=>pu,ZodArray:()=>Su,ZodBase64:()=>Nl,ZodBase64URL:()=>Fl,ZodBigInt:()=>nu,ZodBigIntFormat:()=>iu,ZodBoolean:()=>tu,ZodCIDRv4:()=>kl,ZodCIDRv6:()=>jl,ZodCUID:()=>pl,ZodCUID2:()=>hl,ZodCatch:()=>ld,ZodCodec:()=>hd,ZodCreditCard:()=>zl,ZodCustom:()=>kd,ZodCustomStringFormat:()=>Ul,ZodDate:()=>bu,ZodDefault:()=>td,ZodDiscriminatedUnion:()=>ku,ZodE164:()=>Ll,ZodEmail:()=>Zc,ZodEmoji:()=>ll,ZodEnum:()=>Hu,ZodExactOptional:()=>Xu,ZodFile:()=>Gu,ZodFunction:()=>Dd,ZodGUID:()=>$c,ZodIPv4:()=>Cl,ZodIPv6:()=>Dl,ZodISODate:()=>Jc,ZodISODateTime:()=>qc,ZodISODuration:()=>Xc,ZodISOTime:()=>Yc,ZodIntersection:()=>ju,ZodJWT:()=>Vl,ZodKSUID:()=>xl,ZodLazy:()=>Cd,ZodLiteral:()=>Wu,ZodMAC:()=>Tl,ZodMap:()=>Ru,ZodNaN:()=>dd,ZodNanoID:()=>dl,ZodNever:()=>gu,ZodNonOptional:()=>ad,ZodNull:()=>du,ZodNullable:()=>Qu,ZodNumber:()=>Jl,ZodNumberFormat:()=>Yl,ZodObject:()=>wu,ZodOptional:()=>Yu,ZodPipe:()=>pd,ZodPrefault:()=>rd,ZodPreprocess:()=>vd,ZodPromise:()=>Td,ZodReadonly:()=>yd,ZodRecord:()=>Fu,ZodSet:()=>Bu,ZodString:()=>Kc,ZodStringFormat:()=>M,ZodSuccess:()=>sd,ZodSymbol:()=>su,ZodTemplateLiteral:()=>xd,ZodTransform:()=>qu,ZodTuple:()=>Nu,ZodType:()=>A,ZodULID:()=>_l,ZodURL:()=>ol,ZodUUID:()=>tl,ZodUndefined:()=>lu,ZodUnion:()=>Eu,ZodUnknown:()=>hu,ZodVoid:()=>vu,ZodXID:()=>yl,ZodXor:()=>Du,_ZodString:()=>Gc,_default:()=>nd,_function:()=>Od,any:()=>mu,array:()=>I,base64:()=>Pl,base64url:()=>Il,bigint:()=>ru,boolean:()=>P,catch:()=>ud,check:()=>Ad,cidrv4:()=>Al,cidrv6:()=>Ml,codec:()=>gd,creditCard:()=>Bl,cuid:()=>ml,cuid2:()=>gl,custom:()=>jd,date:()=>xu,describe:()=>Pd,discriminatedUnion:()=>Au,e164:()=>Rl,email:()=>Qc,emoji:()=>ul,enum:()=>V,exactOptional:()=>Zu,file:()=>Ku,float32:()=>Zl,float64:()=>Ql,function:()=>Od,guid:()=>el,hash:()=>ql,hex:()=>Kl,hostname:()=>Gl,httpUrl:()=>cl,instanceof:()=>Id,int:()=>Xl,int32:()=>$l,int64:()=>au,intersection:()=>Mu,invertCodec:()=>_d,ipv4:()=>wl,ipv6:()=>Ol,json:()=>Rd,jwt:()=>Hl,keyof:()=>Cu,ksuid:()=>Sl,lazy:()=>wd,literal:()=>H,looseObject:()=>R,looseRecord:()=>Lu,mac:()=>El,map:()=>zu,meta:()=>Fd,nan:()=>fd,nanoid:()=>fl,nativeEnum:()=>Uu,never:()=>_u,nonoptional:()=>od,null:()=>fu,nullable:()=>$u,nullish:()=>ed,number:()=>N,object:()=>L,optional:()=>U,partialRecord:()=>Iu,pipe:()=>md,prefault:()=>id,preprocess:()=>zd,promise:()=>Ed,readonly:()=>bd,record:()=>B,refine:()=>Md,set:()=>Vu,strictObject:()=>Tu,string:()=>j,stringFormat:()=>Wl,stringbool:()=>Ld,success:()=>cd,superRefine:()=>Nd,symbol:()=>cu,templateLiteral:()=>Sd,transform:()=>Ju,tuple:()=>Pu,uint32:()=>eu,uint64:()=>ou,ulid:()=>vl,undefined:()=>uu,union:()=>z,unknown:()=>F,url:()=>sl,uuid:()=>nl,uuidv4:()=>rl,uuidv6:()=>il,uuidv7:()=>al,void:()=>yu,xid:()=>bl,xor:()=>Ou});function Uc(){S.localeError||C(ja())}function Wc(){S.memoizer||C({memoizer:Oa()})}var A=x(`ZodType`,(e,t)=>(Uc(),E.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_(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 ue(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Md(e,t))},superRefine(e,t){return this.check(Nd(e,t))},overwrite(e){return this.check(ns(e))},optional(){return U(this)},exactOptional(){return Zu(this)},nullable(){return $u(this)},nullish(){return U($u(this))},nonoptional(e){return od(this,e)},array(){return I(this)},or(e){return z([this,e])},and(e){return Mu(this,e)},transform(e){return md(this,Ju(e))},default(e){return nd(this,e)},prefault(e){return id(this,e)},catch(e){return ud(this,e)},pipe(e){return md(this,e)},readonly(){return bd(this)},describe(e){let t=this.clone();return Fa.add(t,{description:e}),t},meta(...e){if(e.length===0)return Fa.get(this);let t=this.clone();return Fa.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 Fe(this,`~standard`,{...mr(this),jsonSchema:{input:js(this,`input`),output:js(this,`output`)}})},set"~standard"(e){Pe(this,`~standard`,e)},parse:function e(t,n){return Ac(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await jc(this,t,n,{callee:e})},safeParse(e,t){return Mc(this,e,t)},async safeParseAsync(e,t){return Nc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Pe(this,`spa`,e)},encode:function e(t,n){return Pc(this,t,n,{callee:e})},decode:function e(t,n){return Fc(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ic(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Lc(this,t,n,{callee:e})},safeEncode(e,t){return Rc(this,e,t)},safeDecode(e,t){return zc(this,e,t)},async safeEncodeAsync(e,t){return Bc(this,e,t)},async safeDecodeAsync(e,t){return Vc(this,e,t)},toJSONSchema(e){return As(this,{})(e)},get description(){return Fa.get(this)?.description},get _def(){return this._zod.def}}),Gc=x(`_ZodString`,(e,t)=>{hr.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ns(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(qo(...e))},includes(...e){return this.check(Xo(...e))},startsWith(...e){return this.check(Zo(...e))},endsWith(...e){return this.check(Qo(...e))},min(...e){return this.check(Go(...e))},max(...e){return this.check(Wo(...e))},length(...e){return this.check(Ko(...e))},nonempty(...e){return this.check(Go(1,...e))},lowercase(e){return this.check(Jo(e))},uppercase(e){return this.check(Yo(e))},trim(){return this.check(is())},normalize(...e){return this.check(rs(...e))},toLowerCase(){return this.check(as())},toUpperCase(){return this.check(os())},slugify(){return this.check(ss())}}),Kc=x(`ZodString`,(e,t)=>{hr.init(e,t),Gc.init(e,t)},{email(e){return this.check(La(Zc,e))},url(e){return this.check(Ua(ol,e))},jwt(e){return this.check(oo(Vl,e))},emoji(e){return this.check(Wa(ll,e))},guid(e){return this.check(Ra($c,e))},uuid(e){return this.check(za(tl,e))},uuidv4(e){return this.check(Ba(tl,e))},uuidv6(e){return this.check(Va(tl,e))},uuidv7(e){return this.check(Ha(tl,e))},nanoid(e){return this.check(Ga(dl,e))},cuid(e){return this.check(Ka(pl,e))},cuid2(e){return this.check(qa(hl,e))},ulid(e){return this.check(Ja(_l,e))},base64(e){return this.check(no(Nl,e))},base64url(e){return this.check(ro(Fl,e))},xid(e){return this.check(Ya(yl,e))},ksuid(e){return this.check(Xa(xl,e))},ipv4(e){return this.check(Za(Cl,e))},ipv6(e){return this.check(Qa(Dl,e))},cidrv4(e){return this.check(eo(kl,e))},cidrv6(e){return this.check(to(jl,e))},e164(e){return this.check(io(Ll,e))},datetime(e){return this.check(so(qc,e))},date(e){return this.check(co(Jc,e))},time(e){return this.check(lo(Yc,e))},duration(e){return this.check(uo(Xc,e))}});function j(e){return Ia(Kc,e)}var M=x(`ZodStringFormat`,(e,t)=>{D.init(e,t),Gc.init(e,t)}),qc=x(`ZodISODateTime`,(e,t)=>{Mr.init(e,t),M.init(e,t)}),Jc=x(`ZodISODate`,(e,t)=>{Nr.init(e,t),M.init(e,t)}),Yc=x(`ZodISOTime`,(e,t)=>{Pr.init(e,t),M.init(e,t)}),Xc=x(`ZodISODuration`,(e,t)=>{Fr.init(e,t),M.init(e,t)}),Zc=x(`ZodEmail`,(e,t)=>{vr.init(e,t),M.init(e,t)});function Qc(e){return La(Zc,e)}var $c=x(`ZodGUID`,(e,t)=>{gr.init(e,t),M.init(e,t)});function el(e){return Ra($c,e)}var tl=x(`ZodUUID`,(e,t)=>{_r.init(e,t),M.init(e,t)});function nl(e){return za(tl,e)}function rl(e){return Ba(tl,e)}function il(e){return Va(tl,e)}function al(e){return Ha(tl,e)}var ol=x(`ZodURL`,(e,t)=>{wr.init(e,t),M.init(e,t)});function sl(e){return Ua(ol,e)}function cl(e){return Ua(ol,{protocol:rn,hostname:nn,...v(e)})}var ll=x(`ZodEmoji`,(e,t)=>{Tr.init(e,t),M.init(e,t)});function ul(e){return Wa(ll,e)}var dl=x(`ZodNanoID`,(e,t)=>{Er.init(e,t),M.init(e,t)});function fl(e){return Ga(dl,e)}var pl=x(`ZodCUID`,(e,t)=>{Dr.init(e,t),M.init(e,t)});function ml(e){return Ka(pl,e)}var hl=x(`ZodCUID2`,(e,t)=>{Or.init(e,t),M.init(e,t)});function gl(e){return qa(hl,e)}var _l=x(`ZodULID`,(e,t)=>{kr.init(e,t),M.init(e,t)});function vl(e){return Ja(_l,e)}var yl=x(`ZodXID`,(e,t)=>{Ar.init(e,t),M.init(e,t)});function bl(e){return Ya(yl,e)}var xl=x(`ZodKSUID`,(e,t)=>{jr.init(e,t),M.init(e,t)});function Sl(e){return Xa(xl,e)}var Cl=x(`ZodIPv4`,(e,t)=>{Ir.init(e,t),M.init(e,t)});function wl(e){return Za(Cl,e)}var Tl=x(`ZodMAC`,(e,t)=>{Br.init(e,t),M.init(e,t)});function El(e){return $a(Tl,e)}var Dl=x(`ZodIPv6`,(e,t)=>{zr.init(e,t),M.init(e,t)});function Ol(e){return Qa(Dl,e)}var kl=x(`ZodCIDRv4`,(e,t)=>{Vr.init(e,t),M.init(e,t)});function Al(e){return eo(kl,e)}var jl=x(`ZodCIDRv6`,(e,t)=>{Ur.init(e,t),M.init(e,t)});function Ml(e){return to(jl,e)}var Nl=x(`ZodBase64`,(e,t)=>{Gr.init(e,t),M.init(e,t)});function Pl(e){return no(Nl,e)}var Fl=x(`ZodBase64URL`,(e,t)=>{qr.init(e,t),M.init(e,t)});function Il(e){return ro(Fl,e)}var Ll=x(`ZodE164`,(e,t)=>{Jr.init(e,t),M.init(e,t)});function Rl(e){return io(Ll,e)}var zl=x(`ZodCreditCard`,(e,t)=>{Qr.init(e,t),M.init(e,t)});function Bl(e){return ao(zl,e)}var Vl=x(`ZodJWT`,(e,t)=>{ei.init(e,t),M.init(e,t)});function Hl(e){return oo(Vl,e)}var Ul=x(`ZodCustomStringFormat`,(e,t)=>{ti.init(e,t),M.init(e,t)});function Wl(e,t,n={}){return _s(Ul,e,t,n)}function Gl(e){return _s(Ul,`hostname`,tn,e)}function Kl(e){return _s(Ul,`hex`,Sn,e)}function ql(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Tt[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return _s(Ul,n,r,t)}var Jl=x(`ZodNumber`,(e,t)=>{ni.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ps(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(Po(e,t))},gte(e,t){return this.check(Fo(e,t))},min(e,t){return this.check(Fo(e,t))},lt(e,t){return this.check(Mo(e,t))},lte(e,t){return this.check(No(e,t))},max(e,t){return this.check(No(e,t))},int(e){return this.check(Xl(e))},safe(e){return this.check(Xl(e))},positive(e){return this.check(Po(0,e))},nonnegative(e){return this.check(Fo(0,e))},negative(e){return this.check(Mo(0,e))},nonpositive(e){return this.check(No(0,e))},multipleOf(e,t){return this.check(Bo(e,t))},step(e,t){return this.check(Bo(e,t))},finite(){return this}});function N(e){return fo(Jl,e)}var Yl=x(`ZodNumberFormat`,(e,t)=>{ri.init(e,t),Jl.init(e,t)});function Xl(e){return mo(Yl,e)}function Zl(e){return ho(Yl,e)}function Ql(e){return go(Yl,e)}function $l(e){return _o(Yl,e)}function eu(e){return vo(Yl,e)}var tu=x(`ZodBoolean`,(e,t)=>{ii.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fs(e,t,n,r)});function P(e){return yo(tu,e)}var nu=x(`ZodBigInt`,(e,t)=>{ai.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Is(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(Fo(e,t))},min(e,t){return this.check(Fo(e,t))},gt(e,t){return this.check(Po(e,t))},lt(e,t){return this.check(Mo(e,t))},lte(e,t){return this.check(No(e,t))},max(e,t){return this.check(No(e,t))},positive(e){return this.check(Po(BigInt(0),e))},negative(e){return this.check(Mo(BigInt(0),e))},nonpositive(e){return this.check(No(BigInt(0),e))},nonnegative(e){return this.check(Fo(BigInt(0),e))},multipleOf(e,t){return this.check(Bo(e,t))}});function ru(e){return bo(nu,e)}var iu=x(`ZodBigIntFormat`,(e,t)=>{oi.init(e,t),nu.init(e,t)});function au(e){return xo(iu,e)}function ou(e){return So(iu,e)}var su=x(`ZodSymbol`,(e,t)=>{si.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ls(e,t,n,r)});function cu(e){return Co(su,e)}var lu=x(`ZodUndefined`,(e,t)=>{ci.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zs(e,t,n,r)});function uu(e){return wo(lu,e)}var du=x(`ZodNull`,(e,t)=>{li.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rs(e,t,n,r)});function fu(e){return To(du,e)}var pu=x(`ZodAny`,(e,t)=>{ui.init(e,t),A.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function mu(){return Eo(pu)}var hu=x(`ZodUnknown`,(e,t)=>{di.init(e,t),A.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function F(){return Do(hu)}var gu=x(`ZodNever`,(e,t)=>{fi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vs(e,t,n,r)});function _u(e){return Oo(gu,e)}var vu=x(`ZodVoid`,(e,t)=>{pi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bs(e,t,n,r)});function yu(e){return ko(vu,e)}var bu=x(`ZodDate`,(e,t)=>{mi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ws(e,t,n,r),e.min=(t,n)=>e.check(Fo(t,n)),e.max=(t,n)=>e.check(No(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 xu(e){return Ao(bu,e)}var Su=x(`ZodArray`,(e,t)=>{Wc(),gi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nc(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Go(e,t))},nonempty(e){return this.check(Go(1,e))},max(e,t){return this.check(Wo(e,t))},length(e,t){return this.check(Ko(e,t))},unwrap(){return this.element}});function I(e,t){return cs(Su,e,t)}function Cu(e){let t=e._zod.def.shape;return V(Object.keys(t))}var wu=x(`ZodObject`,(e,t)=>{Wc(),Ci.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ic(e,t,n,r),Ve(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return V(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:F()})},loose(){return this.clone({...this._zod.def,catchall:F()})},strict(){return this.clone({...this._zod.def,catchall:_u()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return _e(this,e)},safeExtend(e){return ve(this,e)},merge(e){return ye(this,e)},pick(e){return he(this,e)},omit(e){return ge(this,e)},partial(...e){return be(Yu,this,e[0])},exactPartial(...e){return be(Xu,this,e[0],`exactPartial`)},required(...e){return xe(ad,this,e[0])}});function L(e,t){return new wu({type:`object`,shape:e??{},...v(t)})}function Tu(e,t){return new wu({type:`object`,shape:e,catchall:_u(),...v(t)})}function R(e,t){return new wu({type:`object`,shape:e,catchall:F(),...v(t)})}var Eu=x(`ZodUnion`,(e,t)=>{Ti.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ac(e,t,n,r),e.options=t.options});function z(e,t){return new Eu({type:`union`,options:e,...v(t)})}var Du=x(`ZodXor`,(e,t)=>{Eu.init(e,t),Di.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ac(e,t,n,r),e.options=t.options});function Ou(e,t){return new Du({type:`union`,options:e,inclusive:!1,...v(t)})}var ku=x(`ZodDiscriminatedUnion`,(e,t)=>{Eu.init(e,t),Oi.init(e,t)});function Au(e,t,n){return new ku({type:`union`,options:t,discriminator:e,...v(n)})}var ju=x(`ZodIntersection`,(e,t)=>{ki.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oc(e,t,n,r)});function Mu(e,t){return new ju({type:`intersection`,left:e,right:t})}var Nu=x(`ZodTuple`,(e,t)=>{Wc(),Mi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sc(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 Yu({type:`optional`,innerType:e}))})}});function Pu(e,t,n){let r=t instanceof E;return new Nu({type:`tuple`,items:e,rest:r?t:null,...v(r?n:t)})}var Fu=x(`ZodRecord`,(e,t)=>{Wc(),Ii.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function B(e,t,n){return!t||!t._zod?new Fu({type:`record`,keyType:j(),valueType:e,...v(t)}):new Fu({type:`record`,keyType:e,valueType:t,...v(n)})}function Iu(e,t,n){return new Fu({type:`record`,keyType:e,valueType:t,...v(n),partial:!0})}function Lu(e,t,n){return new Fu({type:`record`,keyType:e,valueType:t,mode:`loose`,...v(n)})}var Ru=x(`ZodMap`,(e,t)=>{Wc(),Li.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ec(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(Ho(...t)),e.nonempty=t=>e.check(Ho(1,t)),e.max=(...t)=>e.check(Vo(...t)),e.size=(...t)=>e.check(Uo(...t))});function zu(e,t,n){return new Ru({type:`map`,keyType:e,valueType:t,...v(n)})}var Bu=x(`ZodSet`,(e,t)=>{Wc(),zi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tc(e,t,n,r),e.min=(...t)=>e.check(Ho(...t)),e.nonempty=t=>e.check(Ho(1,t)),e.max=(...t)=>e.check(Vo(...t)),e.size=(...t)=>e.check(Uo(...t))});function Vu(e,t){return new Bu({type:`set`,valueType:e,...v(t)})}var Hu=x(`ZodEnum`,(e,t)=>{Vi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gs(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 Hu({...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 Hu({...t,checks:[],...v(r),entries:i})}});function V(e,t){return new Hu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...v(t)})}function Uu(e,t){return new Hu({type:`enum`,entries:e,...v(t)})}var Wu=x(`ZodLiteral`,(e,t)=>{Hi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ks(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 H(e,t){return new Wu({type:`literal`,values:Array.isArray(e)?e:[e],...v(t)})}var Gu=x(`ZodFile`,(e,t)=>{Ui.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ys(e,t,n,r),e.min=(t,n)=>e.check(Ho(t,n)),e.max=(t,n)=>e.check(Vo(t,n)),e.mime=(t,n)=>e.check(ts(Array.isArray(t)?t:[t],n))});function Ku(e){return ls(Gu,e)}var qu=x(`ZodTransform`,(e,t)=>{Wc(),Wi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$s(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Xe(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Me(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(Me(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ju(e){return new qu({type:`transform`,transform:e})}var Yu=x(`ZodOptional`,(e,t)=>{Ki.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function U(e){return new Yu({type:`optional`,innerType:e})}var Xu=x(`ZodExactOptional`,(e,t)=>{qi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zu(e){return new Xu({type:`optional`,innerType:e})}var Qu=x(`ZodNullable`,(e,t)=>{Ji.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $u(e){return new Qu({type:`nullable`,innerType:e})}function ed(e){return U($u(e))}var td=x(`ZodDefault`,(e,t)=>{Yi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function nd(e,t){return new td({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var rd=x(`ZodPrefault`,(e,t)=>{Zi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_c(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function id(e,t){return new rd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var ad=x(`ZodNonOptional`,(e,t)=>{Qi.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function od(e,t){return new ad({type:`nonoptional`,innerType:e,...v(t)})}var sd=x(`ZodSuccess`,(e,t)=>{ea.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cd(e){return new sd({type:`success`,innerType:e})}var ld=x(`ZodCatch`,(e,t)=>{na.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ud(e,t){return new ld({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ue(t)})}var dd=x(`ZodNaN`,(e,t)=>{ra.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qs(e,t,n,r)});function fd(e){return jo(dd,e)}var pd=x(`ZodPipe`,(e,t)=>{ia.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yc(e,t,n,r),e.in=t.in,e.out=t.out});function md(e,t){return new pd({type:`pipe`,in:e,out:t})}var hd=x(`ZodCodec`,(e,t)=>{pd.init(e,t),oa.init(e,t)});function gd(e,t,n){return new hd({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function _d(e){let t=e._zod.def;return new hd({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var vd=x(`ZodPreprocess`,(e,t)=>{pd.init(e,t),la.init(e,t)}),yd=x(`ZodReadonly`,(e,t)=>{ua.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bd(e){return new yd({type:`readonly`,innerType:e})}var xd=x(`ZodTemplateLiteral`,(e,t)=>{fa.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Js(e,t,n,r)});function Sd(e,t){return new xd({type:`template_literal`,parts:e,...v(t)})}var Cd=x(`ZodLazy`,(e,t)=>{ha.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cc(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function wd(e){return new Cd({type:`lazy`,getter:e})}var Td=x(`ZodPromise`,(e,t)=>{ma.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ed(e){return new Td({type:`promise`,innerType:e})}var Dd=x(`ZodFunction`,(e,t)=>{pa.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qs(e,t,n,r)});function Od(e){return new Dd({type:`function`,input:Array.isArray(e?.input)?Pu(e?.input):e?.input??I(F()),output:e?.output??F()})}var kd=x(`ZodCustom`,(e,t)=>{ga.init(e,t),A.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zs(e,t,n,r)});function Ad(e){let t=new T({check:`custom`});return t._zod.check=e,t}function jd(e,t){return us(kd,e??(()=>!0),t)}function Md(e,t={}){return ds(kd,e,t)}function Nd(e,t){return fs(e,t)}var Pd=ms,Fd=hs;function Id(e,t={}){let n=new kd({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 Ld=(...e)=>gs({Codec:hd,Boolean:tu,String:Kc},...e);function Rd(e){let t=wd(()=>z([j(e),N(),P(),fu(),I(t),B(j(),t)]));return t}function zd(e,t){return new vd({type:`pipe`,in:Ju(e),out:t})}var Bd={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`},Vd;Vd||={};var Hd=t({ZodISODate:()=>Jc,ZodISODateTime:()=>qc,ZodISODuration:()=>Xc,ZodISOTime:()=>Yc,date:()=>Wd,datetime:()=>Ud,duration:()=>Kd,time:()=>Gd});function Ud(e){return so(qc,e)}function Wd(e){return co(Jc,e)}function Gd(e){return lo(Yc,e)}function Kd(e){return uo(Xc,e)}var W={...Hc,...Ec,iso:Hd},qd=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 Jd(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 Yd(e,t){return e.map((e,n)=>n<t?e:e.optional())}function Xd(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Zd(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:Xd(n[1]);if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Qd(e,t){return W.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 $d(e,t){if(e!==!1)return e===void 0||e===!0?W.any():nf(e,t)}var ef=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function tf(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return W.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 W.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=nf(Zd(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 W.null();if(n.length===0)return W.never();if(n.length===1)return W.literal(n[0]);if(n.every(e=>typeof e==`string`))return W.enum(n);let r=n.map(e=>W.literal(e));return r.length<2?r[0]:W.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return W.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>tf({...e,type:n},t));return r.length===0?W.never():r.length===1?r[0]:W.union(r)}if(!n)return W.any();let r;switch(n){case`string`:{let t=W.string();if(e.format){let n=e.format;n===`email`?t=t.check(W.email()):n===`uri`||n===`uri-reference`?t=t.check(W.url()):n===`uuid`||n===`guid`?t=t.check(W.uuid()):n===`date-time`?t=t.check(W.iso.datetime({offset:!0})):n===`date`?t=t.check(W.iso.date()):n===`time`?t=t.check(W.regex(ef)):n===`duration`?t=t.check(W.iso.duration()):n===`hostname`?t=t.check(W.hostname()):n===`ipv4`?t=t.check(W.ipv4()):n===`ipv6`?t=t.check(W.ipv6()):n===`mac`?t=t.check(W.mac()):n===`cidr`?t=t.check(W.cidrv4()):n===`cidr-v6`?t=t.check(W.cidrv6()):n===`base64`?t=t.check(W.base64()):n===`base64url`?t=t.check(W.base64url()):n===`e164`?t=t.check(W.e164()):n===`credit_card`?t=t.check(W.creditCard()):n===`jwt`?t=t.check(W.jwt()):n===`emoji`?t=t.check(W.emoji()):n===`nanoid`?t=t.check(W.nanoid()):n===`cuid`?t=t.check(W.cuid()):n===`cuid2`?t=t.check(W.cuid2()):n===`ulid`?t=t.check(W.ulid()):n===`xid`?t=t.check(W.xid()):n===`ksuid`&&(t=t.check(W.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`?W.number().int():W.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=W.boolean();break;case`null`:r=W.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?nf(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=nf(r,t);g(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=nf(i[e],t),r=W.string().regex(new RegExp(e));o.push(W.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(W.object(n).passthrough()),s.push(...o),s.length===0)r=W.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=W.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=W.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(!ae(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=W.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=Qd(r,nf(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=Yd(n.map(e=>nf(e,t)),a),s=Array.isArray(i)?void 0:$d(i,t),c=W.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check(W.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(W.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=Yd(i.map(e=>nf(e,t)),n),o=$d(e.additionalItems,t),s=W.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check(W.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(W.maxLength(e.maxItems)))}else if(i!==void 0){let n=nf(i,t),a=W.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=W.array(W.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function nf(e,t){if(typeof e==`boolean`)return e?W.any():W.never();let n=tf(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=>nf(e,t)),a=W.union(i);n=r?W.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>nf(e,t)),a=W.xor(i);n=r?W.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:W.any();else{let i=r?n:nf(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=W.intersection(i,nf(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=W.nullable(n)),e.readOnly===!0&&(n=W.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))qd.has(t)||g(i,t,e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function rf(e,t){if(typeof e==`boolean`)return e?W.any():W.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:Jd(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Fa};return nf(n,r)}function af(e){return po(Jl,e)}var of=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],sf=`io.modelcontextprotocol/related-task`,cf=`io.modelcontextprotocol/protocolVersion`,lf=`io.modelcontextprotocol/clientInfo`,uf=`io.modelcontextprotocol/serverInfo`,df=`io.modelcontextprotocol/clientCapabilities`,ff=`io.modelcontextprotocol/subscriptionId`,pf=`io.modelcontextprotocol/logLevel`,mf=wd(()=>z([j(),N(),P(),fu(),B(j(),mf),I(mf)])),G=B(j(),mf),hf=I(mf),gf=z([j(),N().int()]),_f=j(),vf=L({ttl:N().optional()}),yf=L({taskId:j()}),bf=R({progressToken:gf.optional(),[sf]:yf.optional()}),xf=L({_meta:bf.optional()}),Sf=xf.extend({task:vf.optional()}),K=L({method:j(),params:xf.loose().optional()}),Cf=L({_meta:bf.optional()}),wf=L({method:j(),params:Cf.loose().optional()}),Tf=R({get[uf](){return zf.optional().catch(void 0)}}),q=R({_meta:Tf.optional()}),Ef=z([j(),N().int()]),Df=L({jsonrpc:H(`2.0`),id:Ef,...K.shape}).strict(),Of=L({jsonrpc:H(`2.0`),...wf.shape}).strict(),kf=L({jsonrpc:H(`2.0`),id:Ef,result:q}).strict(),Af=L({jsonrpc:H(`2.0`),id:Ef.optional(),error:L({code:N().int(),message:j(),data:F().optional()})}).strict(),jf=z([Df,Of,kf,Af]),Mf=z([kf,Af]),Nf=q.strict(),Pf=Cf.extend({requestId:Ef.optional(),reason:j().optional()}),Ff=wf.extend({method:H(`notifications/cancelled`),params:Pf}),If=L({src:j(),mimeType:j().optional(),sizes:I(j()).optional(),theme:V([`light`,`dark`]).optional()}),Lf=L({icons:I(If).optional()}),Rf=L({name:j(),title:j().optional()}),zf=Rf.extend({...Rf.shape,...Lf.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),Bf=zd(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Mu(L({form:Mu(L({applyDefaults:P().optional()}),G).optional(),url:G.optional()}),G.optional())),Vf=R({list:G.optional(),cancel:G.optional(),requests:R({sampling:R({createMessage:G.optional()}).optional(),elicitation:R({create:G.optional()}).optional()}).optional()}),Hf=R({list:G.optional(),cancel:G.optional(),requests:R({tools:R({call:G.optional()}).optional()}).optional()}),Uf=L({experimental:B(j(),G).optional(),sampling:L({context:G.optional(),tools:G.optional()}).optional(),elicitation:Bf.optional(),roots:L({listChanged:P().optional()}).optional(),tasks:Vf.optional(),extensions:B(j(),G).optional()}),Wf=xf.extend({protocolVersion:j(),capabilities:Uf,clientInfo:zf}),Gf=K.extend({method:H(`initialize`),params:Wf}),Kf=L({experimental:B(j(),G).optional(),logging:G.optional(),completions:G.optional(),prompts:L({listChanged:P().optional()}).optional(),resources:L({subscribe:P().optional(),listChanged:P().optional()}).optional(),tools:L({listChanged:P().optional()}).optional(),tasks:Hf.optional(),extensions:B(j(),G).optional()}),qf=q.extend({protocolVersion:j(),capabilities:Kf,serverInfo:zf,instructions:j().optional()}),Jf=wf.extend({method:H(`notifications/initialized`),params:Cf.optional()}),Yf=K.extend({method:H(`server/discover`),params:xf.optional()}),Xf=q.extend({supportedVersions:I(j()),capabilities:Kf,instructions:j().optional()}),Zf=K.extend({method:H(`ping`),params:xf.optional()}),Qf=L({progress:N(),total:U(N()),message:U(j())}),$f=L({...Cf.shape,...Qf.shape,progressToken:gf}),ep=wf.extend({method:H(`notifications/progress`),params:$f}),tp=xf.extend({cursor:_f.optional()}),np=K.extend({params:tp.optional()}),rp=q.extend({nextCursor:_f.optional()}),ip=L({uri:j(),mimeType:U(j()),_meta:B(j(),F()).optional()}),ap=ip.extend({text:j()}),op=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),sp=ip.extend({blob:op}),cp=V([`user`,`assistant`]),lp=L({audience:I(cp).optional(),priority:N().min(0).max(1).optional(),lastModified:Ud({offset:!0}).optional()}),up=L({...Rf.shape,...Lf.shape,uri:j(),description:U(j()),mimeType:U(j()),size:U(N()),annotations:lp.optional(),_meta:U(R({}))}),dp=L({...Rf.shape,...Lf.shape,uriTemplate:j(),description:U(j()),mimeType:U(j()),annotations:lp.optional(),_meta:U(R({}))}),fp=np.extend({method:H(`resources/list`)}),pp=rp.extend({resources:I(up)}),mp=np.extend({method:H(`resources/templates/list`)}),hp=rp.extend({resourceTemplates:I(dp)}),gp=xf.extend({uri:j()}),_p=gp,vp=K.extend({method:H(`resources/read`),params:_p}),yp=q.extend({contents:I(z([ap,sp]))}),bp=wf.extend({method:H(`notifications/resources/list_changed`),params:Cf.optional()}),xp=gp,Sp=K.extend({method:H(`resources/subscribe`),params:xp}),Cp=gp,wp=K.extend({method:H(`resources/unsubscribe`),params:Cp}),Tp=L({toolsListChanged:P().optional(),promptsListChanged:P().optional(),resourcesListChanged:P().optional(),resourceSubscriptions:I(j()).optional()}),Ep=xf.extend({notifications:Tp}),Dp=K.extend({method:H(`subscriptions/listen`),params:Ep}),Op=Cf.extend({notifications:Tp}),kp=wf.extend({method:H(`notifications/subscriptions/acknowledged`),params:Op}),Ap=Tf.extend({[ff]:Ef}),jp=q.extend({_meta:Ap}),Mp=Cf.extend({uri:j()}),Np=wf.extend({method:H(`notifications/resources/updated`),params:Mp}),Pp=L({name:j(),description:U(j()),required:U(P())}),Fp=L({...Rf.shape,...Lf.shape,description:U(j()),arguments:U(I(Pp)),_meta:U(R({}))}),Ip=np.extend({method:H(`prompts/list`)}),Lp=rp.extend({prompts:I(Fp)}),Rp=xf.extend({name:j(),arguments:B(j(),j()).optional()}),zp=K.extend({method:H(`prompts/get`),params:Rp}),Bp=L({type:H(`text`),text:j(),annotations:lp.optional(),_meta:B(j(),F()).optional()}),Vp=L({type:H(`image`),data:op,mimeType:j(),annotations:lp.optional(),_meta:B(j(),F()).optional()}),Hp=L({type:H(`audio`),data:op,mimeType:j(),annotations:lp.optional(),_meta:B(j(),F()).optional()}),Up=L({type:H(`tool_use`),name:j(),id:j(),input:B(j(),F()),_meta:B(j(),F()).optional()}),Wp=L({type:H(`resource`),resource:z([ap,sp]),annotations:lp.optional(),_meta:B(j(),F()).optional()}),Gp=up.extend({type:H(`resource_link`)}),Kp=z([Bp,Vp,Hp,Gp,Wp]),qp=L({role:cp,content:Kp}),Jp=q.extend({description:j().optional(),messages:I(qp)}),Yp=wf.extend({method:H(`notifications/prompts/list_changed`),params:Cf.optional()}),Xp=L({title:j().optional(),readOnlyHint:P().optional(),destructiveHint:P().optional(),idempotentHint:P().optional(),openWorldHint:P().optional()}),Zp=L({taskSupport:V([`required`,`optional`,`forbidden`]).optional()}),Qp=L({...Rf.shape,...Lf.shape,description:j().optional(),inputSchema:L({type:H(`object`),properties:B(j(),mf).optional(),required:I(j()).optional()}).catchall(F()),outputSchema:R({$schema:j().optional()}).optional(),annotations:Xp.optional(),execution:Zp.optional(),_meta:B(j(),F()).optional()}),$p=np.extend({method:H(`tools/list`)}),em=rp.extend({tools:I(Qp)}),tm=q.extend({content:I(Kp).default([]),structuredContent:F().optional(),isError:P().optional()}),nm=tm.or(q.extend({toolResult:F()})),rm=Sf.extend({name:j(),arguments:B(j(),F()).optional()}),im=K.extend({method:H(`tools/call`),params:rm}),am=wf.extend({method:H(`notifications/tools/list_changed`),params:Cf.optional()}),om=L({autoRefresh:P().default(!0),debounceMs:N().int().nonnegative().default(300)}),sm=V([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),cm=xf.extend({level:sm}),lm=K.extend({method:H(`logging/setLevel`),params:cm}),um=Cf.extend({level:sm,logger:j().optional(),data:F()}),dm=wf.extend({method:H(`notifications/message`),params:um}),fm=L({name:j().optional()}),pm=L({hints:I(fm).optional(),costPriority:N().min(0).max(1).optional(),speedPriority:N().min(0).max(1).optional(),intelligencePriority:N().min(0).max(1).optional()}),mm=L({mode:V([`auto`,`required`,`none`]).optional()}),hm=L({type:H(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:I(Kp),structuredContent:F().optional(),isError:P().optional(),_meta:B(j(),F()).optional()}),gm=Au(`type`,[Bp,Vp,Hp]),_m=Au(`type`,[Bp,Vp,Hp,Up,hm]),vm=L({role:cp,content:z([_m,I(_m)]),_meta:B(j(),F()).optional()}),ym=Sf.extend({messages:I(vm),modelPreferences:pm.optional(),systemPrompt:j().optional(),includeContext:V([`none`,`thisServer`,`allServers`]).optional(),temperature:N().optional(),maxTokens:N().int(),stopSequences:I(j()).optional(),metadata:G.optional(),tools:I(Qp).optional(),toolChoice:mm.optional()}),bm=K.extend({method:H(`sampling/createMessage`),params:ym}),xm=q.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:cp,content:gm}),Sm=q.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:cp,content:z([_m,I(_m)])}),Cm=L({type:H(`boolean`),title:j().optional(),description:j().optional(),default:P().optional()}),wm=L({type:H(`string`),title:j().optional(),description:j().optional(),minLength:N().optional(),maxLength:N().optional(),format:V([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),Tm=L({type:V([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:N().optional(),maximum:N().optional(),default:N().optional()}),Em=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),default:j().optional()}),Dm=L({type:H(`string`),title:j().optional(),description:j().optional(),oneOf:I(L({const:j(),title:j()})),default:j().optional()}),Om=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),enumNames:I(j()).optional(),default:j().optional()}),km=z([Em,Dm]),Am=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({type:H(`string`),enum:I(j())}),default:I(j()).optional()}),jm=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({anyOf:I(L({const:j(),title:j()}))}),default:I(j()).optional()}),Mm=z([Am,jm]),Nm=z([Om,km,Mm]),Pm=z([Nm,Cm,wm,Tm]),Fm=Sf.extend({mode:H(`form`).optional(),message:j(),requestedSchema:L({type:H(`object`),properties:B(j(),Pm),required:I(j()).optional()}).catchall(F())}),Im=Sf.extend({mode:H(`url`),message:j(),elicitationId:j(),url:j().url()}),Lm=z([Fm,Im]),Rm=K.extend({method:H(`elicitation/create`),params:Lm}),zm=Cf.extend({elicitationId:j()}),Bm=wf.extend({method:H(`notifications/elicitation/complete`),params:zm}),Vm=q.extend({action:V([`accept`,`decline`,`cancel`]),content:zd(e=>e===null?void 0:e,B(j(),z([j(),N(),P(),I(j())])).optional())}),Hm=L({type:H(`ref/resource`),uri:j()}),Um=L({type:H(`ref/prompt`),name:j()}),Wm=xf.extend({ref:z([Um,Hm]),argument:L({name:j(),value:j()}),context:L({arguments:B(j(),j()).optional()}).optional()}),Gm=K.extend({method:H(`completion/complete`),params:Wm}),Km=q.extend({completion:R({values:I(j()).max(100),total:U(N().int()),hasMore:U(P())})}),qm=L({uri:j().startsWith(`file://`),name:j().optional(),_meta:B(j(),F()).optional()}),Jm=K.extend({method:H(`roots/list`),params:xf.optional()}),Ym=q.extend({roots:I(qm)}),Xm=wf.extend({method:H(`notifications/roots/list_changed`),params:Cf.optional()}),Zm=R({ttl:N().optional(),pollInterval:N().optional()}),Qm=V([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$m=L({taskId:j(),status:Qm,ttl:z([N(),fu()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:U(N()),statusMessage:U(j())}),eh=q.extend({task:$m}),th=Cf.merge($m),nh=wf.extend({method:H(`notifications/tasks/status`),params:th}),rh=K.extend({method:H(`tasks/get`),params:xf.extend({taskId:j()})}),ih=q.merge($m),ah=K.extend({method:H(`tasks/result`),params:xf.extend({taskId:j()})}),oh=q.loose(),sh=np.extend({method:H(`tasks/list`)}),ch=rp.extend({tasks:I($m)}),lh=K.extend({method:H(`tasks/cancel`),params:xf.extend({taskId:j()})}),uh=q.merge($m),dh=z([Zf,Gf,Yf,Gm,lm,zp,Ip,fp,mp,vp,Sp,wp,Dp,im,$p]),fh=z([Ff,ep,Jf,Xm]),ph=z([Nf,xm,Sm,Vm,Ym]),mh=z([Zf,bm,Rm,Jm]),hh=z([Ff,ep,dm,Np,bp,am,Yp,kp,Bm]),gh=z([Nf,qf,Xf,Km,Jp,Lp,pp,hp,yp,tm,em,jp]),J=sl().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Bd.custom,message:`URL must be parseable`,fatal:!0}),Ge}).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`}),_h=R({resource:j().url(),authorization_servers:I(J).optional(),jwks_uri:j().url().optional(),scopes_supported:I(j()).optional(),bearer_methods_supported:I(j()).optional(),resource_signing_alg_values_supported:I(j()).optional(),resource_name:j().optional(),resource_documentation:j().optional(),resource_policy_uri:j().url().optional(),resource_tos_uri:j().url().optional(),tls_client_certificate_bound_access_tokens:P().optional(),authorization_details_types_supported:I(j()).optional(),dpop_signing_alg_values_supported:I(j()).optional(),dpop_bound_access_tokens_required:P().optional()}),vh=R({issuer:j(),authorization_endpoint:J,token_endpoint:J,registration_endpoint:J.optional(),scopes_supported:I(j()).optional(),response_types_supported:I(j()),response_modes_supported:I(j()).optional(),grant_types_supported:I(j()).optional(),token_endpoint_auth_methods_supported:I(j()).optional(),token_endpoint_auth_signing_alg_values_supported:I(j()).optional(),service_documentation:J.optional(),revocation_endpoint:J.optional(),revocation_endpoint_auth_methods_supported:I(j()).optional(),revocation_endpoint_auth_signing_alg_values_supported:I(j()).optional(),introspection_endpoint:j().optional(),introspection_endpoint_auth_methods_supported:I(j()).optional(),introspection_endpoint_auth_signing_alg_values_supported:I(j()).optional(),code_challenge_methods_supported:I(j()).optional(),client_id_metadata_document_supported:P().optional(),authorization_response_iss_parameter_supported:P().optional().catch(void 0)}),yh=R({issuer:j(),authorization_endpoint:J,token_endpoint:J,userinfo_endpoint:J.optional(),jwks_uri:J,registration_endpoint:J.optional(),scopes_supported:I(j()).optional(),response_types_supported:I(j()),response_modes_supported:I(j()).optional(),grant_types_supported:I(j()).optional(),acr_values_supported:I(j()).optional(),subject_types_supported:I(j()),id_token_signing_alg_values_supported:I(j()),id_token_encryption_alg_values_supported:I(j()).optional(),id_token_encryption_enc_values_supported:I(j()).optional(),userinfo_signing_alg_values_supported:I(j()).optional(),userinfo_encryption_alg_values_supported:I(j()).optional(),userinfo_encryption_enc_values_supported:I(j()).optional(),request_object_signing_alg_values_supported:I(j()).optional(),request_object_encryption_alg_values_supported:I(j()).optional(),request_object_encryption_enc_values_supported:I(j()).optional(),token_endpoint_auth_methods_supported:I(j()).optional(),token_endpoint_auth_signing_alg_values_supported:I(j()).optional(),display_values_supported:I(j()).optional(),claim_types_supported:I(j()).optional(),claims_supported:I(j()).optional(),service_documentation:j().optional(),claims_locales_supported:I(j()).optional(),ui_locales_supported:I(j()).optional(),claims_parameter_supported:P().optional(),request_parameter_supported:P().optional(),request_uri_parameter_supported:P().optional(),require_request_uri_registration:P().optional(),op_policy_uri:J.optional(),op_tos_uri:J.optional(),client_id_metadata_document_supported:P().optional(),authorization_response_iss_parameter_supported:P().optional().catch(void 0)}),bh=L({...yh.shape,...vh.pick({code_challenge_methods_supported:!0}).shape}),xh=L({access_token:j(),id_token:j().optional(),token_type:j(),expires_in:af().optional(),scope:j().optional(),refresh_token:j().optional()}).strip(),Sh=L({issued_token_type:H(`urn:ietf:params:oauth:token-type:id-jag`),access_token:j(),token_type:j().optional(),expires_in:N().optional(),scope:j().optional()}).strip(),Ch=L({error:j(),error_description:j().optional(),error_uri:j().optional()}),wh=J.optional().or(H(``).transform(()=>void 0)),Th=L({redirect_uris:I(J),token_endpoint_auth_method:j().optional(),grant_types:I(j()).optional(),response_types:I(j()).optional(),application_type:j().optional(),client_name:j().optional(),client_uri:J.optional(),logo_uri:wh,scope:j().optional(),contacts:I(j()).optional(),tos_uri:wh,policy_uri:j().optional(),jwks_uri:J.optional(),jwks:mu().optional(),software_id:j().optional(),software_version:j().optional(),software_statement:j().optional()}).strip(),Eh=L({client_id:j(),client_secret:j().optional(),client_id_issued_at:N().optional(),client_secret_expires_at:N().optional()}).strip(),Dh=Th.merge(Eh),Oh=L({error:j(),error_description:j().optional()}).strip(),kh=L({token:j(),token_type_hint:j().optional()}).strip(),Ah=Symbol.for(`mcp.sdk.errorBrands`);function jh(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,Ah,{value:n,enumerable:!1,configurable:!0})}function Mh(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Ah)){let n=t[Ah];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 Mh(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 Mh(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,jh(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 Nh=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}({}),Y=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Mh(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 Mh(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,jh(this,new.target)}};(class extends Y{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 Ph=`2026-07-28`;function Fh(e){return e>=Ph}function Ih(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 Lh=[`task`,`inputRequests`,`requestState`];function Rh(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Lh.some(t=>t in e)?e:{...e,content:[]}}function zh(){let e=wd(()=>z([j(),N(),P(),fu(),B(j(),e),I(e)])),t=B(j(),e),n=z([j(),N().int()]),r=j(),i=L({ttl:N().optional()}),a=L({taskId:j()}),o=R({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=L({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=L({method:j(),params:s.loose().optional()}),u=L({_meta:o.optional()}),d=L({method:j(),params:u.loose().optional()}),f=R({_meta:o.optional()}),p=z([j(),N().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:j().optional()}),g=d.extend({method:H(`notifications/cancelled`),params:h}),_=L({src:j(),mimeType:j().optional(),sizes:I(j()).optional(),theme:V([`light`,`dark`]).optional()}),ee=L({icons:I(_).optional()}),te=L({name:j(),title:j().optional()}),ne=te.extend({...te.shape,...ee.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),re=zd(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Mu(L({form:Mu(L({applyDefaults:P().optional()}),t).optional(),url:t.optional()}),t.optional())),ie=R({list:t.optional(),cancel:t.optional(),requests:R({sampling:R({createMessage:t.optional()}).optional(),elicitation:R({create:t.optional()}).optional()}).optional()}),ae=R({list:t.optional(),cancel:t.optional(),requests:R({tools:R({call:t.optional()}).optional()}).optional()}),oe=L({experimental:B(j(),t).optional(),sampling:L({context:t.optional(),tools:t.optional()}).optional(),elicitation:re.optional(),roots:L({listChanged:P().optional()}).optional(),tasks:ie.optional(),extensions:B(j(),t).optional()}),se=s.extend({protocolVersion:j(),capabilities:oe,clientInfo:ne}),ce=l.extend({method:H(`initialize`),params:se}),le=L({experimental:B(j(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:L({listChanged:P().optional()}).optional(),resources:L({subscribe:P().optional(),listChanged:P().optional()}).optional(),tools:L({listChanged:P().optional()}).optional(),tasks:ae.optional(),extensions:B(j(),t).optional()}),ue=f.extend({protocolVersion:j(),capabilities:le,serverInfo:ne,instructions:j().optional()}),v=d.extend({method:H(`notifications/initialized`),params:u.optional()}),de=l.extend({method:H(`ping`),params:s.optional()}),fe=L({progress:N(),total:U(N()),message:U(j())}),pe=L({...u.shape,...fe.shape,progressToken:n}),me=d.extend({method:H(`notifications/progress`),params:pe}),he=s.extend({cursor:r.optional()}),ge=l.extend({params:he.optional()}),_e=f.extend({nextCursor:r.optional()}),ve=L({uri:j(),mimeType:U(j()),_meta:B(j(),F()).optional()}),ye=ve.extend({text:j()}),be=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),xe=ve.extend({blob:be}),Se=V([`user`,`assistant`]),Ce=L({audience:I(Se).optional(),priority:N().min(0).max(1).optional(),lastModified:Ud({offset:!0}).optional()}),y=L({...te.shape,...ee.shape,uri:j(),description:U(j()),mimeType:U(j()),size:U(N()),annotations:Ce.optional(),_meta:U(R({}))}),we=L({...te.shape,...ee.shape,uriTemplate:j(),description:U(j()),mimeType:U(j()),annotations:Ce.optional(),_meta:U(R({}))}),Te=ge.extend({method:H(`resources/list`)}),Ee=_e.extend({resources:I(y)}),De=ge.extend({method:H(`resources/templates/list`)}),Oe=_e.extend({resourceTemplates:I(we)}),ke=s.extend({uri:j()}),Ae=ke,je=l.extend({method:H(`resources/read`),params:Ae}),Me=f.extend({contents:I(z([ye,xe]))}),Ne=d.extend({method:H(`notifications/resources/list_changed`),params:u.optional()}),Pe=ke,Fe=l.extend({method:H(`resources/subscribe`),params:Pe}),Ie=ke,Le=l.extend({method:H(`resources/unsubscribe`),params:Ie}),Re=u.extend({uri:j()}),ze=d.extend({method:H(`notifications/resources/updated`),params:Re}),Be=L({name:j(),description:U(j()),required:U(P())}),b=L({...te.shape,...ee.shape,description:U(j()),arguments:U(I(Be)),_meta:U(R({}))}),Ve=ge.extend({method:H(`prompts/list`)}),He=_e.extend({prompts:I(b)}),Ue=s.extend({name:j(),arguments:B(j(),j()).optional()}),We=l.extend({method:H(`prompts/get`),params:Ue}),Ge=L({type:H(`text`),text:j(),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),Ke=L({type:H(`image`),data:be,mimeType:j(),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),qe=L({type:H(`audio`),data:be,mimeType:j(),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),Je=L({type:H(`tool_use`),name:j(),id:j(),input:B(j(),F()),_meta:B(j(),F()).optional()}),x=L({type:H(`resource`),resource:z([ye,xe]),annotations:Ce.optional(),_meta:B(j(),F()).optional()}),Ye=y.extend({type:H(`resource_link`)}),Xe=z([Ge,Ke,qe,Ye,x]),S=L({role:Se,content:Xe}),C=f.extend({description:j().optional(),messages:I(S)}),Ze=d.extend({method:H(`notifications/prompts/list_changed`),params:u.optional()}),Qe=L({title:j().optional(),readOnlyHint:P().optional(),destructiveHint:P().optional(),idempotentHint:P().optional(),openWorldHint:P().optional()}),$e=L({taskSupport:V([`required`,`optional`,`forbidden`]).optional()}),et=L({...te.shape,...ee.shape,description:j().optional(),inputSchema:L({type:H(`object`),properties:B(j(),e).optional(),required:I(j()).optional()}).catchall(F()),outputSchema:L({type:H(`object`),properties:B(j(),e).optional(),required:I(j()).optional()}).catchall(F()).optional(),annotations:Qe.optional(),execution:$e.optional(),_meta:B(j(),F()).optional()}),tt=ge.extend({method:H(`tools/list`)}),nt=_e.extend({tools:I(et)}),rt=f.extend({content:I(Xe),structuredContent:B(j(),F()).optional(),isError:P().optional()}),w=c.extend({name:j(),arguments:B(j(),F()).optional()}),it=l.extend({method:H(`tools/call`),params:w}),at=d.extend({method:H(`notifications/tools/list_changed`),params:u.optional()}),ot=V([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),st=s.extend({level:ot}),ct=l.extend({method:H(`logging/setLevel`),params:st}),lt=u.extend({level:ot,logger:j().optional(),data:F()}),ut=d.extend({method:H(`notifications/message`),params:lt}),dt=L({name:j().optional()}),ft=L({hints:I(dt).optional(),costPriority:N().min(0).max(1).optional(),speedPriority:N().min(0).max(1).optional(),intelligencePriority:N().min(0).max(1).optional()}),pt=L({mode:V([`auto`,`required`,`none`]).optional()}),mt=L({type:H(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:I(Xe),structuredContent:L({}).loose().optional(),isError:P().optional(),_meta:B(j(),F()).optional()}),ht=Au(`type`,[Ge,Ke,qe]),gt=Au(`type`,[Ge,Ke,qe,Je,mt]),_t=L({role:Se,content:z([gt,I(gt)]),_meta:B(j(),F()).optional()}),vt=c.extend({messages:I(_t),modelPreferences:ft.optional(),systemPrompt:j().optional(),includeContext:V([`none`,`thisServer`,`allServers`]).optional(),temperature:N().optional(),maxTokens:N().int(),stopSequences:I(j()).optional(),metadata:t.optional(),tools:I(et).optional(),toolChoice:pt.optional()}),yt=l.extend({method:H(`sampling/createMessage`),params:vt}),bt=f.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:Se,content:ht}),xt=f.extend({model:j(),stopReason:U(V([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:Se,content:z([gt,I(gt)])}),St=L({type:H(`boolean`),title:j().optional(),description:j().optional(),default:P().optional()}),Ct=L({type:H(`string`),title:j().optional(),description:j().optional(),minLength:N().optional(),maxLength:N().optional(),format:V([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),wt=L({type:V([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:N().optional(),maximum:N().optional(),default:N().optional()}),Tt=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),default:j().optional()}),Et=L({type:H(`string`),title:j().optional(),description:j().optional(),oneOf:I(L({const:j(),title:j()})),default:j().optional()}),Dt=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),enumNames:I(j()).optional(),default:j().optional()}),Ot=z([Tt,Et]),kt=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({type:H(`string`),enum:I(j())}),default:I(j()).optional()}),At=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({anyOf:I(L({const:j(),title:j()}))}),default:I(j()).optional()}),jt=z([kt,At]),Mt=z([Dt,Ot,jt]),Nt=z([Mt,St,Ct,wt]),Pt=c.extend({mode:H(`form`).optional(),message:j(),requestedSchema:L({type:H(`object`),properties:B(j(),Nt),required:I(j()).optional()}).catchall(F())}),Ft=c.extend({mode:H(`url`),message:j(),elicitationId:j(),url:j().url()}),It=z([Pt,Ft]),Lt=l.extend({method:H(`elicitation/create`),params:It}),Rt=u.extend({elicitationId:j()}),zt=d.extend({method:H(`notifications/elicitation/complete`),params:Rt}),Bt=f.extend({action:V([`accept`,`decline`,`cancel`]),content:zd(e=>e===null?void 0:e,B(j(),z([j(),N(),P(),I(j())])).optional())}),Vt=L({type:H(`ref/resource`),uri:j()}),Ht=L({type:H(`ref/prompt`),name:j()}),Ut=s.extend({ref:z([Ht,Vt]),argument:L({name:j(),value:j()}),context:L({arguments:B(j(),j()).optional()}).optional()}),Wt=l.extend({method:H(`completion/complete`),params:Ut}),Gt=f.extend({completion:R({values:I(j()).max(100),total:U(N().int()),hasMore:U(P())})}),Kt=L({uri:j().startsWith(`file://`),name:j().optional(),_meta:B(j(),F()).optional()}),qt=l.extend({method:H(`roots/list`),params:s.optional()}),Jt=f.extend({roots:I(Kt)}),Yt=d.extend({method:H(`notifications/roots/list_changed`),params:u.optional()}),Xt=R({ttl:N().optional(),pollInterval:N().optional()}),Zt=V([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Qt=L({taskId:j(),status:Zt,ttl:z([N(),fu()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:U(N()),statusMessage:U(j())}),$t=f.extend({task:Qt}),en=u.merge(Qt),tn=d.extend({method:H(`notifications/tasks/status`),params:en}),nn=l.extend({method:H(`tasks/get`),params:s.extend({taskId:j()})}),rn=f.merge(Qt),an=l.extend({method:H(`tasks/result`),params:s.extend({taskId:j()})}),on=f.loose(),sn=ge.extend({method:H(`tasks/list`)}),cn=_e.extend({tasks:I(Qt)}),ln=l.extend({method:H(`tasks/cancel`),params:s.extend({taskId:j()})});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:g,IconSchema:_,IconsSchema:ee,BaseMetadataSchema:te,ImplementationSchema:ne,ClientTasksCapabilitySchema:ie,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:se,InitializeRequestSchema:ce,ServerCapabilitiesSchema:le,InitializeResultSchema:ue,InitializedNotificationSchema:v,PingRequestSchema:de,ProgressSchema:fe,ProgressNotificationParamsSchema:pe,ProgressNotificationSchema:me,PaginatedRequestParamsSchema:he,PaginatedRequestSchema:ge,PaginatedResultSchema:_e,ResourceContentsSchema:ve,TextResourceContentsSchema:ye,BlobResourceContentsSchema:xe,RoleSchema:Se,AnnotationsSchema:Ce,ResourceSchema:y,ResourceTemplateSchema:we,ListResourcesRequestSchema:Te,ListResourcesResultSchema:Ee,ListResourceTemplatesRequestSchema:De,ListResourceTemplatesResultSchema:Oe,ResourceRequestParamsSchema:ke,ReadResourceRequestParamsSchema:Ae,ReadResourceRequestSchema:je,ReadResourceResultSchema:Me,ResourceListChangedNotificationSchema:Ne,SubscribeRequestParamsSchema:Pe,SubscribeRequestSchema:Fe,UnsubscribeRequestParamsSchema:Ie,UnsubscribeRequestSchema:Le,ResourceUpdatedNotificationParamsSchema:Re,ResourceUpdatedNotificationSchema:ze,PromptArgumentSchema:Be,PromptSchema:b,ListPromptsRequestSchema:Ve,ListPromptsResultSchema:He,GetPromptRequestParamsSchema:Ue,GetPromptRequestSchema:We,TextContentSchema:Ge,ImageContentSchema:Ke,AudioContentSchema:qe,ToolUseContentSchema:Je,EmbeddedResourceSchema:x,ResourceLinkSchema:Ye,ContentBlockSchema:Xe,PromptMessageSchema:S,GetPromptResultSchema:C,PromptListChangedNotificationSchema:Ze,ToolAnnotationsSchema:Qe,ToolExecutionSchema:$e,ToolSchema:et,ListToolsRequestSchema:tt,ListToolsResultSchema:nt,CallToolResultSchema:rt,CallToolRequestParamsSchema:w,CallToolRequestSchema:it,ToolListChangedNotificationSchema:at,LoggingLevelSchema:ot,SetLevelRequestParamsSchema:st,SetLevelRequestSchema:ct,LoggingMessageNotificationParamsSchema:lt,LoggingMessageNotificationSchema:ut,ModelHintSchema:dt,ModelPreferencesSchema:ft,ToolChoiceSchema:pt,ToolResultContentSchema:mt,SamplingContentSchema:ht,SamplingMessageContentBlockSchema:gt,SamplingMessageSchema:_t,CreateMessageRequestParamsSchema:vt,CreateMessageRequestSchema:yt,CreateMessageResultSchema:bt,CreateMessageResultWithToolsSchema:xt,BooleanSchemaSchema:St,StringSchemaSchema:Ct,NumberSchemaSchema:wt,UntitledSingleSelectEnumSchemaSchema:Tt,TitledSingleSelectEnumSchemaSchema:Et,LegacyTitledEnumSchemaSchema:Dt,SingleSelectEnumSchemaSchema:Ot,UntitledMultiSelectEnumSchemaSchema:kt,TitledMultiSelectEnumSchemaSchema:At,MultiSelectEnumSchemaSchema:jt,EnumSchemaSchema:Mt,PrimitiveSchemaDefinitionSchema:Nt,ElicitRequestFormParamsSchema:Pt,ElicitRequestURLParamsSchema:Ft,ElicitRequestParamsSchema:It,ElicitRequestSchema:Lt,ElicitationCompleteNotificationParamsSchema:Rt,ElicitationCompleteNotificationSchema:zt,ElicitResultSchema:Bt,ResourceTemplateReferenceSchema:Vt,PromptReferenceSchema:Ht,CompleteRequestParamsSchema:Ut,CompleteRequestSchema:Wt,CompleteResultSchema:Gt,RootSchema:Kt,ListRootsRequestSchema:qt,ListRootsResultSchema:Jt,RootsListChangedNotificationSchema:Yt,TaskCreationParamsSchema:Xt,TaskStatusSchema:Zt,TaskSchema:Qt,CreateTaskResultSchema:$t,TaskStatusNotificationParamsSchema:en,TaskStatusNotificationSchema:tn,GetTaskRequestSchema:nn,GetTaskResultSchema:rn,GetTaskPayloadRequestSchema:an,GetTaskPayloadResultSchema:on,ListTasksRequestSchema:sn,ListTasksResultSchema:cn,CancelTaskRequestSchema:ln,CancelTaskResultSchema:f.merge(Qt),ClientRequestSchema:z([de,ce,Wt,ct,We,Ve,Te,De,je,Fe,Le,it,tt,nn,an,sn,ln]),ClientNotificationSchema:z([g,me,v,Yt,tn]),ClientResultSchema:z([m,bt,xt,Bt,Jt,rn,cn,$t]),ServerRequestSchema:z([de,yt,Lt,qt,nn,an,sn,ln]),ServerNotificationSchema:z([g,me,ut,ze,Ne,at,Ze,tn,zt]),ServerResultSchema:z([m,ue,Gt,C,He,Ee,Oe,Me,rt,nt,rn,cn,$t]),CallToolResultWireSchema:F().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of Lh)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(Rh).pipe(rt)}}var Bh;function Vh(){return Bh??=zh()}function Hh(e){return e.type!==`object`}var Uh=new Set([`const`,`enum`,`default`,`examples`]),Wh=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Gh(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Kh(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Gh(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&&Gh(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]=Uh.has(o)?s:Wh.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 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,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Jh={"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},Yh={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},Xh;function Zh(){if(Xh)return Xh;let e=Vh();return Xh={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}},Xh}function Qh(e){return Object.prototype.hasOwnProperty.call(qh,e)}function $h(e){return Object.prototype.hasOwnProperty.call(Jh,e)}function eg(e){return Object.prototype.hasOwnProperty.call(Yh,e)}function tg(e){return eg(e)?Zh().resultSchemas[e]:void 0}function ng(e){return Qh(e)?Zh().requestSchemas[e]:void 0}function rg(e){return $h(e)?Zh().notificationSchemas[e]:void 0}Object.keys(qh),Object.keys(Jh);function ig(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ag(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 og={ok:!1,reason:`not-in-era`};function sg(e){return ig(e)&&ig(e.outputSchema)&&Hh(e.outputSchema)}function cg(e){return e}var lg={era:`2025-11-25`,hasRequestMethod:Qh,hasNotificationMethod:$h,validateRequest:(e,t)=>ag(ng(e),t),validateResult:(e,t)=>ag(tg(e),t),validateNotification:(e,t)=>ag(rg(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>og,validateInputResponse:()=>og,samplingResultVariant:((e,t)=>{let n=Vh();return ag(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Ih(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&Hh(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(ig(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:cg(e)}}return{kind:`complete`,result:cg(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>sg(e))?t:{...t,tools:n.map(e=>sg(e)?{...e,outputSchema:Kh(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function ug(){let e=wd(()=>z([j(),N(),P(),fu(),B(j(),e),I(e)])),t=B(j(),e),n=z([j(),N().int()]),r=j(),i=z([j(),N().int()]),a=V([`user`,`assistant`]),o=V([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=L({ttl:N().optional()}),l=L({taskId:j()}),u=R({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=L({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=L({_meta:u.optional()}),m=L({method:j(),params:p.loose().optional()}),h=L({src:j(),mimeType:j().optional(),sizes:I(j()).optional(),theme:V([`light`,`dark`]).optional()}),g=L({icons:I(h).optional()}),_=L({name:j(),title:j().optional()}),ee=_.extend({..._.shape,...g.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),te=zd(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Mu(L({form:Mu(L({applyDefaults:P().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=R({list:t.optional(),cancel:t.optional(),requests:R({sampling:R({createMessage:t.optional()}).optional(),elicitation:R({create:t.optional()}).optional()}).optional()}),re=R({list:t.optional(),cancel:t.optional(),requests:R({tools:R({call:t.optional()}).optional()}).optional()}),ie=L({experimental:B(j(),t).optional(),sampling:L({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:L({listChanged:P().optional()}).optional(),tasks:ne.optional(),extensions:B(j(),t).optional()}),ae=L({experimental:B(j(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:L({listChanged:P().optional()}).optional(),resources:L({subscribe:P().optional(),listChanged:P().optional()}).optional(),tools:L({listChanged:P().optional()}).optional(),tasks:re.optional(),extensions:B(j(),t).optional()}),oe=L({progress:N(),total:U(N()),message:U(j())}),se=L({...p.shape,...oe.shape,progressToken:n}),ce=m.extend({method:H(`notifications/progress`),params:se}),le=p.extend({level:o,logger:j().optional(),data:F()}),ue=m.extend({method:H(`notifications/message`),params:le}),v=L({uri:j(),mimeType:U(j()),_meta:B(j(),F()).optional()}),de=v.extend({text:j()}),fe=v.extend({blob:s}),pe=L({audience:I(a).optional(),priority:N().min(0).max(1).optional(),lastModified:Ud({offset:!0}).optional()}),me=L({..._.shape,...g.shape,uri:j(),description:U(j()),mimeType:U(j()),size:U(N()),annotations:pe.optional(),_meta:U(R({}))}),he=L({..._.shape,...g.shape,uriTemplate:j(),description:U(j()),mimeType:U(j()),annotations:pe.optional(),_meta:U(R({}))}),ge=m.extend({method:H(`notifications/resources/list_changed`),params:p.optional()}),_e=p.extend({uri:j()}),ve=m.extend({method:H(`notifications/resources/updated`),params:_e}),ye=L({name:j(),description:U(j()),required:U(P())}),be=L({..._.shape,...g.shape,description:U(j()),arguments:U(I(ye)),_meta:U(R({}))}),xe=m.extend({method:H(`notifications/prompts/list_changed`),params:p.optional()}),Se=L({type:H(`text`),text:j(),annotations:pe.optional(),_meta:B(j(),F()).optional()}),Ce=L({type:H(`image`),data:s,mimeType:j(),annotations:pe.optional(),_meta:B(j(),F()).optional()}),y=L({type:H(`audio`),data:s,mimeType:j(),annotations:pe.optional(),_meta:B(j(),F()).optional()}),we=L({type:H(`tool_use`),name:j(),id:j(),input:B(j(),F()),_meta:B(j(),F()).optional()}),Te=L({type:H(`resource`),resource:z([de,fe]),annotations:pe.optional(),_meta:B(j(),F()).optional()}),Ee=me.extend({type:H(`resource_link`)}),De=z([Se,Ce,y,Ee,Te]),Oe=L({role:a,content:De}),ke=L({title:j().optional(),readOnlyHint:P().optional(),destructiveHint:P().optional(),idempotentHint:P().optional(),openWorldHint:P().optional()}),Ae=m.extend({method:H(`notifications/tools/list_changed`),params:p.optional()}),je=L({name:j().optional()}),Me=L({hints:I(je).optional(),costPriority:N().min(0).max(1).optional(),speedPriority:N().min(0).max(1).optional(),intelligencePriority:N().min(0).max(1).optional()}),Ne=L({mode:V([`auto`,`required`,`none`]).optional()}),Pe=L({type:H(`boolean`),title:j().optional(),description:j().optional(),default:P().optional()}),Fe=L({type:H(`string`),title:j().optional(),description:j().optional(),minLength:N().optional(),maxLength:N().optional(),format:V([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),Ie=L({type:V([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:N().optional(),maximum:N().optional(),default:N().optional()}),Le=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),default:j().optional()}),Re=L({type:H(`string`),title:j().optional(),description:j().optional(),oneOf:I(L({const:j(),title:j()})),default:j().optional()}),ze=L({type:H(`string`),title:j().optional(),description:j().optional(),enum:I(j()),enumNames:I(j()).optional(),default:j().optional()}),Be=z([Le,Re]),b=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({type:H(`string`),enum:I(j())}),default:I(j()).optional()}),Ve=L({type:H(`array`),title:j().optional(),description:j().optional(),minItems:N().optional(),maxItems:N().optional(),items:L({anyOf:I(L({const:j(),title:j()}))}),default:I(j()).optional()}),He=z([b,Ve]),Ue=z([ze,Be,He]),We=z([Ue,Pe,Fe,Ie]),Ge=f.extend({mode:H(`form`).optional(),message:j(),requestedSchema:L({type:H(`object`),properties:B(j(),We),required:I(j()).optional()}).catchall(F())}),Ke=L({type:H(`ref/resource`),uri:j()}),qe=L({type:H(`ref/prompt`),name:j()}),Je=L({uri:j().startsWith(`file://`),name:j().optional(),_meta:B(j(),F()).optional()}),x=ie.shape,Ye=L({experimental:x.experimental,sampling:x.sampling,elicitation:x.elicitation,roots:x.roots,extensions:x.extensions}),Xe=ae.shape,S=L({experimental:Xe.experimental,logging:Xe.logging,completions:Xe.completions,prompts:Xe.prompts,resources:Xe.resources,tools:Xe.tools,extensions:Xe.extensions}),C=R({progressToken:n.optional(),[cf]:j(),[lf]:ee.optional(),[df]:Ye,[pf]:o.optional()}),Ze=L({..._.shape,...g.shape,description:j().optional(),inputSchema:R({$schema:j().optional(),type:H(`object`)}),outputSchema:R({$schema:j().optional()}).optional(),annotations:ke.optional(),_meta:B(j(),F()).optional()}),Qe=L({type:H(`tool_result`),toolUseId:j(),content:I(De),structuredContent:F().optional(),isError:P().optional(),_meta:B(j(),F()).optional()}),$e=z([Se,Ce,y,we,Qe]),et=L({role:a,content:z([$e,I($e)]),_meta:B(j(),F()).optional()}),tt=j(),nt=R({[uf]:ee.optional().catch(void 0)}),rt=nt.optional();function w(e){return R({_meta:rt,resultType:tt.default(`complete`),...e})}let it=w({}),at=w({nextCursor:r.optional()}),ot=w({content:I(De),structuredContent:F().optional(),isError:P().optional()}),st=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),tools:I(Ze),nextCursor:r.optional()}),ct=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),prompts:I(be),nextCursor:r.optional()}),lt=w({description:j().optional(),messages:I(Oe)}),ut=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resources:I(me),nextCursor:r.optional()}),dt=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resourceTemplates:I(he),nextCursor:r.optional()}),ft=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),contents:I(z([de,fe]))}),pt=w({completion:L({values:I(j()).max(100),total:N().int().optional(),hasMore:P().optional()}).loose()}),mt=w({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`])}),ht=w({ttlMs:N().int().min(0).catch(0),cacheScope:V([`public`,`private`]).catch(`private`),supportedVersions:I(j()),capabilities:S,instructions:j().optional()}),gt=L({messages:I(et),modelPreferences:Me.optional(),systemPrompt:j().optional(),includeContext:V([`none`,`thisServer`,`allServers`]).optional(),temperature:N().optional(),maxTokens:N().int(),stopSequences:I(j()).optional(),metadata:t.optional(),tools:I(Ze).optional(),toolChoice:Ne.optional()}),_t=L({method:H(`sampling/createMessage`),params:gt}),vt=L({method:H(`roots/list`),params:L({_meta:B(j(),F()).optional()}).optional()}),yt=L({...et.shape,model:j(),stopReason:j().optional()}),bt=L({roots:I(Je)}),xt=L({action:V([`accept`,`decline`,`cancel`]),content:B(j(),z([j(),N(),P(),I(j())])).optional()}),St=L({mode:H(`url`),message:j(),url:j().url()}),Ct=z([Ge,St]),wt=L({method:H(`elicitation/create`),params:Ct}),Tt=z([_t,vt,wt]),Et=z([yt,bt,xt]),Dt=B(j(),Tt),Ot=B(j(),Et),kt=w({inputRequests:Dt.optional(),requestState:j().optional()}),At={inputResponses:Ot.optional(),requestState:j().optional()},jt=L({_meta:C,...At}),Mt=R({progressToken:n.optional()});function Nt(e,t){return L({method:H(e),params:L({_meta:C,...t})})}function Pt(e,t){return L({method:H(e),params:L({_meta:Mt.optional(),...t}).optional()})}let Ft={name:j(),arguments:B(j(),F()).optional(),...At},It={cursor:r.optional()},Lt=Nt(`tools/call`,Ft),Rt=Nt(`tools/list`,It),zt=Nt(`prompts/list`,It),Bt=Nt(`prompts/get`,{name:j(),arguments:B(j(),j()).optional(),...At}),Vt=Nt(`resources/list`,It),Ht=Nt(`resources/templates/list`,It),Ut=Nt(`resources/read`,{uri:j(),...At}),Wt={ref:z([qe,Ke]),argument:L({name:j(),value:j()}),context:L({arguments:B(j(),j()).optional()}).optional()},Gt=Nt(`completion/complete`,Wt),Kt=Nt(`server/discover`,{}),qt=L({toolsListChanged:P().optional(),promptsListChanged:P().optional(),resourcesListChanged:P().optional(),resourceSubscriptions:I(j()).optional()}),Jt={notifications:qt},Yt=Nt(`subscriptions/listen`,Jt),Xt=nt.extend({"io.modelcontextprotocol/subscriptionId":i}),Zt=R({_meta:Xt,resultType:tt.default(`complete`)}),Qt={"tools/call":Pt(`tools/call`,Ft),"tools/list":Pt(`tools/list`,It),"prompts/get":Pt(`prompts/get`,{name:j(),arguments:B(j(),j()).optional()}),"prompts/list":Pt(`prompts/list`,It),"resources/list":Pt(`resources/list`,It),"resources/templates/list":Pt(`resources/templates/list`,It),"resources/read":Pt(`resources/read`,{uri:j()}),"completion/complete":Pt(`completion/complete`,Wt),"server/discover":Pt(`server/discover`,{}),"subscriptions/listen":Pt(`subscriptions/listen`,Jt)};function $t(e){return R({_meta:rt,...e})}let en={"tools/call":$t({content:I(De),structuredContent:F().optional(),isError:P().optional()}),"tools/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),tools:I(Ze),nextCursor:r.optional()}),"prompts/get":$t({description:j().optional(),messages:I(Oe)}),"prompts/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),prompts:I(be),nextCursor:r.optional()}),"resources/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resources:I(me),nextCursor:r.optional()}),"resources/templates/list":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),resourceTemplates:I(he),nextCursor:r.optional()}),"resources/read":$t({ttlMs:N().int().min(0),cacheScope:V([`public`,`private`]),contents:I(z([de,fe]))}),"completion/complete":$t({completion:L({values:I(j()).max(100),total:N().int().optional(),hasMore:P().optional()}).loose()}),"server/discover":$t({ttlMs:N().int().min(0).catch(0),cacheScope:V([`public`,`private`]).catch(`private`),supportedVersions:I(j()),capabilities:S,instructions:j().optional()}),"subscriptions/listen":$t({})},tn=R({"io.modelcontextprotocol/subscriptionId":i.optional()}),nn=L({method:H(`notifications/subscriptions/acknowledged`),params:L({_meta:tn.optional(),notifications:qt})}),rn=L({_meta:tn.optional(),requestId:i,reason:j().optional()}),an=L({method:H(`notifications/cancelled`),params:rn}),on={"notifications/cancelled":an,"notifications/progress":ce,"notifications/message":ue,"notifications/resources/updated":ve,"notifications/resources/list_changed":ge,"notifications/tools/list_changed":Ae,"notifications/prompts/list_changed":xe,"notifications/subscriptions/acknowledged":nn},sn=e=>L({jsonrpc:H(`2.0`),id:z([j(),N().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:g,BaseMetadataSchema:_,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:ce,LoggingMessageNotificationParamsSchema:le,LoggingMessageNotificationSchema:ue,ResourceContentsSchema:v,TextResourceContentsSchema:de,BlobResourceContentsSchema:fe,AnnotationsSchema:pe,ResourceSchema:me,ResourceTemplateSchema:he,ResourceListChangedNotificationSchema:ge,ResourceUpdatedNotificationParamsSchema:_e,ResourceUpdatedNotificationSchema:ve,PromptArgumentSchema:ye,PromptSchema:be,PromptListChangedNotificationSchema:xe,TextContentSchema:Se,ImageContentSchema:Ce,AudioContentSchema:y,ToolUseContentSchema:we,EmbeddedResourceSchema:Te,ResourceLinkSchema:Ee,ContentBlockSchema:De,PromptMessageSchema:Oe,ToolAnnotationsSchema:ke,ToolListChangedNotificationSchema:Ae,ModelHintSchema:je,ModelPreferencesSchema:Me,ToolChoiceSchema:Ne,BooleanSchemaSchema:Pe,StringSchemaSchema:Fe,NumberSchemaSchema:Ie,UntitledSingleSelectEnumSchemaSchema:Le,TitledSingleSelectEnumSchemaSchema:Re,LegacyTitledEnumSchemaSchema:ze,SingleSelectEnumSchemaSchema:Be,UntitledMultiSelectEnumSchemaSchema:b,TitledMultiSelectEnumSchemaSchema:Ve,MultiSelectEnumSchemaSchema:He,EnumSchemaSchema:Ue,PrimitiveSchemaDefinitionSchema:We,ElicitRequestFormParamsSchema:Ge,ResourceTemplateReferenceSchema:Ke,PromptReferenceSchema:qe,RootSchema:Je,ClientCapabilities2026Schema:Ye,ServerCapabilities2026Schema:S,RequestMetaEnvelopeSchema:C,ToolSchema:Ze,ToolResultContentSchema:Qe,SamplingMessageContentBlockSchema:$e,SamplingMessageSchema:et,ResultTypeSchema:tt,ResultMetaSchema:nt,ResultSchema:it,PaginatedResultSchema:at,CallToolResultSchema:ot,ListToolsResultSchema:st,ListPromptsResultSchema:ct,GetPromptResultSchema:lt,ListResourcesResultSchema:ut,ListResourceTemplatesResultSchema:dt,ReadResourceResultSchema:ft,CompleteResultSchema:pt,CacheableResultSchema:mt,DiscoverResultSchema:ht,CreateMessageRequestParamsSchema:gt,CreateMessageRequestSchema:_t,ListRootsRequestSchema:vt,CreateMessageResultSchema:yt,ListRootsResultSchema:bt,ElicitResultSchema:xt,ElicitRequestURLParamsSchema:St,ElicitRequestParamsSchema:Ct,ElicitRequestSchema:wt,InputRequestSchema:Tt,InputResponseSchema:Et,InputRequestsSchema:Dt,InputResponsesSchema:Ot,InputRequiredResultSchema:kt,InputResponseRequestParamsSchema:jt,CallToolRequestSchema:Lt,ListToolsRequestSchema:Rt,ListPromptsRequestSchema:zt,GetPromptRequestSchema:Bt,ListResourcesRequestSchema:Vt,ListResourceTemplatesRequestSchema:Ht,ReadResourceRequestSchema:Ut,CompleteRequestSchema:Gt,DiscoverRequestSchema:Kt,SubscriptionFilterSchema:qt,SubscriptionsListenRequestSchema:Yt,SubscriptionsListenResultMetaSchema:Xt,SubscriptionsListenResultSchema:Zt,dispatchRequestSchemas:Qt,dispatchResultSchemas:en,NotificationMetaSchema:tn,SubscriptionsAcknowledgedNotificationSchema:nn,CancelledNotificationParamsSchema:rn,CancelledNotificationSchema:an,notificationSchemas2026:on,JSONRPCResultResponseSchema:sn(it),CallToolResultResponseSchema:sn(z([ot,kt])),ListToolsResultResponseSchema:sn(st),ListPromptsResultResponseSchema:sn(ct),GetPromptResultResponseSchema:sn(z([lt,kt])),ListResourcesResultResponseSchema:sn(ut),ListResourceTemplatesResultResponseSchema:sn(dt),ReadResourceResultResponseSchema:sn(z([ft,kt])),CompleteResultResponseSchema:sn(pt),DiscoverResultResponseSchema:sn(ht)}}var dg;function fg(){return dg??=ug()}var pg=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function mg(e){return pg.includes(e)}var hg=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function gg(e){return e[hg]}function _g(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function vg(e){return e===`public`||e===`private`}var X=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}({}),yg=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Mh(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 Mh(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,jh(this,new.target)}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new xg(e.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Sg({supported:e.supported,requested:e.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===X.ResourceNotFound||Object.keys(e).length===1))return new bg(e.uri,n)}if(t===X.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Cg({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},bg=class extends yg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},xg=class extends yg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Sg=class extends yg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Cg=class extends yg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},wg=0,Tg=`private`,Eg=[`tools/call`,`prompts/get`,`resources/read`];function Dg(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||Eg.includes(e))return t;throw new yg(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Og(e,t){let n=gg(t);if(t.resultType!==`complete`||!mg(e))return n===void 0?t:Ng(t);let r=t,i=_g(r.ttlMs)?r.ttlMs:jg(n),a=vg(r.cacheScope)?r.cacheScope:Mg(n),o={...r,ttlMs:i,cacheScope:a};return delete o[hg],o}function kg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ag(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[uf]:t}}:!kg(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[uf]:t}}}function jg(e){return e!==void 0&&_g(e.ttlMs)?e.ttlMs:wg}function Mg(e){return e!==void 0&&vg(e.cacheScope)?e.cacheScope:Tg}function Ng(e){let t={...e};return delete t[hg],t}var Pg=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Fg;function Ig(){if(Fg)return Fg;let e=fg();return Fg={request:{"elicitation/create":L({method:H(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":L({method:H(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":L({method:H(`roots/list`),params:R({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Fg}function Lg(e){return Pg.includes(e)}function Rg(e){return Lg(e)?Ig().request[e]:void 0}function zg(e){return Lg(e)?Ig().response[e]:void 0}var Bg={"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},Vg={"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 Hg(e){return Object.prototype.hasOwnProperty.call(Bg,e)}function Ug(e){return Object.prototype.hasOwnProperty.call(Vg,e)}function Wg(e){return Object.prototype.hasOwnProperty.call(Bg,e)}function Gg(e){return Hg(e)?fg().dispatchRequestSchemas[e]:void 0}function Kg(e){return Wg(e)?fg().dispatchResultSchemas[e]:void 0}function qg(e){return Ug(e)?fg().notificationSchemas2026[e]:void 0}Object.keys(Bg),Object.keys(Vg);function Jg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Yg(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 Xg={ok:!1,reason:`not-in-era`},Zg=[cf,df];function Qg(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=>Jg(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Jg(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Jg(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var $g={era:`2026-07-28`,hasRequestMethod:Hg,hasNotificationMethod:Ug,hasInputRequestMethod:e=>Rg(e)!==void 0,validateRequest:(e,t)=>Yg(Gg(e),t),validateResult:(e,t)=>Yg(Kg(e),t),validateNotification:(e,t)=>Yg(qg(e),t),validateInputRequest:(e,t)=>Yg(Rg(e),t),validateInputResponse:(e,t)=>Yg(zg(e),t),samplingResultVariant:()=>Xg,outboundEnvelope(e){return{[cf]:e.protocolVersion,[lf]:e.clientInfo,[df]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Zg)n in e||t.push({key:n,problem:`missing`});let n=fg().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=>Ih(e),inputRequestSchema:Rg,decodeResult(e,t){if(!Jg(t))return{kind:`invalid`,error:new Y(Nh.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Y(Nh.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 Y(Nh.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Jg(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Y(Nh.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 Y(Nh.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=t_(),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 Y(Nh.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 Ag(Og(e,Dg(e,Qg(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=fg().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(`; `)}`}},e_;function t_(){if(e_)return e_;let e=fg();return e_={"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},e_}var n_=`2026-07-28`;function r_(e){return e!==void 0&&Fh(e)?$g:lg}function i_(e){return e.revision===void 0?e.era===`modern`?$g.era:lg.era:r_(e.revision).era}function a_(e){return s_.some(t=>t.hasRequestMethod(e))}function o_(e){return s_.some(t=>t.hasNotificationMethod(e))}var s_=[lg,$g],c_=i({AnnotationsSchema:()=>lp,AudioContentSchema:()=>Hp,BaseMetadataSchema:()=>Rf,BaseRequestParamsSchema:()=>xf,BlobResourceContentsSchema:()=>sp,BooleanSchemaSchema:()=>Cm,CallToolRequestParamsSchema:()=>rm,CallToolRequestSchema:()=>im,CallToolResultSchema:()=>tm,CancelTaskRequestSchema:()=>lh,CancelTaskResultSchema:()=>uh,CancelledNotificationParamsSchema:()=>Pf,CancelledNotificationSchema:()=>Ff,ClientCapabilitiesSchema:()=>Uf,ClientNotificationSchema:()=>fh,ClientRequestSchema:()=>dh,ClientResultSchema:()=>ph,ClientTasksCapabilitySchema:()=>Vf,CompatibilityCallToolResultSchema:()=>nm,CompleteRequestParamsSchema:()=>Wm,CompleteRequestSchema:()=>Gm,CompleteResultSchema:()=>Km,ContentBlockSchema:()=>Kp,CreateMessageRequestParamsSchema:()=>ym,CreateMessageRequestSchema:()=>bm,CreateMessageResultSchema:()=>xm,CreateMessageResultWithToolsSchema:()=>Sm,CreateTaskResultSchema:()=>eh,CursorSchema:()=>_f,DiscoverRequestSchema:()=>Yf,DiscoverResultSchema:()=>Xf,ElicitRequestFormParamsSchema:()=>Fm,ElicitRequestParamsSchema:()=>Lm,ElicitRequestSchema:()=>Rm,ElicitRequestURLParamsSchema:()=>Im,ElicitResultSchema:()=>Vm,ElicitationCompleteNotificationParamsSchema:()=>zm,ElicitationCompleteNotificationSchema:()=>Bm,EmbeddedResourceSchema:()=>Wp,EmptyResultSchema:()=>Nf,EnumSchemaSchema:()=>Nm,GetPromptRequestParamsSchema:()=>Rp,GetPromptRequestSchema:()=>zp,GetPromptResultSchema:()=>Jp,GetTaskPayloadRequestSchema:()=>ah,GetTaskPayloadResultSchema:()=>oh,GetTaskRequestSchema:()=>rh,GetTaskResultSchema:()=>ih,IconSchema:()=>If,IconsSchema:()=>Lf,ImageContentSchema:()=>Vp,ImplementationSchema:()=>zf,InitializeRequestParamsSchema:()=>Wf,InitializeRequestSchema:()=>Gf,InitializeResultSchema:()=>qf,InitializedNotificationSchema:()=>Jf,JSONArraySchema:()=>hf,JSONObjectSchema:()=>G,JSONRPCErrorResponseSchema:()=>Af,JSONRPCMessageSchema:()=>jf,JSONRPCNotificationSchema:()=>Of,JSONRPCRequestSchema:()=>Df,JSONRPCResponseSchema:()=>Mf,JSONRPCResultResponseSchema:()=>kf,JSONValueSchema:()=>mf,LegacyTitledEnumSchemaSchema:()=>Om,ListChangedOptionsBaseSchema:()=>om,ListPromptsRequestSchema:()=>Ip,ListPromptsResultSchema:()=>Lp,ListResourceTemplatesRequestSchema:()=>mp,ListResourceTemplatesResultSchema:()=>hp,ListResourcesRequestSchema:()=>fp,ListResourcesResultSchema:()=>pp,ListRootsRequestSchema:()=>Jm,ListRootsResultSchema:()=>Ym,ListTasksRequestSchema:()=>sh,ListTasksResultSchema:()=>ch,ListToolsRequestSchema:()=>$p,ListToolsResultSchema:()=>em,LoggingLevelSchema:()=>sm,LoggingMessageNotificationParamsSchema:()=>um,LoggingMessageNotificationSchema:()=>dm,ModelHintSchema:()=>fm,ModelPreferencesSchema:()=>pm,MultiSelectEnumSchemaSchema:()=>Mm,NotificationSchema:()=>wf,NotificationsParamsSchema:()=>Cf,NumberSchemaSchema:()=>Tm,PaginatedRequestParamsSchema:()=>tp,PaginatedRequestSchema:()=>np,PaginatedResultSchema:()=>rp,PingRequestSchema:()=>Zf,PrimitiveSchemaDefinitionSchema:()=>Pm,ProgressNotificationParamsSchema:()=>$f,ProgressNotificationSchema:()=>ep,ProgressSchema:()=>Qf,ProgressTokenSchema:()=>gf,PromptArgumentSchema:()=>Pp,PromptListChangedNotificationSchema:()=>Yp,PromptMessageSchema:()=>qp,PromptReferenceSchema:()=>Um,PromptSchema:()=>Fp,ReadResourceRequestParamsSchema:()=>_p,ReadResourceRequestSchema:()=>vp,ReadResourceResultSchema:()=>yp,RelatedTaskMetadataSchema:()=>yf,RequestIdSchema:()=>Ef,RequestMetaSchema:()=>bf,RequestSchema:()=>K,ResourceContentsSchema:()=>ip,ResourceLinkSchema:()=>Gp,ResourceListChangedNotificationSchema:()=>bp,ResourceRequestParamsSchema:()=>gp,ResourceSchema:()=>up,ResourceTemplateReferenceSchema:()=>Hm,ResourceTemplateSchema:()=>dp,ResourceUpdatedNotificationParamsSchema:()=>Mp,ResourceUpdatedNotificationSchema:()=>Np,ResultMetaObjectSchema:()=>Tf,ResultSchema:()=>q,RoleSchema:()=>cp,RootSchema:()=>qm,RootsListChangedNotificationSchema:()=>Xm,SamplingContentSchema:()=>gm,SamplingMessageContentBlockSchema:()=>_m,SamplingMessageSchema:()=>vm,ServerCapabilitiesSchema:()=>Kf,ServerNotificationSchema:()=>hh,ServerRequestSchema:()=>mh,ServerResultSchema:()=>gh,ServerTasksCapabilitySchema:()=>Hf,SetLevelRequestParamsSchema:()=>cm,SetLevelRequestSchema:()=>lm,SingleSelectEnumSchemaSchema:()=>km,StringSchemaSchema:()=>wm,SubscribeRequestParamsSchema:()=>xp,SubscribeRequestSchema:()=>Sp,SubscriptionFilterSchema:()=>Tp,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Op,SubscriptionsAcknowledgedNotificationSchema:()=>kp,SubscriptionsListenRequestParamsSchema:()=>Ep,SubscriptionsListenRequestSchema:()=>Dp,SubscriptionsListenResultMetaSchema:()=>Ap,SubscriptionsListenResultSchema:()=>jp,TaskAugmentedRequestParamsSchema:()=>Sf,TaskCreationParamsSchema:()=>Zm,TaskMetadataSchema:()=>vf,TaskSchema:()=>$m,TaskStatusNotificationParamsSchema:()=>th,TaskStatusNotificationSchema:()=>nh,TaskStatusSchema:()=>Qm,TextContentSchema:()=>Bp,TextResourceContentsSchema:()=>ap,TitledMultiSelectEnumSchemaSchema:()=>jm,TitledSingleSelectEnumSchemaSchema:()=>Dm,ToolAnnotationsSchema:()=>Xp,ToolChoiceSchema:()=>mm,ToolExecutionSchema:()=>Zp,ToolListChangedNotificationSchema:()=>am,ToolResultContentSchema:()=>hm,ToolSchema:()=>Qp,ToolUseContentSchema:()=>Up,UnsubscribeRequestParamsSchema:()=>Cp,UnsubscribeRequestSchema:()=>wp,UntitledMultiSelectEnumSchemaSchema:()=>Am,UntitledSingleSelectEnumSchemaSchema:()=>Em}),l_=e=>Df.safeParse(e).success,u_=e=>Of.safeParse(e).success,d_=e=>kf.safeParse(e).success,f_=e=>Af.safeParse(e).success;X.InvalidRequest,X.UnsupportedProtocolVersion,X.InvalidParams,X.MethodNotFound,X.InvalidParams,X.MissingRequiredClientCapability,X.ParseError,X.InvalidRequest,X.MethodNotFound,X.UnsupportedProtocolVersion,X.MissingRequiredClientCapability;function p_(e,t){return Mc(e,t)}function m_(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function h_(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 g_=!1,__=`draft-2020-12`;function v_(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:__});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().`);g_||(g_=!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=Tc(e,{target:__,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&&y_(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 y_(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`||y_(e)))}return!1}function b_(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function x_(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>b_(e)).join(`, `)}:{success:!0,data:n.value}}function S_(e){let t=Tc(e,{target:__,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var C_=/\\\.\\d\{(\d+)\}/;function w_(e){let t=C_.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=>Ud({local:e,offset:t,precision:n}))))}function T_(e,t){let n;switch(e){case`email`:n=[Qc()];break;case`uri`:n=[sl()];break;case`date`:n=[Wd()];break;case`date-time`:n=w_(t)}return new Set(n.map(e=>S_(e)).filter(e=>e!==void 0))}function E_(e,t,n){return n!==`zod`||T_(e,t).has(t)}function D_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function O_(e){try{return v_(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new yg(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var k_=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function A_(e){return k_.has(e)||e.startsWith(`x-`)}var j_=new Set([`$schema`,...Object.keys(Fm.shape.requestedSchema.shape)]),M_={string:m_([wm,Em,Dm,Om]),number:m_([Tm]),integer:m_([Tm]),boolean:m_([Cm]),array:m_([Am,jm])},N_=new Set(wm.shape.format.unwrap().options);function P_(e,t,n,r){if(!D_(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(M_,e.type)?M_[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||A_(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?N_.has(e.format)?(typeof s!=`string`||!E_(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function F_(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&D_(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,P_(n,`properties.${e}`,t,r)])):j_.has(i)?n[i]=a:A_(i)||r.push(i);if(r.length>0)throw new yg(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function I_(e,t){if(!D_(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!p_(Pm,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function L_(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>L_(e,t[r],`${n}[${r}]`)):!D_(e)||!D_(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?L_(r,t[e],i):A_(e)?[]:[i]})}function R_(e){if(!h_(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=F_(O_(e.requestedSchema),t),r=p_(Fm.shape.requestedSchema,n);if(!r.success)throw new yg(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${I_(n,r.error.message)}`);let i=L_(n,r.data);if(i.length>0)throw new yg(X.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 yg(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function z_(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(z_,{elicit(e){try{return{method:`elicitation/create`,params:R_(e)}}catch(e){throw e instanceof yg?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 B_=`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(`.`),V_={IdJagTokenExchangeResponseSchema:Sh,OAuthClientInformationFullSchema:Dh,OAuthClientInformationSchema:Eh,OAuthClientMetadataSchema:Th,OAuthClientRegistrationErrorSchema:Oh,OAuthErrorResponseSchema:Ch,OAuthMetadataSchema:vh,OAuthProtectedResourceMetadataSchema:_h,OAuthTokenRevocationRequestSchema:kh,OAuthTokensSchema:xh,OpenIdProviderDiscoveryMetadataSchema:bh,OpenIdProviderMetadataSchema:yh},H_={},U_={};function W_(e,t){let n=e.slice(0,-6);H_[n]=t,U_[n]=e=>t.safeParse(e).success}for(let e of B_)W_(e,c_[e]);for(let[e,t]of Object.entries(V_))W_(e,t);Object.freeze(H_),Object.freeze(U_);function G_(e){switch(e){case`initialize`:case`notifications/initialized`:return r_(void 0);case`server/discover`:return r_(n_);default:return}}var K_=[cf,lf,df,pf],q_=[`inputResponses`,`requestState`];function J_(e,t){let n=e.params;if(!$_(n))return{message:e,lifted:{}};let r=n._meta,i=$_(r)?K_.filter(e=>e in r):[],a=t===`request`?q_.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&$_(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 Y_(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 X_(e){return()=>e}var Z_=X_(void 0),Q_=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??of,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 Y(Nh.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 Y(Nh.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),d_(e)||f_(e)?this._onresponse(e):l_(e)?this._onrequest(e,t):u_(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 Y(Nh.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}=J_(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=i_(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(o_(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}=J_(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=i_(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(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(a_(n.method)&&!i.hasRequestMethod(n.method)){o(X.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(X.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(X.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:tv(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?Z_:X_(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),h_(t))return u(e,t,n);let i=Y_(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(X.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:X.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),d_(e)?n(e):n(yg.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),h_(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=Y_(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 r_(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=G_(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(a_(t)&&!e.hasRequestMethod(t))throw new Y(Nh.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 Y?e:new Y(Nh.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),ee=!1,te=e=>{ee||(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 Y?e:new Y(Nh.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(ee=!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(nv(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;x_(n,o).then(e=>{e.success?d(e.data):f(new Y(Nh.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>te(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ne=r?.timeout??6e4;this._setupTimeout(h,ne,r?.maxTotalTimeout,()=>te(new Y(Nh.RequestTimeout,`Request timed out`,{timeout:ne})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{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 Y(Nh.NotConnected,`Not connected`);if(o_(t.method)&&!e.hasNotificationMethod(t.method))throw new Y(Nh.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(!a_(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 yg(X.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 x_(t.params,{...r.params});if(!a.success)throw new yg(X.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(!o_(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 yg(X.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 x_(t.params,{...r.params});if(!i.success)throw new yg(X.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function $_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ev(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tv(e){let t={},n=[];if(!ev(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ev(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function nv(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 rv=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,iv=/^(?=.{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,av=/^(?:[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,ov=/^(?:(?:[^\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,sv=/^(?:(?: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,cv=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,lv=/^(?:\/(?:[^~/]|~0|~1)*)*$/,uv=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,dv=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,fv=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,pv=/^((([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 mv(e){return e.test.bind(e)}hv.bind(void 0,!1),mv(av),mv(ov),mv(sv),mv(iv),mv(fv),mv(pv),mv(cv),mv(lv),mv(uv),mv(dv);function hv(e,t){let n=t.match(rv);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 gv=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Mh(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 Mh(this,e)}constructor(e){super(e),this.name=new.target.name,jh(this,new.target)}};(class extends gv{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 gv{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 gv{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 gv{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 gv{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 Mh(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 Mh(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,jh(this,new.target)}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Mh(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 Mh(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,jh(this,new.target)}};var _v=`2026-01-26`,vv=L({}).passthrough(),yv=L({arguments:B(j(),F()).optional()}).passthrough(),bv=L({reason:j().optional()}).passthrough(),xv=L({theme:V([`light`,`dark`]).optional(),displayMode:V([`inline`,`fullscreen`,`pip`]).optional(),availableDisplayModes:I(V([`inline`,`fullscreen`,`pip`])).optional(),styles:L({variables:B(j(),z([j(),uu()])).optional(),css:L({fonts:j().optional()}).passthrough().optional()}).passthrough().optional(),safeAreaInsets:L({top:N(),right:N(),bottom:N(),left:N()}).optional()}).passthrough(),Sv=L({protocolVersion:j(),hostInfo:L({name:j(),version:j()}).passthrough(),hostCapabilities:B(j(),F()),hostContext:xv}).passthrough(),Cv=L({mode:V([`inline`,`fullscreen`,`pip`])}).passthrough(),wv=L({}).passthrough(),Tv=class{eventTarget;eventSource;onclose;onerror;onmessage;sessionId;setProtocolVersion;setSupportedProtocolVersions;started=!1;messageListener=e=>{if(e.source!==this.eventSource)return;let t=jf.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?.())}},Ev=class extends Q_{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:vv,result:wv},()=>({})),this.setNotificationHandler(`ui/notifications/tool-input`,{params:yv},e=>this.ontoolinput?.(e)),this.setNotificationHandler(`ui/notifications/tool-result`,{params:tm},e=>this.ontoolresult?.(e)),this.setNotificationHandler(`ui/notifications/tool-cancelled`,{params:bv},e=>this.ontoolcancelled?.(e)),this.setNotificationHandler(`ui/notifications/host-context-changed`,{params:xv},e=>{this.hostContext={...this.hostContext,...e},this.onhostcontextchanged?.(e)}),this.setRequestHandler(`ui/resource-teardown`,{params:vv,result:wv},(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},tm,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async requestDisplayMode(e,t){return this.request({method:`ui/request-display-mode`,params:e},Cv,t)}async connect(e=new Tv,t){await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this.capabilities,appInfo:this.appInfo,protocolVersion:_v}},Sv,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 Dv(e){document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e}function Ov(e,t=document.documentElement){for(let[n,r]of Object.entries(e))n.startsWith(`--`)&&r!==void 0&&t.style.setProperty(n,r)}function kv(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 Av={name:`qyl-mcp-server`,version:`4.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 && 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']) 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":`9.0.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.5.0`},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`}},jv={$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.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.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.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.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.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.Metrics.MetricAggregation":{"type":"string","enum":["avg","min","max","sum","count","last","p50","p90","p95","p99"],"description":"Server-side reducer applied to the points falling in one time bucket."},"OTel.Metrics.MetricBucket":{"type":"object","required":["bucket_start","value","point_count"],"properties":{"bucket_start":{"type":"string","format":"date-time","description":"Inclusive start of the bucket, aligned to the query\'s step from the query\'s start."},"value":{"anyOf":[{"type":"number","format":"double"},{"type":"null"}],"description":"The aggregation applied to the points in this bucket. Null when the bucket\\nholds no value: either no point landed in it, or every point that did was\\nan OTLP `NO_RECORDED_VALUE` marker."},"point_count":{"type":"integer","format":"int64","description":"Number of stored points folded into this bucket."}},"unevaluatedProperties":{"not":{}},"description":"One aggregated time bucket of a metric range query."},"OTel.Metrics.MetricDescriptor":{"type":"object","required":["name","kind","temporality","monotonic","series_count","last_seen"],"properties":{"name":{"type":"string","description":"Instrument name, e.g. `http.server.request.duration`."},"kind":{"$ref":"#/$defs/OTel.Metrics.MetricKind"},"temporality":{"$ref":"#/$defs/OTel.Metrics.MetricTemporality"},"monotonic":{"type":"boolean","description":"Whether a sum only ever increases. Meaningless for other kinds."},"unit":{"type":"string","description":"UCUM unit as reported by the producer, e.g. `s` or `{request}`."},"description":{"type":"string","description":"Producer-supplied description of the instrument."},"series_count":{"type":"integer","format":"int64","description":"Number of distinct attribute streams recorded under this name."},"last_seen":{"type":"string","format":"date-time","description":"Timestamp of the most recent point recorded under this name."}},"unevaluatedProperties":{"not":{}},"description":"One metric name recorded for a project, collapsed across all of its series.\\nThis is the catalog entry a client reads before it knows which series exist."},"OTel.Metrics.MetricKind":{"type":"string","enum":["gauge","sum","histogram","exponential_histogram"],"description":"Shape of a stored metric stream."},"OTel.Metrics.MetricQueryResult":{"type":"object","required":["name","kind","aggregation","step_ms","start_time","end_time","series","truncated"],"properties":{"name":{"type":"string","description":"Instrument name the query ran against."},"kind":{"$ref":"#/$defs/OTel.Metrics.MetricKind"},"unit":{"type":"string"},"aggregation":{"$ref":"#/$defs/OTel.Metrics.MetricAggregation"},"step_ms":{"type":"integer","format":"int64","description":"Bucket width actually used, which may be widened from the requested step."},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"series":{"type":"array","items":{"$ref":"#/$defs/OTel.Metrics.MetricSeriesResult"}},"truncated":{"type":"boolean","description":"Whether streams were dropped because the result exceeded the series limit."}},"unevaluatedProperties":{"not":{}},"description":"The answer to a metric range query: what was asked, and the streams it produced."},"OTel.Metrics.MetricSeries":{"type":"object","required":["series_id","name","kind","attributes","first_seen","last_seen"],"properties":{"series_id":{"type":"string","description":"Stable identifier for this stream, derived from its name, attributes and resource."},"name":{"type":"string","description":"Instrument name this series belongs to."},"kind":{"$ref":"#/$defs/OTel.Metrics.MetricKind"},"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"The attributes that distinguish this series from others under the same name."},"service_name":{"type":"string"},"unit":{"type":"string"},"first_seen":{"type":"string","format":"date-time"},"last_seen":{"type":"string","format":"date-time"}},"unevaluatedProperties":{"not":{}},"description":"One distinct attribute stream recorded under a metric name."},"OTel.Metrics.MetricSeriesResult":{"type":"object","required":["attributes","buckets"],"properties":{"attributes":{"type":"array","items":{"$ref":"#/$defs/Common.Attribute"},"description":"The grouping key that produced this stream."},"buckets":{"type":"array","items":{"$ref":"#/$defs/OTel.Metrics.MetricBucket"}}},"unevaluatedProperties":{"not":{}},"description":"One result stream of a metric range query. With no `group_by` the whole\\nresult is a single stream whose `attributes` are empty; with `group_by` there\\nis one stream per distinct combination of the requested attribute values."},"OTel.Metrics.MetricTemporality":{"type":"string","enum":["unspecified","delta","cumulative"],"description":"How successive points of a sum or histogram relate to each other."},"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."},"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.MetricsApi_list.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Metrics.MetricDescriptor"},"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.MetricsApi_list.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.MetricsApi_list.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.MetricsApi_list.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.MetricsApi_listSeries.Response.200":{"type":"object","required":["items","has_more"],"properties":{"items":{"type":"array","items":{"$ref":"#/$defs/OTel.Metrics.MetricSeries"},"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.MetricsApi_listSeries.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.MetricsApi_listSeries.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.MetricsApi_listSeries.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.MetricsApi_listSeries.Response.500":{"$ref":"#/$defs/Common.Errors.InternalServerError"},"Operations.MetricsApi_query.Response.200":{"$ref":"#/$defs/OTel.Metrics.MetricQueryResult"},"Operations.MetricsApi_query.Response.400":{"$ref":"#/$defs/Common.Errors.ValidationError"},"Operations.MetricsApi_query.Response.401":{"$ref":"#/$defs/Common.Errors.UnauthorizedError"},"Operations.MetricsApi_query.Response.404":{"$ref":"#/$defs/Common.Errors.NotFoundError"},"Operations.MetricsApi_query.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.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"}}')};function Mv(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema root must be an object`);let t=e,n=Fv(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=Nv(t,a),r={};if(n.length>0){let e;for(let t of n){let n=Iv(r.properties),i=Iv(t.properties),a=Lv(r.required),o=Lv(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={...Iv(r.properties),...c(t.properties)};let i=[...new Set([...Lv(r.required),...Lv(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),r},s=e=>Array.isArray(e)?e.map(s):typeof e==`object`&&e?o(e):e,c=e=>{let t=Iv(e);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,s(t)]))},l=e=>!Rv(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 Nv(e,t){if(e.type!==`object`||!Array.isArray(e.allOf))return[];let n=e.allOf.map(e=>Pv(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 Pv(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 Fv(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Published Qyl JSON Schema ${t} must be an object`);return e}function Iv(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function Lv(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)?e:[]}function Rv(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 zv=Mv(jv),Bv=Fv(zv.$defs,`$defs`),Vv=new Map;function Z(e){let t=Vv.get(e);if(t)return t;if(!Object.hasOwn(Bv,e))throw Error(`Published Qyl JSON Schema has no '${e}' definition`);let n=rf({$schema:zv.$schema,$defs:Bv,$ref:`#/$defs/${e}`});return Vv.set(e,n),n}Object.freeze(Object.keys(Bv).sort()),typeof jv.$id==`string`&&jv.$id;function Q(e){return Z(`Workbench.${e}`)}Z(`OTel.Traces.Span`),Z(`OTel.Traces.TraceSummary`),Z(`OTel.Traces.Trace`),Z(`OTel.Logs.LogRecord`),Z(`Domains.Observe.Session.SessionEntity`),Z(`Operations.TracesApi_list.Response.200`),Z(`Operations.TracesApi_getSpans.Response.200`),Z(`Operations.SessionsApi_getTraces.Response.200`),Z(`Operations.LogsApi_list.Response.200`),Z(`Operations.SessionsApi_list.Response.200`),Z(`OTel.Metrics.MetricDescriptor`),Z(`OTel.Metrics.MetricSeries`),Z(`Operations.MetricsApi_query.Response.200`),Z(`Operations.MetricsApi_list.Response.200`),Z(`Operations.MetricsApi_listSeries.Response.200`),Z(`Common.Errors.ProblemDetails`),Z(`Mcp.Tools.McpDataMode`),Z(`Mcp.Tools.McpDashboardStats`),Z(`Mcp.Tools.DisplayTracesInput`),Z(`Mcp.Tools.DisplayTracesOutput`),Z(`Mcp.Tools.DisplayMcpDashboardInput`);var Hv=Z(`Mcp.Tools.DisplayMcpDashboardOutput`);Z(`Mcp.Tools.ListTracesInput`),Z(`Mcp.Tools.ListTracesOutput`),Z(`Mcp.Tools.GetTraceInput`),Z(`Mcp.Tools.GetTraceOutput`),Z(`Mcp.Tools.ListSessionsInput`),Z(`Mcp.Tools.ListSessionsOutput`),Z(`Mcp.Tools.SearchLogsInput`),Z(`Mcp.Tools.SearchLogsOutput`),Z(`Mcp.Tools.FetchTelemetryInput`);var Uv=Z(`Mcp.Tools.FetchTelemetryOutput`);Z(`Mcp.Tools.CiLogInput`),Z(`Mcp.Tools.CiRunSummary`),Z(`Mcp.Tools.CiPhase`),Z(`Mcp.Tools.CiLogOutput`),Z(`Runner.RunnerResourceState`),Z(`Runner.RunnerLogLine`),Q(`WorkbenchSessionId`),Q(`WorkbenchWorkspaceId`),Q(`WorkbenchServerId`),Q(`WorkbenchExecutionId`),Q(`WorkbenchEvaluationRunId`),Q(`WorkbenchTestCaseId`),Q(`WorkbenchSuiteId`),Q(`WorkbenchEvaluationExportId`),Q(`WorkbenchPrincipalIdentity`),Q(`WorkbenchSession`),Q(`WorkbenchSessionBootstrapResponse`),Q(`WorkbenchWorkspace`),Q(`WorkbenchWorkspaceCreateRequest`),Q(`WorkbenchWorkspaceUpdateRequest`),Q(`WorkbenchWorkspaceListResponse`),Q(`WorkbenchToolInputMode`),Q(`WorkbenchWorkspacePreferences`),Q(`WorkbenchWorkspacePreferencesUpdateRequest`),Q(`WorkbenchTransportKind`),Q(`WorkbenchHeaderSecretScheme`),Q(`WorkbenchSecretReference`),Q(`WorkbenchEnvironmentSecretReference`),Q(`WorkbenchHeaderSecretReference`),Q(`WorkbenchStdioServerConfiguration`),Q(`WorkbenchStreamableHttpServerConfiguration`),Q(`WorkbenchBuiltinServerConfiguration`),Q(`WorkbenchServerConfiguration`),Q(`WorkbenchErrorCategory`),Q(`WorkbenchError`),Q(`WorkbenchInitializationSnapshot`),Q(`WorkbenchConnectionStatus`),Q(`WorkbenchConnectionSnapshot`),Q(`WorkbenchServer`),Q(`WorkbenchServerCreateRequest`),Q(`WorkbenchServerUpdateRequest`),Q(`WorkbenchServerListResponse`),Q(`WorkbenchServerActionAccepted`),Q(`WorkbenchDiscoveryCollection`),Q(`WorkbenchDiscoverySnapshot`),Q(`WorkbenchProtocolDirection`),Q(`WorkbenchProtocolEventKind`),Q(`WorkbenchProtocolEvent`),Q(`WorkbenchProtocolEventPage`),Q(`WorkbenchProtocolEvents`),Q(`WorkbenchExecutionEffect`),Q(`WorkbenchExecutionStatus`),Q(`WorkbenchExecutionConfirmationRequest`),Q(`WorkbenchExecutionConfirmationEvidence`),Q(`WorkbenchExecutionRequest`),Q(`WorkbenchExecutionTokenUsage`),Q(`WorkbenchExecutionCost`),Q(`WorkbenchTelemetryCorrelation`),Q(`WorkbenchExecutionUpdateEvents`),Q(`WorkbenchExecutionRecord`),Q(`WorkbenchExecutionAccepted`),Q(`WorkbenchExecutionCancelRequest`),Q(`WorkbenchExecutionPage`),Q(`WorkbenchTelemetryAvailability`),Q(`WorkbenchTelemetrySignalAvailability`),Q(`WorkbenchTelemetrySignalSummary`),Q(`WorkbenchExecutionTelemetryResponse`),Q(`WorkbenchAssertionStatus`),Q(`WorkbenchStatusAssertion`),Q(`WorkbenchExactAssertion`),Q(`WorkbenchPartialAssertion`),Q(`WorkbenchSchemaAssertion`),Q(`WorkbenchPatternAssertion`),Q(`WorkbenchLatencyAssertion`),Q(`WorkbenchTestAssertion`),Q(`WorkbenchTestCase`),Q(`WorkbenchTestCaseCreateRequest`),Q(`WorkbenchTestCaseUpdateRequest`),Q(`WorkbenchTestCasePage`),Q(`WorkbenchTestSuite`),Q(`WorkbenchTestSuiteCreateRequest`),Q(`WorkbenchTestSuiteUpdateRequest`),Q(`WorkbenchTestSuitePage`),Q(`WorkbenchEvaluationResultStatus`),Q(`WorkbenchEvaluationRunStatus`),Q(`WorkbenchRegressionStatus`),Q(`WorkbenchEvaluationRunRequest`),Q(`WorkbenchTestCaseRunRequest`),Q(`WorkbenchSuiteRunRequest`),Q(`WorkbenchAssertionResult`),Q(`WorkbenchEvaluationTestCaseSnapshot`),Q(`WorkbenchEvaluationSuiteSnapshot`),Q(`WorkbenchEvaluationTestResult`),Q(`WorkbenchEvaluationSummary`),Q(`WorkbenchEvaluationRun`),Q(`WorkbenchEvaluationRunAccepted`),Q(`WorkbenchEvaluationRunPage`),Q(`WorkbenchEvaluationComparisonRequest`),Q(`WorkbenchEvaluationTestComparison`),Q(`WorkbenchEvaluationRunComparison`),Q(`WorkbenchEvaluationExportFormat`),Q(`WorkbenchEvaluationExportStatus`),Q(`WorkbenchEvaluationExportRequest`),Q(`WorkbenchEvaluationExport`),Q(`WorkbenchEvaluationJsonExportPayload`),Q(`WorkbenchEvaluationReportExportPayload`),Q(`WorkbenchEvaluationExportPayload`),Q(`WorkbenchEvaluationExportArtifact`),Q(`WorkbenchEvaluationExportAccepted`),Z(`Common.Errors.UnauthorizedError`),Z(`Common.Errors.ForbiddenError`),Z(`Common.Errors.NotFoundError`),Z(`Common.Errors.ValidationError`),Z(`Common.Errors.ConflictError`),Z(`Common.Errors.BadGatewayError`),Z(`Common.Errors.ServiceUnavailableError`),Z(`Common.Errors.InternalServerError`);var Wv=[1,24,168],$={mode:void 0,stats:void 0,hours:24,requestSeq:0,toolsSort:{key:`requests`,dir:-1}},Gv=document.querySelector(`.main`),Kv=document.getElementById(`demo-badge`),qv=document.getElementById(`analyzed-label`),Jv=document.getElementById(`refresh-btn`),Yv=document.getElementById(`empty-refresh-btn`),Xv=document.getElementById(`retry-btn`),Zv=document.getElementById(`banner`),Qv=document.getElementById(`truncation-note`),$v=document.getElementById(`state-loading`),ey=document.getElementById(`loading-text`),ty=document.getElementById(`state-empty`),ny=document.getElementById(`state-error`),ry=document.getElementById(`error-message`),iy=document.getElementById(`dashboard`),ay=document.getElementById(`traffic-chart`),oy=document.getElementById(`traffic-tip`),sy=document.getElementById(`by-server`),cy=document.getElementById(`by-transport`),ly=document.getElementById(`most-used`),uy=document.getElementById(`slowest`),dy=document.getElementById(`most-failing`),fy=document.getElementById(`tools-table`),py=Array.from(document.querySelectorAll(`.win-btn`));function my(e){return e>=100?String(Math.round(e)):(e>=10?e.toFixed(1):e.toFixed(2)).replace(/\.?0+$/,``)}function hy(e){if(!Number.isFinite(e))return`—`;if(e<1e3)return String(e);for(let[t,n]of[[1e9,`B`],[1e6,`M`],[1e3,`K`]])if(e>=t){let r=e/t;return`${r>=100?Math.round(r).toString():r.toFixed(1).replace(/\.0$/,``)}${n}`}return String(e)}function gy(e){return!Number.isFinite(e)||e<0?`—`:e>=1e3?`${my(e/1e3)} s`:e>=1?`${my(e)} ms`:`${e.toFixed(2)} ms`}function _y(e){if(!Number.isFinite(e)||e<0)return`—`;let t=e*100;return t===0?`0%`:t<.1?`<0.1%`:t<10?`${t.toFixed(1).replace(/\.0$/,``)}%`:`${Math.round(t)}%`}function vy(e){return String(e).padStart(2,`0`)}function yy(e,t){let n=new Date(e);if(Number.isNaN(n.getTime()))return`—`;let r=`${vy(n.getHours())}:${vy(n.getMinutes())}`;return t<=48?r:`${n.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${r}`}function by(e){return e.content?.map(e=>`text`in e?e.text:``).filter(Boolean).join(` `)||void 0}function xy(e){let t=Hv.safeParse(e.structuredContent);if(t.success)return t.data.stats;let n=Uv.safeParse(e.structuredContent);return n.success&&n.data.stats!==void 0?n.data.stats:null}function Sy(e){$v.hidden=e!==`loading`,ty.hidden=e!==`empty`,ny.hidden=e!==`error`,iy.hidden=e!==`dashboard`}function Cy(e){ry.textContent=e,Sy(`error`)}var wy;function Ty(e){Zv.textContent=e,Zv.hidden=!1,wy&&clearTimeout(wy),wy=setTimeout(()=>{Zv.hidden=!0},6e3)}function Ey(){Kv.hidden=$.mode!==`demo`;let e=$.stats;qv.textContent=e?`analyzed ${e.span_count_analyzed.toLocaleString()} span${e.span_count_analyzed===1?``:`s`}`:``,Qv.hidden=!e?.truncated;for(let e of py){let t=Number(e.dataset.hours)===$.hours;e.classList.toggle(`active`,t),e.setAttribute(`aria-pressed`,String(t))}}var Dy=`http://www.w3.org/2000/svg`;function Oy(e,t={},n){let r=document.createElementNS(Dy,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,n);return n&&r.setAttribute(`class`,n),r}function ky(e){if(!(e>0))return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function Ay(e,t,n,r){let i=Math.min(4,n/2,r),a=e+n;return`M${e.toFixed(2)},${(t+r).toFixed(2)} L${e.toFixed(2)},${(t+i).toFixed(2)} Q${e.toFixed(2)},${t.toFixed(2)} ${(e+i).toFixed(2)},${t.toFixed(2)} L${(a-i).toFixed(2)},${t.toFixed(2)} Q${a.toFixed(2)},${t.toFixed(2)} ${a.toFixed(2)},${(t+i).toFixed(2)} L${a.toFixed(2)},${(t+r).toFixed(2)} Z`}function jy(e){let t=new Date(e.window.start).getTime(),n=new Date(e.window.end).getTime();return Number.isFinite(t)&&Number.isFinite(n)&&n>t?(n-t)/36e5:$.hours}function My(e){return e.requests>0?e.errors/e.requests:0}function Ny(){oy.hidden=!0}function Py(e,t,n,r){let i=document.createElement(`div`);i.className=`tip-title`,i.textContent=yy(e.start,t);let a=document.createDocumentFragment(),o=(e,t,n)=>{let r=document.createElement(`div`);r.className=`tip-row`;let i=document.createElement(`span`);i.className=e?`tip-key ${e}`:`tip-key`,r.appendChild(i);let o=document.createElement(`span`);o.className=`tip-value`,o.textContent=t,r.appendChild(o);let s=document.createElement(`span`);s.className=`tip-label`,s.textContent=n,r.appendChild(s),a.appendChild(r)};o(`ok`,hy(Math.max(0,e.requests-e.errors)),`ok`),o(`err`,hy(e.errors),`errors`),o(`err`,_y(My(e)),`error rate`),oy.replaceChildren(i,a),oy.hidden=!1;let s=oy.parentElement.getBoundingClientRect(),c=oy.offsetWidth,l=oy.offsetHeight,u=n-s.left+12;u+c>s.width-4&&(u=n-s.left-c-12);let d=r-s.top-l-8;d<0&&(d=r-s.top+12),oy.style.left=`${Math.max(0,u)}px`,oy.style.top=`${Math.max(0,d)}px`}function Fy(){let e=$.stats;if(Ny(),ay.replaceChildren(),!e||e.buckets.length===0){let e=document.createElement(`div`);e.className=`chart-empty`,e.textContent=`No traffic in this window.`,ay.appendChild(e);return}let t=e.buckets,n=jy(e),r=Math.max(300,Math.floor(ay.clientWidth)||560),i=r-38-44,a=t.length,o=i/a,s=Math.min(24,Math.max(2,o-2)),c=ky(Math.max(...t.map(e=>e.requests))),l=Math.max(...t.map(e=>My(e)*100)),u=Math.min(100,ky(Math.max(l,1))),d=Oy(`svg`,{width:String(r),height:`200`,viewBox:`0 0 ${r} 200`,role:`img`});d.setAttribute(`aria-label`,`MCP traffic: ${e.totals.requests} requests, ${e.totals.errors} errors (${_y(e.totals.error_rate)}) across ${a} buckets`);for(let e of[.5,1]){let t=180-172*e;d.appendChild(Oy(`line`,{x1:`38`,y1:t.toFixed(2),x2:String(38+i),y2:t.toFixed(2)},`grid-line`));let n=Oy(`text`,{x:`33`,y:(t+3).toFixed(2),"text-anchor":`end`},`tick-label`);n.textContent=hy(c*e),d.appendChild(n)}d.appendChild(Oy(`line`,{x1:`38`,y1:`180`,x2:String(38+i),y2:`180`},`axis-line`));let f=Oy(`text`,{x:String(38+i+5),y:`11`,"text-anchor":`start`},`tick-label rate`);f.textContent=`${u}%`,d.appendChild(f);let p=Oy(`text`,{x:String(38+i+5),y:`183`,"text-anchor":`start`},`tick-label rate`);p.textContent=`0%`,d.appendChild(p);let m=Oy(`g`);for(let e=0;e<a;e++){let n=t[e],r=Math.max(0,n.requests-n.errors),i=Math.min(n.errors,n.requests);if(r<=0&&i<=0)continue;let a=38+e*o+(o-s)/2,l=r>0?Math.max(r/c*172,1.5):0,u=i>0?Math.max(i/c*172,1.5):0;r>0&&i>0?(m.appendChild(Oy(`rect`,{x:a.toFixed(2),y:(180-l).toFixed(2),width:s.toFixed(2),height:l.toFixed(2)},`bar-ok`)),m.appendChild(Oy(`path`,{d:Ay(a,180-l-2-u,s,u)},`bar-err`))):r>0?m.appendChild(Oy(`path`,{d:Ay(a,180-l,s,l)},`bar-ok`)):m.appendChild(Oy(`path`,{d:Ay(a,180-u,s,u)},`bar-err`))}d.appendChild(m);let h=t.map((e,t)=>{let n=38+t*o+o/2,r=180-Math.min(My(e)*100,u)/u*172;return`${n.toFixed(2)},${r.toFixed(2)}`});h.length>1&&d.appendChild(Oy(`path`,{d:`M${h.join(` L`)}`},`traffic-rate-line`));let g=h[h.length-1].split(`,`);d.appendChild(Oy(`circle`,{cx:g[0],cy:g[1],r:`4`},`rate-dot`));let _=a>=3?[0,Math.floor((a-1)/2),a-1]:[0,a-1],ee=[`start`,`middle`,`end`];_.forEach((e,r)=>{let a=_.length===2?r===0?`start`:`end`:ee[r],s=Oy(`text`,{x:(a===`start`?38:a===`end`?38+i:38+e*o+o/2).toFixed(2),y:`194`,"text-anchor":a},`tick-label`);s.textContent=yy(t[e].start,n),d.appendChild(s)});for(let e=0;e<a;e++){let r=t[e],i=Oy(`rect`,{x:(38+e*o).toFixed(2),y:`8`,width:o.toFixed(2),height:`172`,tabindex:`0`},`traffic-hit`);i.setAttribute(`aria-label`,`${yy(r.start,n)}: ${Math.max(0,r.requests-r.errors)} ok, ${r.errors} errors, ${_y(My(r))} error rate`),i.addEventListener(`pointermove`,e=>Py(r,n,e.clientX,e.clientY)),i.addEventListener(`pointerleave`,Ny),i.addEventListener(`focus`,()=>{let e=i.getBoundingClientRect();Py(r,n,e.left+e.width/2,e.top+20)}),i.addEventListener(`blur`,Ny),d.appendChild(i)}ay.appendChild(d)}var Iy=0;new ResizeObserver(()=>{let e=ay.clientWidth;Math.abs(e-Iy)>8&&$.stats&&!iy.hidden&&(Iy=e,Fy())}).observe(ay);function Ly(e,t,n,r){if(e.replaceChildren(),t.length===0){let t=document.createElement(`div`);t.className=`bl-empty`,t.textContent=r,e.appendChild(t);return}let i=Math.max(...t.map(e=>e.value),1e-9),a=document.createDocumentFragment();for(let e of t){let t=document.createElement(`div`);t.className=`bl-row`,t.title=e.title??e.name;let r=document.createElement(`span`);r.className=`bl-name`,r.textContent=e.name,t.appendChild(r);let o=document.createElement(`div`);o.className=`bl-track`;let s=document.createElement(`div`);s.className=`bl-fill ${n}`;let c=e.value/i*100;s.style.width=`${Math.max(c,e.value>0?1.5:0).toFixed(2)}%`,o.appendChild(s),t.appendChild(o);let l=document.createElement(`span`);l.className=`bl-value`,l.textContent=e.label,t.appendChild(l),a.appendChild(t)}e.replaceChildren(a)}var Ry=6;function zy(e){let t=(e,t)=>t.requests-e.requests;Ly(sy,[...e.by_server].sort(t).slice(0,Ry).map(e=>({name:e.name,value:e.requests,label:hy(e.requests)})),`fill-ok`,`No server data.`),Ly(cy,[...e.by_transport].sort(t).slice(0,Ry).map(e=>({name:e.name,value:e.requests,label:hy(e.requests)})),`fill-ok`,`No transport data.`),Ly(ly,[...e.tools].sort((e,t)=>t.requests-e.requests).slice(0,Ry).map(e=>({name:e.name,value:e.requests,label:hy(e.requests)})),`fill-ok`,`No tool calls in this window.`),Ly(uy,[...e.tools].sort((e,t)=>t.p95_ms-e.p95_ms).slice(0,Ry).map(e=>({name:e.name,value:e.p95_ms,label:gy(e.p95_ms),title:`${e.name} — p95 ${gy(e.p95_ms)}, avg ${gy(e.avg_ms)}`})),`fill-p95`,`No tool calls in this window.`),Ly(dy,[...e.tools].filter(e=>e.requests>=5&&e.error_rate>0).sort((e,t)=>t.error_rate-e.error_rate).slice(0,Ry).map(e=>({name:e.name,value:e.error_rate,label:_y(e.error_rate),title:`${e.name} — ${e.errors} of ${e.requests} requests failed`})),`fill-err`,`No failing tools (≥5 requests).`)}var By=[{key:`name`,label:`Name`,numeric:!1},{key:`requests`,label:`Requests`,numeric:!0},{key:`error_rate`,label:`Error rate`,numeric:!0},{key:`avg_ms`,label:`Avg`,numeric:!0},{key:`p95_ms`,label:`P95`,numeric:!0}];function Vy(e,t){return[...e].sort((e,n)=>{let r;return r=t.key===`name`?e.name.localeCompare(n.name):e[t.key]-n[t.key],r===0&&(r=e.name.localeCompare(n.name)),r*t.dir})}function Hy(e,t,n,r,i){if(e.replaceChildren(),t.length===0){let t=document.createElement(`div`);t.className=`table-empty`,t.textContent=i,e.appendChild(t);return}let a=document.createElement(`table`);a.className=`data-table`;let o=document.createElement(`thead`),s=document.createElement(`tr`);for(let e of By){let t=document.createElement(`th`);t.scope=`col`,e.numeric&&t.classList.add(`num`);let i=n.key===e.key;i&&t.setAttribute(`aria-sort`,n.dir===1?`ascending`:`descending`);let a=document.createElement(`button`);a.type=`button`,a.className=`th-btn${i?` sorted`:``}`;let o=document.createElement(`span`);o.textContent=e.label,a.appendChild(o);let c=document.createElement(`span`);c.className=`sort-indicator`,c.textContent=i?n.dir===1?`▲`:`▼`:``,a.appendChild(c),a.addEventListener(`click`,()=>r(e.key)),t.appendChild(a),s.appendChild(t)}o.appendChild(s),a.appendChild(o);let c=document.createElement(`tbody`);for(let e of Vy(t,n)){let t=document.createElement(`tr`),n=document.createElement(`td`);n.className=`name-cell`,n.textContent=e.name,n.title=e.name,t.appendChild(n);let r=document.createElement(`td`);r.className=`num`,r.textContent=hy(e.requests),t.appendChild(r);let i=document.createElement(`td`);i.className=`num err-cell${e.error_rate>.01?` err-hot`:``}`,i.textContent=_y(e.error_rate),t.appendChild(i);let a=document.createElement(`td`);a.className=`num`,a.textContent=gy(e.avg_ms),t.appendChild(a);let o=document.createElement(`td`);o.className=`num`,o.textContent=gy(e.p95_ms),t.appendChild(o),c.appendChild(t)}a.appendChild(c),e.appendChild(a)}function Uy(e,t){return e.key===t?{key:t,dir:e.dir===1?-1:1}:{key:t,dir:t===`name`?1:-1}}function Wy(){Hy(fy,$.stats?.tools??[],$.toolsSort,e=>{$.toolsSort=Uy($.toolsSort,e),Wy()},`No tool calls in this window.`)}function Gy(e){if($.stats=e,$.mode=e.mode,Ey(),e.span_count_analyzed===0){Sy(`empty`);return}Sy(`dashboard`),Fy(),zy(e),Wy()}async function Ky(){let e=++$.requestSeq;Jv.disabled=!0,Jv.classList.add(`spinning`);let t=!!$.stats;t?iy.classList.add(`refreshing`):(ey.textContent=`Loading MCP stats…`,Sy(`loading`));try{let t=await Yy.callServerTool({name:`fetch_telemetry`,arguments:{view:`mcp_stats`,hours:$.hours}});if(e!==$.requestSeq)return;if(t.isError)throw Error(by(t)??`fetch_telemetry failed`);let n=xy(t);if(!n)throw Error(`fetch_telemetry returned an invalid stats payload`);Gy(n)}catch(n){if(e!==$.requestSeq)return;t?(Sy(`dashboard`),Ty(`Refresh failed: ${n instanceof Error?n.message:String(n)}`)):Cy(n instanceof Error?n.message:String(n))}finally{e===$.requestSeq&&(Jv.disabled=!1,Jv.classList.remove(`spinning`),iy.classList.remove(`refreshing`))}}function qy(e){$.hours!==e&&($.hours=e,Ey(),Ky())}for(let e of py)e.addEventListener(`click`,()=>{let t=Number(e.dataset.hours);Wv.includes(t)&&qy(t)});Jv.addEventListener(`click`,()=>void Ky()),Yv.addEventListener(`click`,()=>void Ky()),Xv.addEventListener(`click`,()=>void Ky());function Jy(e){e.theme&&Dv(e.theme),e.styles?.variables&&Ov(e.styles.variables),e.styles?.css?.fonts&&kv(e.styles.css.fonts),e.safeAreaInsets&&(Gv.style.paddingTop=`${e.safeAreaInsets.top}px`,Gv.style.paddingRight=`${e.safeAreaInsets.right}px`,Gv.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,Gv.style.paddingLeft=`${e.safeAreaInsets.left}px`)}var Yy=new Ev({name:`qyl MCP Dashboard`,version:Av.version});Yy.onteardown=async()=>(console.info(`App is being torn down`),{}),Yy.ontoolinput=e=>{let t=e.arguments??{};typeof t.hours==`number`&&Number.isFinite(t.hours)?($.hours=t.hours<=1?1:t.hours<=24?24:168,Ey(),ey.textContent=`Loading MCP stats (last ${t.hours}h)…`):ey.textContent=`Loading MCP stats…`,Sy(`loading`)},Yy.ontoolresult=e=>{let t=xy(e);if(!t){Cy(by(e)??`Received an invalid tool result.`);return}Gy(t)},Yy.ontoolcancelled=()=>{Sy($.stats?`dashboard`:`empty`)},Yy.onerror=console.error,Yy.onhostcontextchanged=Jy,Yy.connect().then(()=>{let e=Yy.getHostContext();e&&Jy(e)}).catch(e=>{Cy(e instanceof Error?e.message:String(e))});</script>
58
58
  <style rel="stylesheet" crossorigin>:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--color-text-primary:var(--lightningcss-light,#1f2937)var(--lightningcss-dark,#f3f4f6);--color-text-inverse:var(--lightningcss-light,#f3f4f6)var(--lightningcss-dark,#1f2937);--color-text-info:var(--lightningcss-light,#1d4ed8)var(--lightningcss-dark,#60a5fa);--color-background-primary:var(--lightningcss-light,#fff)var(--lightningcss-dark,#1a1a1a);--color-background-inverse:var(--lightningcss-light,#1a1a1a)var(--lightningcss-dark,#fff);--color-background-info:var(--lightningcss-light,#eff6ff)var(--lightningcss-dark,#1e3a5f);--color-ring-primary:var(--lightningcss-light,#3b82f6)var(--lightningcss-dark,#60a5fa);--border-radius-md:6px;--border-width-regular:1px;--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--font-weight-normal:400;--font-weight-bold:700;--font-text-md-size:1rem;--font-text-md-line-height:1.5;--font-heading-3xl-size:2.25rem;--font-heading-3xl-line-height:1.1;--font-heading-2xl-size:1.875rem;--font-heading-2xl-line-height:1.2;--font-heading-xl-size:1.5rem;--font-heading-xl-line-height:1.25;--font-heading-lg-size:1.25rem;--font-heading-lg-line-height:1.3;--font-heading-md-size:1rem;--font-heading-md-line-height:1.4;--font-heading-sm-size:.875rem;--font-heading-sm-line-height:1.4;--spacing-unit:var(--font-text-md-size);--spacing-xs:calc(var(--spacing-unit) * .25);--spacing-sm:calc(var(--spacing-unit) * .5);--spacing-md:var(--spacing-unit);--spacing-lg:calc(var(--spacing-unit) * 1.5);--color-accent:#2563eb;--color-text-on-accent:#fff}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}*{box-sizing:border-box}html,body{font-family:var(--font-sans);font-size:var(--font-text-md-size);font-weight:var(--font-weight-normal);line-height:var(--font-text-md-line-height);color:var(--color-text-primary)}h1{font-size:var(--font-heading-3xl-size);line-height:var(--font-heading-3xl-line-height)}h2{font-size:var(--font-heading-2xl-size);line-height:var(--font-heading-2xl-line-height)}h3{font-size:var(--font-heading-xl-size);line-height:var(--font-heading-xl-line-height)}h4{font-size:var(--font-heading-lg-size);line-height:var(--font-heading-lg-line-height)}h5{font-size:var(--font-heading-md-size);line-height:var(--font-heading-md-line-height)}h6{font-size:var(--font-heading-sm-size);line-height:var(--font-heading-sm-line-height)}code,pre,kbd{font-family:var(--font-mono);font-size:1em}b,strong{font-weight:var(--font-weight-bold)}[hidden]{display:none!important}.main{--q-border:color-mix(in srgb, var(--color-text-primary) 13%, transparent);--q-border-soft:color-mix(in srgb, var(--color-text-primary) 8%, transparent);--q-muted:color-mix(in srgb, var(--color-text-primary) 55%, transparent);--q-faint:color-mix(in srgb, var(--color-text-primary) 40%, transparent);--q-hover:color-mix(in srgb, var(--color-text-primary) 5%, transparent);--q-surface:color-mix(in srgb, var(--color-text-primary) 3.5%, var(--color-background-primary));--q-surface-2:color-mix(in srgb, var(--color-text-primary) 6.5%, var(--color-background-primary));--q-accent:var(--lightningcss-light,#6d28d9)var(--lightningcss-dark,#a78bfa);--q-warn:var(--lightningcss-light,#b45309)var(--lightningcss-dark,#fbbf24);--q-warn-tint:color-mix(in srgb, var(--q-warn) 10%, transparent);--v-ok:var(--lightningcss-light,#2a78d6)var(--lightningcss-dark,#3987e5);--v-p95:var(--lightningcss-light,#1baf7a)var(--lightningcss-dark,#199e70);--v-err:#d03b3b;--v-err-tint:color-mix(in srgb, var(--v-err) 10%, transparent);--v-track:color-mix(in srgb, var(--color-text-primary) 6%, transparent);--v-grid:color-mix(in srgb, var(--color-text-primary) 9%, transparent);--v-axis:color-mix(in srgb, var(--color-text-primary) 22%, transparent);box-sizing:border-box;background-color:var(--color-background-primary);border:var(--border-width-regular) solid var(--q-border);border-radius:calc(var(--border-radius-md) * 2);flex-direction:column;width:100%;max-width:980px;margin:0 auto;font-size:.8125rem;line-height:1.45;display:flex;overflow:clip}.mono{font-family:var(--font-mono);font-size:.9em}.header{justify-content:space-between;align-items:center;gap:var(--spacing-sm);padding:var(--spacing-sm) var(--spacing-md);border-bottom:var(--border-width-regular) solid var(--q-border);background-color:var(--q-surface);display:flex}.header-brand{align-items:center;gap:var(--spacing-sm);min-width:0;display:flex}.header-logo{width:16px;height:16px;fill:var(--q-accent);flex:none}.header-title{font-size:.875rem;line-height:1.3;font-weight:var(--font-weight-bold);letter-spacing:.01em;white-space:nowrap;margin:0}.header-title-dim{color:var(--q-muted);font-weight:var(--font-weight-normal)}.demo-badge{border:1px solid color-mix(in srgb, var(--q-warn) 45%, transparent);background-color:var(--q-warn-tint);color:var(--q-warn);font-size:.625rem;font-weight:var(--font-weight-bold);letter-spacing:.08em;border-radius:999px;flex:none;padding:1px 7px}.header-actions{align-items:center;gap:var(--spacing-sm);display:flex}.header-count{color:var(--q-muted);white-space:nowrap;font-size:.75rem}.window-selector{border:var(--border-width-regular) solid var(--q-border);border-radius:var(--border-radius-md);display:inline-flex;overflow:hidden}.win-btn{color:var(--q-muted);font-size:.6875rem;font-weight:var(--font-weight-bold);cursor:pointer;background-color:#0000;border:none;padding:3px 9px}.win-btn+.win-btn{border-left:var(--border-width-regular) solid var(--q-border-soft)}.win-btn:hover{background-color:var(--q-hover);color:var(--color-text-primary)}.win-btn.active{background-color:color-mix(in srgb, var(--q-accent) 14%, transparent);color:var(--color-text-primary)}.refresh-btn{border:var(--border-width-regular) solid var(--q-border);border-radius:var(--border-radius-md);width:26px;height:26px;color:var(--q-muted);cursor:pointer;background-color:#0000;justify-content:center;align-items:center;padding:0;display:inline-flex}.refresh-btn:hover{background-color:var(--q-hover);color:var(--color-text-primary)}.refresh-btn:disabled{opacity:.55;cursor:default}.refresh-btn svg{fill:currentColor;width:14px;height:14px}.refresh-btn.spinning svg{animation:.9s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.banner{padding:var(--spacing-xs) var(--spacing-md);background-color:var(--v-err-tint);border-bottom:var(--border-width-regular) solid color-mix(in srgb, var(--v-err) 35%, transparent);color:var(--v-err);font-size:.75rem}.notice-warn{padding:var(--spacing-xs) var(--spacing-md);background-color:var(--q-warn-tint);border-bottom:var(--border-width-regular) solid color-mix(in srgb, var(--q-warn) 35%, transparent);color:var(--q-warn);font-size:.6875rem}.state{justify-content:center;align-items:center;gap:var(--spacing-sm);min-height:220px;padding:var(--spacing-lg);text-align:center;color:var(--q-muted);flex-direction:column;display:flex}.state-title{font-weight:var(--font-weight-bold);color:var(--color-text-primary)}.state-hint{overflow-wrap:anywhere;max-width:44ch;font-size:.75rem}.state-btn{margin-top:var(--spacing-xs);border:var(--border-width-regular) solid var(--q-border);border-radius:var(--border-radius-md);background-color:var(--q-surface);color:var(--color-text-primary);cursor:pointer;padding:4px 14px;font-size:.75rem}.state-btn:hover{background-color:var(--q-hover)}.spinner{border:2px solid var(--q-border);border-top-color:var(--q-accent);border-radius:50%;width:22px;height:22px;animation:.8s linear infinite spin}.dashboard.refreshing{opacity:.55;pointer-events:none}.dash-grid{grid-template-columns:repeat(12,1fr);gap:10px;padding:10px;display:grid}.card{border:var(--border-width-regular) solid var(--q-border-soft);border-radius:var(--border-radius-md);background-color:var(--q-surface);flex-direction:column;grid-column:span 12;min-width:0;padding:8px 10px 10px;display:flex}.card-traffic{grid-column:span 6}.card-side{grid-column:span 3}.card-rank{grid-column:span 4}.card-table{grid-column:span 12}.card-head{align-items:baseline;gap:var(--spacing-sm);margin-bottom:6px;display:flex}.card-title{font-size:.625rem;font-weight:var(--font-weight-bold);letter-spacing:.08em;text-transform:uppercase;color:var(--q-faint);flex:none;margin:0}.card-note{color:var(--q-faint);font-size:.625rem}.chart-legend{color:var(--q-muted);white-space:nowrap;align-items:center;gap:10px;margin-left:auto;font-size:.625rem;display:flex}.lg-item{align-items:center;gap:4px;display:inline-flex}.lg-swatch{border-radius:2px;width:8px;height:8px}.lg-ok{background-color:var(--v-ok)}.lg-err{background-color:var(--v-err)}.lg-line{border-top:2px solid var(--v-err);border-radius:1px;width:12px;height:0}.traffic-wrap{flex:1;min-height:0;position:relative}.traffic-chart{width:100%;min-height:200px}.traffic-chart svg{display:block}.chart-empty{padding:var(--spacing-lg) 0;text-align:center;color:var(--q-muted);font-size:.75rem}.bar-ok{fill:var(--v-ok)}.bar-err{fill:var(--v-err)}.grid-line{stroke:var(--v-grid);stroke-width:1px}.axis-line{stroke:var(--v-axis);stroke-width:1px}.tick-label{fill:var(--q-muted);font-family:var(--font-mono);font-size:9px}.tick-label.rate{fill:color-mix(in srgb, var(--v-err) 75%, var(--color-text-primary))}.traffic-rate-line{fill:none;stroke:var(--v-err);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.rate-dot{fill:var(--v-err);stroke:var(--q-surface);stroke-width:2px}.traffic-hit{fill:#0000;outline:none}.traffic-hit:hover,.traffic-hit:focus-visible{fill:color-mix(in srgb, var(--color-text-primary) 6%, transparent)}.chart-tip{z-index:5;border:var(--border-width-regular) solid var(--q-border);border-radius:var(--border-radius-md);background-color:var(--color-background-primary);pointer-events:none;max-width:220px;padding:6px 8px;font-size:.6875rem;position:absolute;box-shadow:0 4px 14px var(--lightningcss-light,#0f172a33)var(--lightningcss-dark,#0003)}.tip-title{color:var(--q-muted);white-space:nowrap;margin-bottom:3px;font-size:.625rem}.tip-row{white-space:nowrap;align-items:center;gap:5px;display:flex}.tip-key{border-radius:1px;flex:none;width:10px;height:3px}.tip-key.ok{background-color:var(--v-ok)}.tip-key.err{background-color:var(--v-err)}.tip-value{font-weight:var(--font-weight-bold);font-family:var(--font-mono);font-size:.6875rem}.tip-label{color:var(--q-muted)}.bar-list{flex-direction:column;flex:1;gap:5px;display:flex}.bl-row{grid-template-columns:minmax(64px,40%) 1fr minmax(4ch,max-content);align-items:center;gap:7px;min-width:0;display:grid}.bl-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--font-mono);font-size:.65625rem;overflow:hidden}.bl-track{background-color:var(--v-track);border-radius:2px;height:8px;overflow:hidden}.bl-fill{border-radius:0 2px 2px 0;min-width:1px;height:100%}.bl-fill.fill-ok{background-color:var(--v-ok)}.bl-fill.fill-p95{background-color:var(--v-p95)}.bl-fill.fill-err{background-color:var(--v-err)}.bl-value{font-family:var(--font-mono);font-variant-numeric:tabular-nums;color:var(--color-text-primary);white-space:nowrap;justify-self:end;font-size:.65625rem}.bl-empty{padding:var(--spacing-md) 0;text-align:center;color:var(--q-faint);font-size:.6875rem}.table-holder{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:.71875rem}.data-table th{border-bottom:var(--border-width-regular) solid var(--q-border);text-align:left;padding:0}.data-table th.num{text-align:right}.th-btn{width:100%;color:var(--q-faint);font-size:.625rem;font-weight:var(--font-weight-bold);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;white-space:nowrap;background:0 0;border:none;align-items:center;gap:3px;padding:4px 8px;display:inline-flex}.data-table th.num .th-btn{justify-content:flex-end}.th-btn:hover,.th-btn.sorted{color:var(--color-text-primary)}.sort-indicator{font-size:.5625rem;line-height:1}.data-table td{border-bottom:var(--border-width-regular) solid var(--q-border-soft);white-space:nowrap;padding:4px 8px}.data-table tr:last-child td{border-bottom:none}.data-table tbody tr:hover{background-color:var(--q-hover)}.data-table td.name-cell{text-overflow:ellipsis;max-width:340px;font-family:var(--font-mono);font-size:.65625rem;overflow:hidden}.data-table td.num{text-align:right;font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:.65625rem}.data-table td.num.err-hot{background-color:var(--v-err-tint);color:var(--v-err);font-weight:var(--font-weight-bold)}.table-empty{padding:var(--spacing-md);text-align:center;color:var(--q-faint);font-size:.6875rem}@media (width<=860px){.card-traffic{grid-column:span 12}.card-side,.card-rank{grid-column:span 6}}@media (width<=560px){.card-traffic,.card-side,.card-rank{grid-column:span 12}.header{flex-wrap:wrap}.header-count{display:none}}
59
59
  /*$vite$:1*/</style>
60
60
  </head>