@skyramp/testbot-core 0.13.0-v3.237 → 0.13.0-v3.239

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.
package/dist/post.js CHANGED
@@ -48,7 +48,7 @@ ${l}`,this.dataLineCount++;return}if(jA(e,s,ZG)){n2(e,i)&&(this.setEventFieldSiz
48
48
  Error Code : ${a.statusCode}
49
49
 
50
50
  Error Message: ${a.message}`)})).result)===null||n===void 0?void 0:n.value;if(!i)throw new Error("Response json body do not have ID Token field");return i})}static getIDToken(e){return ik(this,void 0,void 0,function*(){try{let n=t.getIDTokenUrl();if(e){let s=encodeURIComponent(e);n=`${n}&audience=${s}`}ak(`ID token url is ${n}`);let r=yield t.getCall(n);return zr(r),r}catch(n){throw new Error(`Error message: ${n.message}`)}})}}});var uk,ou,Xg,Z2,X2,eH,ck,em,kK,tm=Rt(()=>{uk=require("os"),ou=require("fs"),Xg=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})},{access:Z2,appendFile:X2,writeFile:eH}=ou.promises,ck="GITHUB_STEP_SUMMARY",em=class{constructor(){this._buffer=""}filePath(){return Xg(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[ck];if(!e)throw new Error(`Unable to find environment variable for $${ck}. Check if your runtime environment supports job summaries.`);try{yield Z2(e,ou.constants.R_OK|ou.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,n,r={}){let s=Object.entries(r).map(([i,a])=>` ${i}="${a}"`).join("");return n?`<${e}${s}>${n}</${e}>`:`<${e}${s}>`}write(e){return Xg(this,void 0,void 0,function*(){let n=!!e?.overwrite,r=yield this.filePath();return yield(n?eH:X2)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Xg(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,n=!1){return this._buffer+=e,n?this.addEOL():this}addEOL(){return this.addRaw(uk.EOL)}addCodeBlock(e,n){let r=Object.assign({},n&&{lang:n}),s=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(s).addEOL()}addList(e,n=!1){let r=n?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(r,s);return this.addRaw(i).addEOL()}addTable(e){let n=e.map(s=>{let i=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:A,rowspan:p}=a,h=c?"th":"td",g=Object.assign(Object.assign({},A&&{colspan:A}),p&&{rowspan:p});return this.wrap(h,l,g)}).join("");return this.wrap("tr",i)}).join(""),r=this.wrap("table",n);return this.addRaw(r).addEOL()}addDetails(e,n){let r=this.wrap("details",this.wrap("summary",e)+n);return this.addRaw(r).addEOL()}addImage(e,n,r){let{width:s,height:i}=r||{},a=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i}),c=this.wrap("img",null,Object.assign({src:e,alt:n},a));return this.addRaw(c).addEOL()}addHeading(e,n){let r=`h${n}`,s=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,n){let r=Object.assign({},n&&{cite:n}),s=this.wrap("blockquote",e,r);return this.addRaw(s).addEOL()}addLink(e,n){let r=this.wrap("a",e,{href:n});return this.addRaw(r).addEOL()}},kK=new em});var lk=Rt(()=>{});function nm(t){return dk(this,void 0,void 0,function*(){try{yield ZA(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}function ed(t){if(t=uH(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return Di?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}function rm(t,e){return dk(this,void 0,void 0,function*(){let n;try{n=yield ZA(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(n&&n.isFile()){if(Di){let s=xs.extname(t).toUpperCase();if(e.some(i=>i.toUpperCase()===s))return t}else if(Ak(n))return t}let r=t;for(let s of e){t=r+s,n=void 0;try{n=yield ZA(t)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${i}`)}if(n&&n.isFile()){if(Di){try{let i=xs.dirname(t),a=xs.basename(t).toUpperCase();for(let c of yield pk(i))if(a===c.toUpperCase()){t=xs.join(i,c);break}}catch(i){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${i}`)}return t}else if(Ak(n))return t}}return""})}function uH(t){return t=t||"",Di?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}function Ak(t){return(t.mode&1)>0||(t.mode&8)>0&&process.getgid!==void 0&&t.gid===process.getgid()||(t.mode&64)>0&&process.getuid!==void 0&&t.uid===process.getuid()}var XA,xs,dk,tH,nH,rH,sH,TK,pk,iH,oH,DK,ZA,aH,cH,Di,NK,sm=Rt(()=>{XA=Re(require("fs"),1),xs=Re(require("path"),1),dk=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})},{chmod:tH,copyFile:nH,lstat:rH,mkdir:sH,open:TK,readdir:pk,rename:iH,rm:oH,rmdir:DK,stat:ZA,symlink:aH,unlink:cH}=XA.promises,Di=process.platform==="win32",NK=XA.constants.O_RDONLY});function im(t,e){return fk(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");if(e){let r=yield im(t,!1);if(!r)throw Di?new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}let n=yield lH(t);return n&&n.length>0?n[0]:""})}function lH(t){return fk(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");let e=[];if(Di&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(gr.delimiter))s&&e.push(s);if(ed(t)){let s=yield rm(t,e);return s?[s]:[]}if(t.includes(gr.sep))return[];let n=[];if(process.env.PATH)for(let s of process.env.PATH.split(gr.delimiter))s&&n.push(s);let r=[];for(let s of n){let i=yield rm(gr.join(s,t),e);i&&r.push(i)}return r})}var gr,fk,gk=Rt(()=>{gr=Re(require("path"),1);sm();fk=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})}});function Ik(t){let e=[],n=!1,r=!1,s="";function i(a){r&&a!=='"'&&(s+="\\"),s+=a,r=!1}for(let a=0;a<t.length;a++){let c=t.charAt(a);if(c==='"'){r?i(c):n=!n;continue}if(c==="\\"&&r){i(c);continue}if(c==="\\"&&n){r=!0;continue}if(c===" "&&!n){s.length>0&&(e.push(s),s="");continue}i(c)}return s.length>0&&e.push(s.trim()),e}var au,am,yk,Ek,Ck,mk,td,nd,om,Bk=Rt(()=>{au=Re(require("os"),1),am=Re(require("events"),1),yk=Re(require("child_process"),1),Ek=Re(require("path"),1);gk();sm();Ck=require("timers"),mk=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})},td=process.platform==="win32",nd=class extends am.EventEmitter{constructor(e,n,r){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=n||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,n){let r=this._getSpawnFileName(),s=this._getSpawnArgs(e),i=n?"":"[command]";if(td)if(this._isCmdFile()){i+=r;for(let a of s)i+=` ${a}`}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(let a of s)i+=` ${a}`}else{i+=this._windowsQuoteCmdArg(r);for(let a of s)i+=` ${this._windowsQuoteCmdArg(a)}`}else{i+=r;for(let a of s)i+=` ${a}`}return i}_processLineBuffer(e,n,r){try{let s=n+e.toString(),i=s.indexOf(au.EOL);for(;i>-1;){let a=s.substring(0,i);r(a),s=s.substring(i+au.EOL.length),i=s.indexOf(au.EOL)}return s}catch(s){return this._debug(`error processing line. Failed with error ${s}`),""}}_getSpawnFileName(){return td&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(td&&this._isCmdFile()){let n=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let r of this.args)n+=" ",n+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return n+='"',[n]}return this.args}_endsWith(e,n){return e.endsWith(n)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let n=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],r=!1;for(let a of e)if(n.some(c=>c===a)){r=!0;break}if(!r)return e;let s='"',i=!0;for(let a=e.length;a>0;a--)s+=e[a-1],i&&e[a-1]==="\\"?s+="\\":e[a-1]==='"'?(i=!0,s+='"'):i=!1;return s+='"',s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let n='"',r=!0;for(let s=e.length;s>0;s--)n+=e[s-1],r&&e[s-1]==="\\"?n+="\\":e[s-1]==='"'?(r=!0,n+="\\"):r=!1;return n+='"',n.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let n={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return n.outStream=e.outStream||process.stdout,n.errStream=e.errStream||process.stderr,n}_getSpawnOptions(e,n){e=e||{};let r={};return r.cwd=e.cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${n}"`),r}exec(){return mk(this,void 0,void 0,function*(){return!ed(this.toolPath)&&(this.toolPath.includes("/")||td&&this.toolPath.includes("\\"))&&(this.toolPath=Ek.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield im(this.toolPath,!0),new Promise((e,n)=>mk(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let A of this.args)this._debug(` ${A}`);let r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+au.EOL);let s=new om(r,this.toolPath);if(s.on("debug",A=>{this._debug(A)}),this.options.cwd&&!(yield nm(this.options.cwd)))return n(new Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),a=yk.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i)),c="";a.stdout&&a.stdout.on("data",A=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(A),!r.silent&&r.outStream&&r.outStream.write(A),c=this._processLineBuffer(A,c,p=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(p)})});let l="";if(a.stderr&&a.stderr.on("data",A=>{s.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(A),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(A),l=this._processLineBuffer(A,l,p=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(p)})}),a.on("error",A=>{s.processError=A.message,s.processExited=!0,s.processClosed=!0,s.CheckComplete()}),a.on("exit",A=>{s.processExitCode=A,s.processExited=!0,this._debug(`Exit code ${A} received from tool '${this.toolPath}'`),s.CheckComplete()}),a.on("close",A=>{s.processExitCode=A,s.processExited=!0,s.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),s.CheckComplete()}),s.on("done",(A,p)=>{c.length>0&&this.emit("stdline",c),l.length>0&&this.emit("errline",l),a.removeAllListeners(),A?n(A):e(p)}),this.options.input){if(!a.stdin)throw new Error("child process missing stdin");a.stdin.end(this.options.input)}}))})}};om=class t extends am.EventEmitter{constructor(e,n){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!n)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=n,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=(0,Ck.setTimeout)(t.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let n=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(n)}e._setResult()}}}});function wk(t,e,n){return pH(this,void 0,void 0,function*(){let r=Ik(t);if(r.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let s=r[0];return e=r.slice(1).concat(e||[]),new nd(s,e,n).exec()})}var pH,cm=Rt(()=>{Bk();pH=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})}});var um,UK,LK,bk=Rt(()=>{um=Re(require("os"),1);cm();UK=um.default.platform(),LK=um.default.arch()});function zr(t){ri("add-mask",{},t)}function he(t,e){let n=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!n)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?n:n.trim()}function Ts(t,e){let n=["true","True","TRUE"],r=["false","False","FALSE"],s=he(t,e);if(n.includes(s))return!0;if(r.includes(s))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
51
- Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function vk(t){process.exitCode=lm.Failure,gH(t)}function ak(t){ri("debug",{},t)}function gH(t,e={}){ri("error",zu(e),t instanceof Error?t.toString():t)}function Pe(t,e={}){ri("warning",zu(e),t instanceof Error?t.toString():t)}function cu(t,e={}){ri("notice",zu(e),t instanceof Error?t.toString():t)}function Qn(t){process.stdout.write(t+Sk.EOL)}function rd(t){Ep("group",t)}function sd(){Ep("endgroup")}function Ds(t){return process.env[`STATE_${t}`]||""}function kk(t){return fH(this,void 0,void 0,function*(){return yield KA.getIDToken(t)})}var Sk,fH,lm,Ft=Rt(()=>{BE();wE();Ku();Sk=Re(require("os"),1);ok();tm();tm();lk();bk();fH=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})};(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(lm||(lm={}))});var m9={};mp(m9,{post:()=>aD});module.exports=pD(m9);Ft();var oD=Re(require("path"));Ft();Ft();var Am;(function(t){t.Pass="Pass",t.Fail="Fail",t.Error="Error",t.Skipped="Skipped",t.Unknown="Unknown"})(Am||(Am={}));var Rk;(function(t){t.High="high",t.Medium="medium",t.Low="low"})(Rk||(Rk={}));var xk;(function(t){t.Skyramp="skyramp",t.External="external"})(xk||(xk={}));var dm;(function(t){t.Update="UPDATE",t.Regenerate="REGENERATE",t.Delete="DELETE",t.Verify="VERIFY",t.Ignore="IGNORE"})(dm||(dm={}));var Tk;(function(t){t.Small="Small",t.Medium="Medium",t.Large="Large"})(Tk||(Tk={}));var U={};mp(U,{BRAND:()=>VH,DIRTY:()=>Ni,EMPTY_PATH:()=>CH,INVALID:()=>se,NEVER:()=>Sj,OK:()=>wt,ParseStatus:()=>mt,Schema:()=>Ee,ZodAny:()=>Ms,ZodArray:()=>es,ZodBigInt:()=>Mi,ZodBoolean:()=>_i,ZodBranded:()=>lu,ZodCatch:()=>Yi,ZodDate:()=>Ui,ZodDefault:()=>qi,ZodDiscriminatedUnion:()=>ad,ZodEffects:()=>vn,ZodEnum:()=>Hi,ZodError:()=>Yt,ZodFirstPartyTypeKind:()=>ue,ZodFunction:()=>ud,ZodIntersection:()=>$i,ZodIssueCode:()=>P,ZodLazy:()=>Vi,ZodLiteral:()=>Gi,ZodMap:()=>ba,ZodNaN:()=>va,ZodNativeEnum:()=>ji,ZodNever:()=>Zn,ZodNull:()=>Pi,ZodNullable:()=>Er,ZodNumber:()=>Fi,ZodObject:()=>Jt,ZodOptional:()=>bn,ZodParsedType:()=>W,ZodPipeline:()=>Au,ZodPromise:()=>_s,ZodReadonly:()=>Ji,ZodRecord:()=>cd,ZodSchema:()=>Ee,ZodSet:()=>Sa,ZodString:()=>Fs,ZodSymbol:()=>wa,ZodTransformer:()=>vn,ZodTuple:()=>yr,ZodType:()=>Ee,ZodUndefined:()=>Li,ZodUnion:()=>Oi,ZodUnknown:()=>Xr,ZodVoid:()=>Qa,addIssueToContext:()=>Y,any:()=>KH,array:()=>tj,bigint:()=>qH,boolean:()=>Vk,coerce:()=>bj,custom:()=>Pk,date:()=>YH,datetimeRegex:()=>Uk,defaultErrorMap:()=>Kr,discriminatedUnion:()=>ij,effect:()=>mj,enum:()=>hj,function:()=>Aj,getErrorMap:()=>Ca,getParsedType:()=>mr,instanceof:()=>HH,intersection:()=>oj,isAborted:()=>id,isAsync:()=>Ia,isDirty:()=>od,isValid:()=>Ns,late:()=>GH,lazy:()=>dj,literal:()=>pj,makeIssue:()=>uu,map:()=>uj,nan:()=>jH,nativeEnum:()=>fj,never:()=>XH,null:()=>zH,nullable:()=>Ej,number:()=>$k,object:()=>nj,objectUtil:()=>pm,oboolean:()=>Qj,onumber:()=>wj,optional:()=>yj,ostring:()=>Bj,pipeline:()=>Ij,preprocess:()=>Cj,promise:()=>gj,quotelessJson:()=>mH,record:()=>cj,set:()=>lj,setErrorMap:()=>EH,strictObject:()=>rj,string:()=>Ok,symbol:()=>JH,transformer:()=>mj,tuple:()=>aj,undefined:()=>WH,union:()=>sj,unknown:()=>ZH,util:()=>we,void:()=>ej});var we;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{let i={};for(let a of s)i[a]=a;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),a={};for(let c of i)a[c]=s[c];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(let a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(we||(we={}));var pm;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(pm||(pm={}));var W=we.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),mr=t=>{switch(typeof t){case"undefined":return W.undefined;case"string":return W.string;case"number":return Number.isNaN(t)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(t)?W.array:t===null?W.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?W.promise:typeof Map<"u"&&t instanceof Map?W.map:typeof Set<"u"&&t instanceof Set?W.set:typeof Date<"u"&&t instanceof Date?W.date:W.object;default:return W.unknown}};var P=we.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),mH=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Yt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,l=0;for(;l<a.path.length;){let A=a.path[l];l===a.path.length-1?(c[A]=c[A]||{_errors:[]},c[A]._errors.push(n(a))):c[A]=c[A]||{_errors:[]},c=c[A],l++}}};return s(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,we.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Yt.create=t=>new Yt(t);var yH=(t,e)=>{let n;switch(t.code){case P.invalid_type:t.received===W.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case P.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,we.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:n=`Unrecognized key(s) in object: ${we.joinValues(t.keys,", ")}`;break;case P.invalid_union:n="Invalid input";break;case P.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${we.joinValues(t.options)}`;break;case P.invalid_enum_value:n=`Invalid enum value. Expected ${we.joinValues(t.options)}, received '${t.received}'`;break;case P.invalid_arguments:n="Invalid function arguments";break;case P.invalid_return_type:n="Invalid function return type";break;case P.invalid_date:n="Invalid date";break;case P.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:we.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case P.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case P.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case P.custom:n="Invalid input";break;case P.invalid_intersection_types:n="Intersection results could not be merged";break;case P.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case P.not_finite:n="Number must be finite";break;default:n=e.defaultError,we.assertNever(t)}return{message:n}},Kr=yH;var Dk=Kr;function EH(t){Dk=t}function Ca(){return Dk}var uu=t=>{let{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let c="",l=r.filter(A=>!!A).slice().reverse();for(let A of l)c=A(a,{data:e,defaultError:c}).message;return{...s,path:i,message:c}},CH=[];function Y(t,e){let n=Ca(),r=uu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Kr?void 0:Kr].filter(s=>!!s)});t.common.issues.push(r)}var mt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let s of n){if(s.status==="aborted")return se;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let s of n){let i=await s.key,a=await s.value;r.push({key:i,value:a})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let s of n){let{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return se;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:e.value,value:r}}},se=Object.freeze({status:"aborted"}),Ni=t=>({status:"dirty",value:t}),wt=t=>({status:"valid",value:t}),id=t=>t.status==="aborted",od=t=>t.status==="dirty",Ns=t=>t.status==="valid",Ia=t=>typeof Promise<"u"&&t instanceof Promise;var K;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(K||(K={}));var Sn=class{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Nk=(t,e)=>{if(Ns(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Yt(t.common.issues);return this._error=n,this._error}}};function ge(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,c)=>{let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??c.defaultError}:typeof c.data>"u"?{message:l??r??c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:l??n??c.defaultError}},description:s}}var Ee=class{get description(){return this._def.description}_getType(e){return mr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:mr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mt,ctx:{common:e.parent.common,data:e.data,parsedType:mr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Ia(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mr(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Nk(r,s)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mr(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return Ns(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Ns(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mr(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Ia(s)?s:Promise.resolve(s));return Nk(r,i)}refine(e,n){let r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{let a=e(s),c=()=>i.addIssue({code:P.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new vn({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return bn.create(this,this._def)}nullable(){return Er.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return es.create(this)}promise(){return _s.create(this,this._def)}or(e){return Oi.create([this,e],this._def)}and(e){return $i.create(this,e,this._def)}transform(e){return new vn({...ge(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new qi({...ge(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new lu({typeName:ue.ZodBranded,type:this,...ge(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Yi({...ge(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Au.create(this,e)}readonly(){return Ji.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},IH=/^c[^\s-]{8,}$/i,BH=/^[0-9a-z]+$/,wH=/^[0-9A-HJKMNP-TV-Z]{26}$/i,QH=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bH=/^[a-z0-9_-]{21}$/i,SH=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vH=/^[-+]?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)?)??$/,kH=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hm,xH=/^(?:(?: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])$/,TH=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,DH=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,NH=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,FH=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,MH=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Mk="((\\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])))",_H=new RegExp(`^${Mk}$`);function _k(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function UH(t){return new RegExp(`^${_k(t)}$`)}function Uk(t){let e=`${Mk}T${_k(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function LH(t,e){return!!((e==="v4"||!e)&&xH.test(t)||(e==="v6"||!e)&&DH.test(t))}function PH(t,e){if(!SH.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function OH(t,e){return!!((e==="v4"||!e)&&TH.test(t)||(e==="v6"||!e)&&NH.test(t))}var Fs=class t extends Ee{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==W.string){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_type,expected:W.string,received:i.parsedType}),se}let r=new mt,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,c=e.data.length<i.value;(a||c)&&(s=this._getOrReturnCtx(e,s),a?Y(s,{code:P.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&Y(s,{code:P.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")kH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"email",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")hm||(hm=new RegExp(RH,"u")),hm.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"emoji",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")QH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"uuid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")bH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"nanoid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")IH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"cuid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")BH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"cuid2",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")wH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"ulid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),Y(s,{validation:"url",code:P.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"regex",code:P.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Uk(i).test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?_H.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?UH(i).test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?vH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"duration",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?LH(e.data,i.version)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"ip",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?PH(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"jwt",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?OH(e.data,i.version)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"cidr",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?FH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"base64",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?MH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"base64url",code:P.invalid_string,message:i.message}),r.dirty()):we.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:P.invalid_string,...K.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...K.errToObj(e)})}url(e){return this._addCheck({kind:"url",...K.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...K.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...K.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...K.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...K.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...K.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...K.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...K.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...K.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...K.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...K.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...K.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...K.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...K.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...K.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...K.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...K.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...K.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...K.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...K.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...K.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...K.errToObj(n)})}nonempty(e){return this.min(1,K.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Fs.create=t=>new Fs({checks:[],typeName:ue.ZodString,coerce:t?.coerce??!1,...ge(t)});function $H(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}var Fi=class t extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==W.number){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_type,expected:W.number,received:i.parsedType}),se}let r,s=new mt;for(let i of this._def.checks)i.kind==="int"?we.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Y(r,{code:P.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?$H(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Y(r,{code:P.not_finite,message:i.message}),s.dirty()):we.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:K.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:K.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:K.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:K.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&we.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};Fi.create=t=>new Fi({checks:[],typeName:ue.ZodNumber,coerce:t?.coerce||!1,...ge(t)});var Mi=class t extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==W.bigint)return this._getInvalidInput(e);let r,s=new mt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):we.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return Y(n,{code:P.invalid_type,expected:W.bigint,received:n.parsedType}),se}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Mi.create=t=>new Mi({checks:[],typeName:ue.ZodBigInt,coerce:t?.coerce??!1,...ge(t)});var _i=class extends Ee{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==W.boolean){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.boolean,received:r.parsedType}),se}return wt(e.data)}};_i.create=t=>new _i({typeName:ue.ZodBoolean,coerce:t?.coerce||!1,...ge(t)});var Ui=class t extends Ee{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==W.date){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_type,expected:W.date,received:i.parsedType}),se}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_date}),se}let r=new mt,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):we.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:K.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:K.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};Ui.create=t=>new Ui({checks:[],coerce:t?.coerce||!1,typeName:ue.ZodDate,...ge(t)});var wa=class extends Ee{_parse(e){if(this._getType(e)!==W.symbol){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.symbol,received:r.parsedType}),se}return wt(e.data)}};wa.create=t=>new wa({typeName:ue.ZodSymbol,...ge(t)});var Li=class extends Ee{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.undefined,received:r.parsedType}),se}return wt(e.data)}};Li.create=t=>new Li({typeName:ue.ZodUndefined,...ge(t)});var Pi=class extends Ee{_parse(e){if(this._getType(e)!==W.null){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.null,received:r.parsedType}),se}return wt(e.data)}};Pi.create=t=>new Pi({typeName:ue.ZodNull,...ge(t)});var Ms=class extends Ee{constructor(){super(...arguments),this._any=!0}_parse(e){return wt(e.data)}};Ms.create=t=>new Ms({typeName:ue.ZodAny,...ge(t)});var Xr=class extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wt(e.data)}};Xr.create=t=>new Xr({typeName:ue.ZodUnknown,...ge(t)});var Zn=class extends Ee{_parse(e){let n=this._getOrReturnCtx(e);return Y(n,{code:P.invalid_type,expected:W.never,received:n.parsedType}),se}};Zn.create=t=>new Zn({typeName:ue.ZodNever,...ge(t)});var Qa=class extends Ee{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.void,received:r.parsedType}),se}return wt(e.data)}};Qa.create=t=>new Qa({typeName:ue.ZodVoid,...ge(t)});var es=class t extends Ee{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==W.array)return Y(n,{code:P.invalid_type,expected:W.array,received:n.parsedType}),se;if(s.exactLength!==null){let a=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(a||c)&&(Y(n,{code:a?P.too_big:P.too_small,minimum:c?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Y(n,{code:P.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Y(n,{code:P.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>s.type._parseAsync(new Sn(n,a,n.path,c)))).then(a=>mt.mergeArray(r,a));let i=[...n.data].map((a,c)=>s.type._parseSync(new Sn(n,a,n.path,c)));return mt.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:K.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:K.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:K.toString(n)}})}nonempty(e){return this.min(1,e)}};es.create=(t,e)=>new es({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...ge(e)});function Ba(t){if(t instanceof Jt){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=bn.create(Ba(r))}return new Jt({...t._def,shape:()=>e})}else return t instanceof es?new es({...t._def,type:Ba(t.element)}):t instanceof bn?bn.create(Ba(t.unwrap())):t instanceof Er?Er.create(Ba(t.unwrap())):t instanceof yr?yr.create(t.items.map(e=>Ba(e))):t}var Jt=class t extends Ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=we.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==W.object){let A=this._getOrReturnCtx(e);return Y(A,{code:P.invalid_type,expected:W.object,received:A.parsedType}),se}let{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(let A in s.data)a.includes(A)||c.push(A);let l=[];for(let A of a){let p=i[A],h=s.data[A];l.push({key:{status:"valid",value:A},value:p._parse(new Sn(s,h,s.path,A)),alwaysSet:A in s.data})}if(this._def.catchall instanceof Zn){let A=this._def.unknownKeys;if(A==="passthrough")for(let p of c)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(A==="strict")c.length>0&&(Y(s,{code:P.unrecognized_keys,keys:c}),r.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let A=this._def.catchall;for(let p of c){let h=s.data[p];l.push({key:{status:"valid",value:p},value:A._parse(new Sn(s,h,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let A=[];for(let p of l){let h=await p.key,g=await p.value;A.push({key:h,value:g,alwaysSet:p.alwaysSet})}return A}).then(A=>mt.mergeObjectSync(r,A)):mt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return K.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:K.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ue.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of we.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of we.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Ba(this)}partial(e){let n={};for(let r of we.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of we.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof bn;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return Lk(we.objectKeys(this.shape))}};Jt.create=(t,e)=>new Jt({shape:()=>t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});Jt.strictCreate=(t,e)=>new Jt({shape:()=>t,unknownKeys:"strict",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});Jt.lazycreate=(t,e)=>new Jt({shape:t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});var Oi=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Yt(c.ctx.common.issues));return Y(n,{code:P.invalid_union,unionErrors:a}),se}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let i,a=[];for(let l of r){let A={...n,common:{...n.common,issues:[]},parent:null},p=l._parseSync({data:n.data,path:n.path,parent:A});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:A}),A.common.issues.length&&a.push(A.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(l=>new Yt(l));return Y(n,{code:P.invalid_union,unionErrors:c}),se}}get options(){return this._def.options}};Oi.create=(t,e)=>new Oi({options:t,typeName:ue.ZodUnion,...ge(e)});var Zr=t=>t instanceof Vi?Zr(t.schema):t instanceof vn?Zr(t.innerType()):t instanceof Gi?[t.value]:t instanceof Hi?t.options:t instanceof ji?we.objectValues(t.enum):t instanceof qi?Zr(t._def.innerType):t instanceof Li?[void 0]:t instanceof Pi?[null]:t instanceof bn?[void 0,...Zr(t.unwrap())]:t instanceof Er?[null,...Zr(t.unwrap())]:t instanceof lu||t instanceof Ji?Zr(t.unwrap()):t instanceof Yi?Zr(t._def.innerType):[],ad=class t extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.object)return Y(n,{code:P.invalid_type,expected:W.object,received:n.parsedType}),se;let r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Y(n,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let s=new Map;for(let i of n){let a=Zr(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of a){if(s.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new t({typeName:ue.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...ge(r)})}};function fm(t,e){let n=mr(t),r=mr(e);if(t===e)return{valid:!0,data:t};if(n===W.object&&r===W.object){let s=we.objectKeys(e),i=we.objectKeys(t).filter(c=>s.indexOf(c)!==-1),a={...t,...e};for(let c of i){let l=fm(t[c],e[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}else if(n===W.array&&r===W.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let a=t[i],c=e[i],l=fm(a,c);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===W.date&&r===W.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var $i=class extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=(i,a)=>{if(id(i)||id(a))return se;let c=fm(i.value,a.value);return c.valid?((od(i)||od(a))&&n.dirty(),{status:n.value,value:c.data}):(Y(r,{code:P.invalid_intersection_types}),se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};$i.create=(t,e,n)=>new $i({left:t,right:e,typeName:ue.ZodIntersection,...ge(n)});var yr=class t extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.array)return Y(r,{code:P.invalid_type,expected:W.array,received:r.parsedType}),se;if(r.data.length<this._def.items.length)return Y(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),se;!this._def.rest&&r.data.length>this._def.items.length&&(Y(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new Sn(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>mt.mergeArray(n,a)):mt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};yr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:t,typeName:ue.ZodTuple,rest:null,...ge(e)})};var cd=class t extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.object)return Y(r,{code:P.invalid_type,expected:W.object,received:r.parsedType}),se;let s=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)s.push({key:i._parse(new Sn(r,c,r.path,c)),value:a._parse(new Sn(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?mt.mergeObjectAsync(n,s):mt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ee?new t({keyType:e,valueType:n,typeName:ue.ZodRecord,...ge(r)}):new t({keyType:Fs.create(),valueType:e,typeName:ue.ZodRecord,...ge(n)})}},ba=class extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.map)return Y(r,{code:P.invalid_type,expected:W.map,received:r.parsedType}),se;let s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,l],A)=>({key:s._parse(new Sn(r,c,r.path,[A,"key"])),value:i._parse(new Sn(r,l,r.path,[A,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of a){let A=await l.key,p=await l.value;if(A.status==="aborted"||p.status==="aborted")return se;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let l of a){let A=l.key,p=l.value;if(A.status==="aborted"||p.status==="aborted")return se;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}}}};ba.create=(t,e,n)=>new ba({valueType:e,keyType:t,typeName:ue.ZodMap,...ge(n)});var Sa=class t extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.set)return Y(r,{code:P.invalid_type,expected:W.set,received:r.parsedType}),se;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(Y(r,{code:P.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(Y(r,{code:P.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let i=this._def.valueType;function a(l){let A=new Set;for(let p of l){if(p.status==="aborted")return se;p.status==="dirty"&&n.dirty(),A.add(p.value)}return{status:n.value,value:A}}let c=[...r.data.values()].map((l,A)=>i._parse(new Sn(r,l,r.path,A)));return r.common.async?Promise.all(c).then(l=>a(l)):a(c)}min(e,n){return new t({...this._def,minSize:{value:e,message:K.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:K.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};Sa.create=(t,e)=>new Sa({valueType:t,minSize:null,maxSize:null,typeName:ue.ZodSet,...ge(e)});var ud=class t extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.function)return Y(n,{code:P.invalid_type,expected:W.function,received:n.parsedType}),se;function r(c,l){return uu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ca(),Kr].filter(A=>!!A),issueData:{code:P.invalid_arguments,argumentsError:l}})}function s(c,l){return uu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ca(),Kr].filter(A=>!!A),issueData:{code:P.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof _s){let c=this;return wt(async function(...l){let A=new Yt([]),p=await c._def.args.parseAsync(l,i).catch(C=>{throw A.addIssue(r(l,C)),A}),h=await Reflect.apply(a,this,p);return await c._def.returns._def.type.parseAsync(h,i).catch(C=>{throw A.addIssue(s(h,C)),A})})}else{let c=this;return wt(function(...l){let A=c._def.args.safeParse(l,i);if(!A.success)throw new Yt([r(l,A.error)]);let p=Reflect.apply(a,this,A.data),h=c._def.returns.safeParse(p,i);if(!h.success)throw new Yt([s(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:yr.create(e).rest(Xr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||yr.create([]).rest(Xr.create()),returns:n||Xr.create(),typeName:ue.ZodFunction,...ge(r)})}},Vi=class extends Ee{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Vi.create=(t,e)=>new Vi({getter:t,typeName:ue.ZodLazy,...ge(e)});var Gi=class extends Ee{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return Y(n,{received:n.data,code:P.invalid_literal,expected:this._def.value}),se}return{status:"valid",value:e.data}}get value(){return this._def.value}};Gi.create=(t,e)=>new Gi({value:t,typeName:ue.ZodLiteral,...ge(e)});function Lk(t,e){return new Hi({values:t,typeName:ue.ZodEnum,...ge(e)})}var Hi=class t extends Ee{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return Y(n,{expected:we.joinValues(r),received:n.parsedType,code:P.invalid_type}),se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return Y(n,{received:n.data,code:P.invalid_enum_value,options:r}),se}return wt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};Hi.create=Lk;var ji=class extends Ee{_parse(e){let n=we.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==W.string&&r.parsedType!==W.number){let s=we.objectValues(n);return Y(r,{expected:we.joinValues(s),received:r.parsedType,code:P.invalid_type}),se}if(this._cache||(this._cache=new Set(we.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=we.objectValues(n);return Y(r,{received:r.data,code:P.invalid_enum_value,options:s}),se}return wt(e.data)}get enum(){return this._def.values}};ji.create=(t,e)=>new ji({values:t,typeName:ue.ZodNativeEnum,...ge(e)});var _s=class extends Ee{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.promise&&n.common.async===!1)return Y(n,{code:P.invalid_type,expected:W.promise,received:n.parsedType}),se;let r=n.parsedType===W.promise?n.data:Promise.resolve(n.data);return wt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}};_s.create=(t,e)=>new _s({type:t,typeName:ue.ZodPromise,...ge(e)});var vn=class extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{Y(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async c=>{if(n.value==="aborted")return se;let l=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return l.status==="aborted"?se:l.status==="dirty"?Ni(l.value):n.value==="dirty"?Ni(l.value):l});{if(n.value==="aborted")return se;let c=this._def.schema._parseSync({data:a,path:r.path,parent:r});return c.status==="aborted"?se:c.status==="dirty"?Ni(c.value):n.value==="dirty"?Ni(c.value):c}}if(s.type==="refinement"){let a=c=>{let l=s.refinement(c,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?se:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?se:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ns(a))return se;let c=s.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Ns(a)?Promise.resolve(s.transform(a.value,i)).then(c=>({status:n.value,value:c})):se);we.assertNever(s)}};vn.create=(t,e,n)=>new vn({schema:t,typeName:ue.ZodEffects,effect:e,...ge(n)});vn.createWithPreprocess=(t,e,n)=>new vn({schema:e,effect:{type:"preprocess",transform:t},typeName:ue.ZodEffects,...ge(n)});var bn=class extends Ee{_parse(e){return this._getType(e)===W.undefined?wt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};bn.create=(t,e)=>new bn({innerType:t,typeName:ue.ZodOptional,...ge(e)});var Er=class extends Ee{_parse(e){return this._getType(e)===W.null?wt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Er.create=(t,e)=>new Er({innerType:t,typeName:ue.ZodNullable,...ge(e)});var qi=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===W.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};qi.create=(t,e)=>new qi({innerType:t,typeName:ue.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});var Yi=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ia(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Yi.create=(t,e)=>new Yi({innerType:t,typeName:ue.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});var va=class extends Ee{_parse(e){if(this._getType(e)!==W.nan){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.nan,received:r.parsedType}),se}return{status:"valid",value:e.data}}};va.create=t=>new va({typeName:ue.ZodNaN,...ge(t)});var VH=Symbol("zod_brand"),lu=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},Au=class t extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?se:i.status==="dirty"?(n.dirty(),Ni(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?se:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:ue.ZodPipeline})}},Ji=class extends Ee{_parse(e){let n=this._def.innerType._parse(e),r=s=>(Ns(s)&&(s.value=Object.freeze(s.value)),s);return Ia(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};Ji.create=(t,e)=>new Ji({innerType:t,typeName:ue.ZodReadonly,...ge(e)});function Fk(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Pk(t,e={},n){return t?Ms.create().superRefine((r,s)=>{let i=t(r);if(i instanceof Promise)return i.then(a=>{if(!a){let c=Fk(e,r),l=c.fatal??n??!0;s.addIssue({code:"custom",...c,fatal:l})}});if(!i){let a=Fk(e,r),c=a.fatal??n??!0;s.addIssue({code:"custom",...a,fatal:c})}}):Ms.create()}var GH={object:Jt.lazycreate},ue;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ue||(ue={}));var HH=(t,e={message:`Input not instance of ${t.name}`})=>Pk(n=>n instanceof t,e),Ok=Fs.create,$k=Fi.create,jH=va.create,qH=Mi.create,Vk=_i.create,YH=Ui.create,JH=wa.create,WH=Li.create,zH=Pi.create,KH=Ms.create,ZH=Xr.create,XH=Zn.create,ej=Qa.create,tj=es.create,nj=Jt.create,rj=Jt.strictCreate,sj=Oi.create,ij=ad.create,oj=$i.create,aj=yr.create,cj=cd.create,uj=ba.create,lj=Sa.create,Aj=ud.create,dj=Vi.create,pj=Gi.create,hj=Hi.create,fj=ji.create,gj=_s.create,mj=vn.create,yj=bn.create,Ej=Er.create,Cj=vn.createWithPreprocess,Ij=Au.create,Bj=()=>Ok().optional(),wj=()=>$k().optional(),Qj=()=>Vk().optional(),bj={string:(t=>Fs.create({...t,coerce:!0})),number:(t=>Fi.create({...t,coerce:!0})),boolean:(t=>_i.create({...t,coerce:!0})),bigint:(t=>Mi.create({...t,coerce:!0})),date:(t=>Ui.create({...t,coerce:!0}))};var Sj=se;var ka=["playwright","pytest","robot","junit","vitest","jest","mocha","go","rspec","jasmine"];var Gk="skyramp_session_storage.json";var gm;(function(t){t.PYTHON="python",t.TYPESCRIPT="typescript",t.JAVASCRIPT="javascript",t.JAVA="java"})(gm||(gm={}));var Cr;(function(t){t.SMOKE="smoke",t.FUZZ="fuzz",t.CONTRACT="contract",t.LOAD="load",t.INTEGRATION="integration",t.E2E="e2e",t.UI="ui",t.UNIT="unit",t.UNKNOWN="unknown"})(Cr||(Cr={}));var xZ=[Cr.CONTRACT,Cr.INTEGRATION,Cr.E2E,Cr.UI];var Hk;(function(t){t.Rest="rest",t.Grpc="grpc",t.Kafka="kafka"})(Hk||(Hk={}));var ld;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS"})(ld||(ld={}));var du;(function(t){t.LOCAL="local",t.DOCKER="docker",t.KUBERNETES="k8s"})(du||(du={}));var vj=U.nativeEnum(du),mm=U.preprocess(t=>t==="kubernetes"?du.KUBERNETES:t,vj);var kj=U.object({language:U.nativeEnum(gm).describe("Programming language for the generated test (default: python). Must be one of: python, typescript, javascript, java"),framework:U.string().describe(`Testing framework to use. Supported: ${ka.join(", ")} (e.g. pytest for python, playwright/vitest/jest for js/ts, junit for java).`)}),jk=U.object({...kj.shape,deployDashboard:U.boolean().default(!1).describe("Whether to deploy the Skyramp dashboard for test monitoring"),runtime:mm.default(du.LOCAL).describe("Runtime environment (local, docker, or k8s; accepts kubernetes as an alias)"),dockerNetwork:U.string().default("").describe("Docker network name to use for containerized testing"),dockerWorkerPort:U.number().int().min(0).max(65535).default(0).describe("Port number for the Docker worker service"),k8sNamespace:U.string().default("").describe("Kubernetes namespace for deployment"),k8sConfig:U.string().default("").describe("Path to Kubernetes configuration file"),k8sContext:U.string().default("").describe("Kubernetes context to use"),authHeader:U.string().default("").describe("Name of the HTTP header that carries the auth credential. Common values: 'Authorization' (Bearer/Basic/Token auth), 'X-Api-Key', 'X-Auth-Token', 'Cookie'. Other accepted values: 'X-Access-Token', 'X-OAuth-Token', 'X-Client-ID', 'X-Client-Secret', 'X-Client-Token', 'X-GitHub-Token', 'X-Firebase-AppCheck', 'Proxy-Authorization', 'Fastly-Key', 'Heroku-Bearer'. Pass empty string to document an unauthenticated endpoint in the generated test's assertions. This is the header KEY name (e.g., 'X-Api-Key'), NOT the token value."),authScheme:U.string().default("").describe("Only for Authorization headers. The literal prefix before the token (e.g., 'Bearer' produces 'Authorization: Bearer <token>'). Common values: 'Bearer', 'Basic', 'Token'. If the API sends raw tokens with no prefix (e.g., 'Authorization: eyJ...'), leave empty or omit. Ignored when authHeader is not 'Authorization'."),insecure:U.boolean().default(!1).describe("Whether to allow insecure SSL connections for HTTPS endpoints"),output:U.string().optional().refine(t=>!t||t===""?!0:[".py",".ts",".js",".java"].some(n=>t.endsWith(n)),{message:"Output file must have one of these extensions: .py, .ts, .js, .java"}).describe("Name of the output test file. For Playwright, name the file the way the repository names its tests: read the test files already in outputDir and match their spelling. Use *.test.ts where they use it, *.spec.ts otherwise (e.g. contract_math_add.spec.ts, fuzz_orders.test.ts). For other frameworks (pytest, junit), standard extensions are fine (.py, .java). Optional \u2014 when omitted, Skyramp generates a default name."),outputDir:U.string().describe("MUST be absolute path to the directory where test files will be generated. If not provided, the CURRENT WORKING DIRECTORY will be used WITHOUT ANY SUBDIRECTORIES"),force:U.boolean().default(!0).describe("Whether to overwrite existing files in the output directory"),mockPort:U.number().int().min(0).max(65535).default(0).describe("Port number for the mock server"),optionalFields:U.boolean().default(!1).describe("Whether to include optional fields in the generated test/mock"),prompt:U.string().describe("The prompt user provided to generate the test")}),TZ=U.object({playwrightInput:U.string().describe("MUST be absolute path to the playwright input file like /path/to/playwright-ui-test.zip and MUST be a zip file captured using start_trace_collection tool"),playwrightStoragePath:U.string().optional().describe("Path to LOAD existing playwright session storage for trace collection with playwright enabled. THE PATH MUST BE AN ABSOLUTE PATH LIKE /Users/<path>/<filename>.json"),playwrightSaveStoragePath:U.string().optional().describe(`Path to SAVE Playwright session storage after trace collection. Omit this argument to use the default \u2014 \`${Gk}\` resolved against the active outputDir, which produces an absolute path like '/abs/outputDir/${Gk}'. SAVES authentication state (cookies, localStorage, sessionStorage) when the browser closes. To LOAD existing auth state, use playwrightStoragePath instead. Can be a bare filename (joined with outputDir), a relative path, or an absolute path.`),playwrightViewportSize:U.union([U.enum(["","hd","full-hd","2k"]),U.string().regex(/^\d+,\d+$/,"Custom viewport must be 'WIDTH,HEIGHT' format (e.g., '1920,1080')")]).default("").describe("Viewport size for playwright browser. THE VALUE MUST BE IN THE FORMAT ['', 'hd', 'full-hd', '2k', 'x,y' e.g. '1920,1080' for 1920x1080 resolution]. DEFAULT VALUE IS ''. If set to '', the browser will use its default viewport size."),browser:U.enum(["chromium","firefox","webkit"]).default("chromium").describe("Browser to use for Playwright trace collection. Supported browsers: 'chromium' (default), 'firefox', 'webkit'. Choose based on your testing requirements and target browser compatibility."),device:U.string().default("").describe("Device to emulate for Playwright trace collection. Supported devices include: 'iPhone 13', 'iPhone 13 Pro', 'Pixel 5', 'Galaxy S9+', 'iPad Pro', etc. Leave empty for no device emulation (desktop). Use specific device names for mobile/tablet testing.")}),DZ=U.object({trace:U.string().describe("Absolute path to the trace file in JSON format (e.g., /path/to/trace.json). Must use .json extension only. Do not use .jsonl files."),include:U.array(U.string()).default([]).describe("List of endpoints or patterns to include in test generation."),exclude:U.array(U.string()).default([]).describe("List of endpoints or patterns to exclude from test generation."),...jk.shape}),NZ={endpointURL:U.string().describe("The full endpoint URL to test including base URL and path (e.g., https://demoshop.skyramp.dev/api/v1/products). MUST include both the base URL and the endpoint path \u2014 never just the base URL alone."),method:U.union([U.nativeEnum(ld),U.literal("")]).default("").describe('HTTP method to use. DEFAULT: Use empty string ("") to test ALL available methods from OpenAPI schema (recommended). Only specify a specific method (GET, POST, PUT, DELETE, etc.) if user explicitly requests testing a single method only.'),apiSchema:U.string().default("").describe("MUST be absolute path(/path/to/openapi.json) to the OpenAPI/Swagger schema file or a URL to the OpenAPI/Swagger schema file(e.g. https://demoshop.skyramp.dev/openapi.json). DO NOT TRY TO ASSUME THE OPENAPI SCHEMA IF NOT PROVIDED. NOTE TO AI ASSISTANTS: You do not need to read the contents of this file - simply pass the file path as the backend will read and process it."),pathParams:U.string().default("").describe("Comma-separated path parameter values in the form 'key=value,key2=value2' (e.g., 'id=1,name=John'). DO NOT populate this field unless the user has explicitly provided path parameter values. For contract tests, parent path parameters are automatically handled via the parent provisioning mechanism (parentRequestData) \u2014 do NOT invent or guess values for those here. Only supply this field if the user explicitly states specific path parameter values to use."),queryParams:U.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for URL query parameters. Workspace-configured api.defaultQueryParams (if set) are merged in automatically, with any api.queryParamOverrides entry whose pathPattern matches this endpoint layered on top \u2014 no need to repeat them here. An explicit value for the same key here overrides both."),formParams:U.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for form data parameters"),requestData:U.string().default("").refine(t=>{if(!t||t===""||t.startsWith("@"))return!0;try{return JSON.parse(t),!0}catch{}let e=t.trim();return!!(e.startsWith("---")||/^\w[\w\s]*:/.test(e)||e.startsWith("-"))},{message:"requestData must be valid JSON, YAML, or an absolute file path prefixed with '@'. Received what appears to be plain text. Provide the actual request body as a JSON object."}).describe("Sample request body data, provided either as an inline JSON/YAML string or as an absolute file path prefixed with '@' (e.g., @/absolute/path/to/file). MUST be valid JSON or YAML \u2014 do NOT pass natural language descriptions."),responseStatusCode:U.string().default("").refine(t=>!t||/^[1-5]\d{2}$/.test(t),{message:"Must be a valid HTTP status code in 100-599 (e.g., '200', '404') or empty string"}).describe("Expected HTTP response status code (e.g., '200', '201', '404'). DO NOT ASSUME STATUS CODE IF NOT PROVIDED"),...jk.shape},FZ=U.object({codeReuse:U.boolean().default(!1).describe("Reuse existing code in the generated test \u2014 consolidates helper functions shared with sibling Skyramp-generated tests into a SkyrampUtils file; for TS/JS Playwright tests with POM reuse enabled it instead refactors the test to use the repo's existing Page Object Model"),modularizeCode:U.boolean().default(!1).describe("Whether to modularize the code")}),MZ=[Cr.INTEGRATION,Cr.CONTRACT,Cr.UI];var Ad;(function(t){t.Bug="bug",t.Lint="lint",t.Type="type",t.Config="config"})(Ad||(Ad={}));var dd;(function(t){t.NotMapped="not-mapped",t.DemotedByVerify="demoted-by-verify"})(dd||(dd={}));var pd;(function(t){t.Passed="passed",t.Failed="failed",t.SkippedNoPom="skipped-no-pom"})(pd||(pd={}));var ym;(function(t){t.Passed="passed",t.Failed="failed",t.NoUtilsFile="no-utils-file"})(ym||(ym={}));Ft();var hd=t=>`${t} POM call${t===1?"":"s"}`,fd={testRecommendationsImplementedHeader:t=>`\u{1F4A1} Test Recommendations Implemented (${t})`,testTypeCellLabels:{},statusLabels:{},severityLabels:{},reuse:{label:"POM reuse",noPomLayer:"skipped \u2014 no page-object layer detected for this test",reusedAndVerified:t=>`${hd(t)} reused and verified`,reusedThenVerified:(t,e)=>`${hd(t)} reused, ${e} of them verified`,reused:t=>`${hd(t)} reused`,verified:t=>`${hd(t)} verified`,unresolved:t=>`${t} not resolvable to POM source (informational, not declines)`,candidates:t=>`${t} candidate POM file${t===1?"":"s"} detected`,verificationPassed:"verification passed",verificationFailed:"\u26A0\uFE0F verification did not pass",keptInline:t=>`kept inline: ${t}`,gate:{"not-mapped":"not mapped","demoted-by-verify":"demoted by verification"}},testMaintenanceHeader:t=>`\u2705 Test Maintenance (${t})`,maintenanceTableHeader:"| Test Type | Endpoint | File | Change | Before | After |",testResultsHeader:t=>`\u{1F9EA} Test Results (${t})`,columnVideo:"Video",videoDownloadLink:t=>`[\u{1F4F9} download](${t})`,videosArtifactFallback:t=>`\u{1F4F9} Recorded UI test videos: [download from run artifacts](${t})`,issuesFoundHeader:t=>`\u26A0\uFE0F Issues Found (${t})`,configErrorsHeader:"\u2699\uFE0F Configuration Errors",nextStepsHeader:"### \u{1F4A1} Next Steps",caveatsHeader:"### \u26A0\uFE0F What this run could not prove",rows:{passed:t=>t?"passed against the running app":"passed",notRun:t=>t?"not run against a live app this run":"not run this run",failedBug:t=>t?"failed against the running app":"failed",executedOf:(t,e)=>e?` and executed ${t} of them against the running app.`:` and executed ${t} of them.`,noneExecuted:t=>t?"; none were executed against a live app this run.":"; none were executed this run."},caveats:{deployFailed:"The app could not be started, so nothing here was checked against a running system.",changeBrokeBringup:"This change appears to have broken the app's start-up: it could not run with the PR applied, so nothing was tested against it.",bringupFailed:"The app could not be started this run, for a reason outside this PR \u2014 nothing was tested against a live app.",testsNotExecuted:"No test was run against a live app this run \u2014 an un-run suite is not evidence the change works.",recipeDrift:"The recorded way to start the app was out of date and had to be corrected before it would come up.",mockedDependency:t=>`${t} was mocked rather than really deployed \u2014 a green run against it is not proof.`,finalizeNotReady:t=>`The tests are not ready to merge as they stand${t?`: ${t}`:"."}`,ciNotCovered:"No CI workflow runs these tests, so they will not execute on future pull requests.",ciNotCoveredBecause:t=>`The repo's CI will not run some of these tests on future pull requests: ${t}`,sutNotRequired:"No app was started: validation triage found no deployed behavior this change needs validated.",lintNotCovered:t=>`The repo's linter does not check ${t} \u2014 a style or type issue there would not be caught automatically.`,analysisUnverified:t=>`Part of the change analysis could not be verified (${t} unresolved check${t===1?"":"s"}); the tests were planned treating those claims as unconfirmed.`,unitTestsNotRun:t=>`Testbot could not run the unit tests it selected, so no unit result here is its own re-run: ${t}`,downstreamNotChecked:t=>`Not run: checks of other parts of the app that this change might affect. The change does not alter that behavior itself, so they are not needed to validate it. ${t}`,testsCouldNotRunHere:(t,e)=>`${t} ${t===1?"test exists":"tests exist"} in this change, but this environment could not run ${t===1?"it":"them"}, so ${t===1?"it has":"they have"} no result here (not skipped): ${e}`,modelProviderDenied:(t,e=!1)=>e?`${t}, the model provider, refused a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${t}, the model provider, refused Testbot's calls, so the run stopped before it finished. Access was denied because of credentials, permissions, or a usage limit. For Skyramp-managed provider access, contact Skyramp support before running again; if you manage the provider account, ask its administrator to resolve access or usage limits. No changes to your code are needed.`,modelProviderUnavailable:(t,e=!1)=>e?`${t}, the model provider, was unavailable for a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${t}, the model provider, was unavailable to Testbot, so this stage could not finish. Any results already obtained remain in this report. No changes to your code or Testbot setup are needed. Please try again later.`},providerOutageHeadline:(t,e)=>`Testbot could not reach ${t} \u2014 it tried ${e} times without success.`,providerOutageActionStatusPage:t=>`Check ${t}. Once the service is healthy, re-run this workflow from its run page in the Actions tab.`,providerRateLimitHeadline:t=>`Testbot was rate-limited by ${t} (HTTP 429).`,providerRateLimitAction:"Wait for the limit to reset, then re-run this workflow from its run page in the Actions tab. If this repeats, raise the rate limit on the credential this workflow uses or run Testbot on fewer pull requests at once.",providerUsageLimitHeadline:t=>`The account behind ${t} has reached its usage limit.`,providerUsageLimitAction:"Raise the spend or token cap on the account behind this workflow's credential, then re-run this workflow from its run page in the Actions tab.",providerAuthExpiredHeadline:t=>`The credential Testbot uses to reach ${t} expired while the run was still working.`,providerAuthExpiredAction:"The credential is issued with a fixed lifetime, so a longer run can outlive it. Re-run this workflow from its run page in the Actions tab. If runs on this repository regularly last longer than that lifetime, issue the credential per job or split the run so each job stays inside it.",providerTimeoutHeadline:t=>`Testbot ran past its ${t}-minute time limit and was stopped.`,providerTimeoutAction:"Raise the `testbotTimeout` input on the workflow if runs on this repository legitimately need longer.",staged:{testsSourcePullRequest:t=>`Tests for source pull request ${t}`,requestedByPerson:t=>`Requested by ${t}`,requestedByPolicy:t=>`Started by the Validation Policy ${t}`,notTranslated:{"no-time":"> \u26A0\uFE0F This report is in English: no time was left to translate it.",failed:"> \u26A0\uFE0F This report is in English: the translation failed."},noLiveApp:t=>`> \u26A0\uFE0F **No live app (SUT) was available this run** \u2014 the ${t} test(s) below were **not executed** (there was no app to run them against). Run them against a running app to confirm they pass (and that any repro test fails as intended).`,unitTestsInFile:(t,e,n)=>`**${t}**: ${e} unit test${e===1?"":"s"}${n?` for ${n}`:""}`,addedToExistingFile:"added to an existing test file",testPackagesHeader:"### \u{1F4E6} Running these tests",testPackageLine:(t,e)=>`\`${t}/\` is a self-contained test package Skyramp Testbot owns and maintains, with its own manifest, lockfile and runner config. Run it with \`${e}\`; to run it on every pull request, add that one command to CI.`,appManifestsUntouched:"The application's own manifests and lockfiles were not changed.",dependencyChangesHeader:"### \u{1F4E6} Changes to the application's dependencies",dependencyChangeLine:(t,e,n)=>`Added \`${t}\` to \`${e}\` (and its lockfile)${n?`: ${n}`:""}`,testMaintenanceHeader:"\u2705 Test Maintenance",keptNot:"kept, not ",declinedPlanned:"(declined the planned ",declinedMaintenanceHeader:"\u21A9\uFE0F Declined Maintenance",existingEvidenceHeader:"\u2705 Existing Evidence",trustedCheckPassed:(t,e)=>`Trusted CI check ${t} passed${e?` on ${e}`:""}, establishing:`,testResultsHeader:"\u{1F9EA} Test Results",resultsTableHeader:"| Test ID | Test Type | Endpoint | Status | Details |",unitResultsTableHeader:"| Test ID | Test Type | Code under test | Test | Cases | Status | Details |",casesPassed:(t,e,n)=>`${t}/${e} passed${n?`, ${n} skipped`:""}`,behaviourCoverageHeader:"\u{1F517} Behaviour Coverage",coverageCaption:(t,e,n,r)=>` (${t} generated \xB7 ${e} modified \xB7 ${n} verified \xB7 ${r} executed)`,coverageTableHeader:"| Behaviour | Source | Tested By | Maintained By |",writtenNotRun:"written, not run",issuesFoundHeader:"\u26A0\uFE0F Issues Found",caveatsHeader:"### \u26A0\uFE0F What This Run Could Not Prove",commentHeader:"### Skyramp Testbot",timedOut:"> \u26A0\uFE0F Run timed out \u2014 the results below are partial.",stopReasons:{},publishFailures:{},commitHook:t=>t?`${t} hook`:"commit hook",commitRefusedByHook:(t,e)=>`Your repository's ${t} rejected the generated-test commit, so no Testbot PR was created. Hook error: \`${e}\`.`,commitHookCouldNotRun:(t,e)=>`Your repository's ${t} could not run, so no Testbot PR was created: a command it calls is not installed on the runner. Hook error: \`${e}\`.`,maintenanceActions:{},stoppedEarly:(t,e)=>`> \u26A0\uFE0F Run stopped early \u2014 ${t}. The results below are partial.${e}`,viewInSkyramp:t=>` [View in Skyramp](${t})`,descriptionCut:(t,e,n)=>`_\u2026 The rest is left out${e===void 0?", with more test results":e?`, with ${e} more test result${e===1?"":"s"}`:""}: Azure DevOps takes at most ${t} characters.${n?` [Full report](${n})`:""}_`,testsReplaced:(t,e,n)=>[e?`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${t}), commit \`${e}\`.`:`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${t}).`,n?`The tests of [the earlier run](${n}) are superseded.`:"The tests an earlier run wrote here are superseded."].join(" "),setupRunEnds:{finished:"Setup run finished. Skyramp is checking the result.",failed:"Setup run failed.",timedOut:"Setup run ran out of time.",cancelledInSkyramp:"Setup run was cancelled in Skyramp.",stoppedToResume:"Setup run stopped. Resume it in Skyramp."},appUnreachable:t=>`Unable to contact the mothership ${t}. Please try again later.`,couldNotStart:t=>`Skyramp Testbot could not start: ${t}`,assembledAfterFailedChecks:t=>`> \u26A0\uFE0F This report was assembled automatically after the write-up step failed its checks; ${t} check(s) remain unmet \u2014 see the run log for details.`,testbotPrLine:(t,e,n)=>`Testbot PR${t?` (${t})`:""} : [${e}](${n})`,viewRun:t=>`_[View run](${t})_`,testsPrNotOpened:(t,e)=>`The tests PR could not be opened (${t}); the tests were pushed to branch \`${e}\`.`,testsNotDelivered:t=>`The tests could not be delivered: ${t}`,testsNotPushed:(t,e)=>`The tests could not be pushed (${t}); they remain on the local branch \`${e}\`.`,testsPrRetargeted:t=>`The dev PR merged while tests were being generated \u2014 the tests PR targets its base branch${t?` (\`${t}\`)`:""} instead.`,testsPrUnchanged:"This push required no new test changes; the tests PR below is from an earlier run and was left as is.",committedNoPr:t=>`The tests were committed but no PR was opened: ${t}.`,testsNotProposed:t=>`The tests were not proposed in a pull request: ${t}.`}};var qk={testRecommendationsImplementedHeader:t=>`\u{1F4A1} \u5B9F\u88C5\u3057\u305F\u30C6\u30B9\u30C8\u63A8\u5968\uFF08${t}\u4EF6\uFF09`,testTypeCellLabels:{smoke:"\u30B9\u30E2\u30FC\u30AF",fuzz:"\u30D5\u30A1\u30BA",contract:"\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8",load:"\u8CA0\u8377",integration:"\u7D71\u5408",e2e:"E2E",ui:"UI",unit:"\u30E6\u30CB\u30C3\u30C8"},statusLabels:{Pass:"\u5408\u683C",Fail:"\u4E0D\u5408\u683C",Error:"\u30A8\u30E9\u30FC",Skipped:"\u30B9\u30AD\u30C3\u30D7"},severityLabels:{critical:"\u91CD\u5927",high:"\u9AD8",medium:"\u4E2D",low:"\u4F4E"},reuse:{label:"POM \u518D\u5229\u7528",noPomLayer:"\u30B9\u30AD\u30C3\u30D7 \u2014 \u3053\u306E\u30C6\u30B9\u30C8\u306B\u518D\u5229\u7528\u3067\u304D\u308B\u30DA\u30FC\u30B8\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u5C64\u306F\u691C\u51FA\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",reusedAndVerified:t=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u518D\u5229\u7528\u30FB\u691C\u8A3C\u6E08\u307F`,reusedThenVerified:(t,e)=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u518D\u5229\u7528\uFF08\u3046\u3061 ${e} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F\uFF09`,reused:t=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u518D\u5229\u7528`,verified:t=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F`,unresolved:t=>`${t} \u4EF6\u306F POM \u30BD\u30FC\u30B9\u307E\u3067\u89E3\u6C7A\u3067\u304D\u305A\uFF08\u53C2\u8003\u60C5\u5831\u3067\u3042\u308A\u3001\u9664\u5916\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF09`,candidates:t=>`\u5019\u88DC\u3068\u306A\u308B POM \u30D5\u30A1\u30A4\u30EB ${t} \u4EF6\u3092\u691C\u51FA`,verificationPassed:"\u691C\u8A3C\u306B\u5408\u683C",verificationFailed:"\u26A0\uFE0F \u691C\u8A3C\u306B\u5408\u683C\u3057\u307E\u305B\u3093\u3067\u3057\u305F",keptInline:t=>`\u30A4\u30F3\u30E9\u30A4\u30F3\u306E\u307E\u307E: ${t}`,gate:{"not-mapped":"\u30DE\u30C3\u30D4\u30F3\u30B0\u5BFE\u8C61\u5916","demoted-by-verify":"\u691C\u8A3C\u3067\u5DEE\u3057\u623B\u3057"}},testMaintenanceHeader:t=>`\u2705 \u30C6\u30B9\u30C8\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\uFF08${t}\u4EF6\uFF09`,maintenanceTableHeader:"| \u30C6\u30B9\u30C8\u7A2E\u5225 | \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8 | \u30D5\u30A1\u30A4\u30EB | \u5909\u66F4\u5185\u5BB9 | \u5909\u66F4\u524D | \u5909\u66F4\u5F8C |",testResultsHeader:t=>`\u{1F9EA} \u30C6\u30B9\u30C8\u7D50\u679C\uFF08${t}\u4EF6\uFF09`,columnVideo:"\u30D3\u30C7\u30AA",videoDownloadLink:t=>`[\u{1F4F9} \u30C0\u30A6\u30F3\u30ED\u30FC\u30C9](${t})`,videosArtifactFallback:t=>`\u{1F4F9} \u9332\u753B\u3055\u308C\u305F UI \u30C6\u30B9\u30C8\u30D3\u30C7\u30AA: [\u5B9F\u884C\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u304B\u3089\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9](${t})`,issuesFoundHeader:t=>`\u26A0\uFE0F \u691C\u51FA\u3055\u308C\u305F\u554F\u984C\uFF08${t}\u4EF6\uFF09`,configErrorsHeader:"\u2699\uFE0F \u8A2D\u5B9A\u30A8\u30E9\u30FC",nextStepsHeader:"### \u{1F4A1} \u6B21\u306E\u30B9\u30C6\u30C3\u30D7",caveatsHeader:"### \u26A0\uFE0F \u3053\u306E\u5B9F\u884C\u3067\u78BA\u8A8D\u3067\u304D\u306A\u304B\u3063\u305F\u3053\u3068",rows:{passed:t=>t?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u6210\u529F\u3057\u307E\u3057\u305F":"\u6210\u529F\u3057\u307E\u3057\u305F",notRun:t=>t?"\u3053\u306E\u5B9F\u884C\u3067\u306F\u30E9\u30A4\u30D6\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F":"\u3053\u306E\u5B9F\u884C\u3067\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",failedBug:t=>t?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5931\u6557\u3057\u307E\u3057\u305F":"\u5931\u6557\u3057\u307E\u3057\u305F",executedOf:(t,e)=>e?`\u3001\u305D\u306E\u3046\u3061 ${t} \u4EF6\u3092\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3057\u307E\u3057\u305F\u3002`:`\u3001\u305D\u306E\u3046\u3061 ${t} \u4EF6\u3092\u5B9F\u884C\u3057\u307E\u3057\u305F\u3002`,noneExecuted:t=>t?"\u3002\u3053\u306E\u5B9F\u884C\u3067\u306F\u30E9\u30A4\u30D6\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3055\u308C\u305F\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002":"\u3002\u3053\u306E\u5B9F\u884C\u3067\u306F\u5B9F\u884C\u3055\u308C\u305F\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002"},caveats:{deployFailed:"\u30A2\u30D7\u30EA\u3092\u8D77\u52D5\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u3053\u306B\u793A\u3059\u5185\u5BB9\u306F\u7A3C\u50CD\u4E2D\u306E\u30B7\u30B9\u30C6\u30E0\u306B\u5BFE\u3057\u3066\u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",changeBrokeBringup:"\u3053\u306E\u5909\u66F4\u306B\u3088\u308A\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u304C\u58CA\u308C\u305F\u3068\u601D\u308F\u308C\u307E\u3059\u3002PR \u3092\u9069\u7528\u3057\u305F\u72B6\u614B\u3067\u8D77\u52D5\u3067\u304D\u305A\u3001\u30C6\u30B9\u30C8\u306F\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",bringupFailed:"\u3053\u306E PR \u3068\u306F\u7121\u95A2\u4FC2\u306E\u7406\u7531\u3067\u30A2\u30D7\u30EA\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3059\u308B\u30C6\u30B9\u30C8\u306F\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",testsNotExecuted:"\u3053\u306E\u5B9F\u884C\u3067\u306F\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u30C6\u30B9\u30C8\u304C\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u672A\u5B9F\u884C\u306E\u30C6\u30B9\u30C8\u306F\u5909\u66F4\u304C\u6B63\u3057\u304F\u52D5\u4F5C\u3059\u308B\u8A3C\u62E0\u306B\u306A\u308A\u307E\u305B\u3093\u3002",recipeDrift:"\u8A18\u9332\u3055\u308C\u3066\u3044\u305F\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u624B\u9806\u304C\u53E4\u304F\u306A\u3063\u3066\u304A\u308A\u3001\u8D77\u52D5\u524D\u306B\u4FEE\u6B63\u304C\u5FC5\u8981\u3067\u3057\u305F\u3002",mockedDependency:t=>`${t} \u306F\u5B9F\u969B\u306B\u30C7\u30D7\u30ED\u30A4\u3055\u308C\u305A\u30E2\u30C3\u30AF\u5316\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u5BFE\u3059\u308B\u6210\u529F\u7D50\u679C\u306F\u8A3C\u660E\u306B\u306F\u306A\u308A\u307E\u305B\u3093\u3002`,finalizeNotReady:t=>`\u30C6\u30B9\u30C8\u306F\u73FE\u72B6\u3067\u306F\u30DE\u30FC\u30B8\u53EF\u80FD\u306A\u72B6\u614B\u3067\u306F\u3042\u308A\u307E\u305B\u3093${t?`: ${t}`:"\u3002"}`,ciNotCovered:"\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3059\u308B CI \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C\u306A\u3044\u305F\u3081\u3001\u4ECA\u5F8C\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3002",ciNotCoveredBecause:t=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u306F\u3001\u4ECA\u5F8C\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306E\u4E00\u90E8\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093: ${t}`,sutNotRequired:"\u30A2\u30D7\u30EA\u306F\u8D77\u52D5\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u691C\u8A3C\u30C8\u30EA\u30A2\u30FC\u30B8\u306B\u3088\u308A\u3001\u3053\u306E\u5909\u66F4\u3067\u691C\u8A3C\u304C\u5FC5\u8981\u306A\u30C7\u30D7\u30ED\u30A4\u5F8C\u306E\u632F\u308B\u821E\u3044\u306F\u306A\u3044\u3068\u5224\u65AD\u3055\u308C\u307E\u3057\u305F\u3002",lintNotCovered:t=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30EA\u30F3\u30BF\u30FC\u306F ${t} \u3092\u30C1\u30A7\u30C3\u30AF\u3057\u307E\u305B\u3093\u3002\u30B9\u30BF\u30A4\u30EB\u3084\u578B\u306E\u554F\u984C\u304C\u81EA\u52D5\u7684\u306B\u306F\u691C\u51FA\u3055\u308C\u307E\u305B\u3093\u3002`,analysisUnverified:t=>`\u5909\u66F4\u306E\u5206\u6790\u306E\u4E00\u90E8\u3092\u691C\u8A3C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u672A\u89E3\u6C7A\u306E\u30C1\u30A7\u30C3\u30AF ${t} \u4EF6\uFF09\u3002\u8A72\u5F53\u3059\u308B\u4E3B\u5F35\u306F\u672A\u78BA\u8A8D\u3068\u3057\u3066\u6271\u3044\u3001\u30C6\u30B9\u30C8\u3092\u8A08\u753B\u3057\u307E\u3057\u305F\u3002`,unitTestsNotRun:t=>`Testbot \u306F\u9078\u629E\u3057\u305F\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3053\u3053\u306B\u3042\u308B\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8\u306E\u7D50\u679C\u306F Testbot \u81EA\u8EAB\u306E\u518D\u5B9F\u884C\u306B\u3088\u308B\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093: ${t}`,downstreamNotChecked:t=>`\u672A\u5B9F\u884C: \u3053\u306E\u5909\u66F4\u304C\u5F71\u97FF\u3057\u3046\u308B\u3001\u30A2\u30D7\u30EA\u306E\u4ED6\u306E\u90E8\u5206\u306E\u78BA\u8A8D\u3067\u3059\u3002\u3053\u306E\u5909\u66F4\u81EA\u4F53\u306F\u305D\u306E\u52D5\u4F5C\u3092\u5909\u3048\u306A\u3044\u305F\u3081\u3001\u5909\u66F4\u306E\u691C\u8A3C\u306B\u306F\u4E0D\u8981\u3067\u3059\u3002${t}`,testsCouldNotRunHere:(t,e)=>`\u3053\u306E\u5909\u66F4\u306B\u306F ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u306E\u74B0\u5883\u3067\u306F\u5B9F\u884C\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\uFF08\u30B9\u30AD\u30C3\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF09: ${e}`,modelProviderDenied:(t,e=!1)=>e?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u304C\u547C\u3073\u51FA\u3057\u3092\u62D2\u5426\u3057\u307E\u3057\u305F\u3002\u3059\u3067\u306B\u5F97\u3089\u308C\u305F\u8A3C\u62E0\u306F\u3001\u3053\u306E\u5B9F\u884C\u306E\u7D50\u679C\u3092\u5224\u65AD\u3059\u308B\u306E\u306B\u5341\u5206\u3067\u3059\u3002`:`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u304C Testbot \u306E\u547C\u3073\u51FA\u3057\u3092\u62D2\u5426\u3057\u305F\u305F\u3081\u3001\u5B9F\u884C\u306F\u5B8C\u4E86\u524D\u306B\u505C\u6B62\u3057\u307E\u3057\u305F\u3002\u8A8D\u8A3C\u60C5\u5831\u3001\u6A29\u9650\u3001\u307E\u305F\u306F\u4F7F\u7528\u91CF\u306E\u4E0A\u9650\u306B\u3088\u308A\u30A2\u30AF\u30BB\u30B9\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F\u3002\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u3092 Skyramp \u304C\u7BA1\u7406\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u518D\u5B9F\u884C\u3059\u308B\u524D\u306B Skyramp \u30B5\u30DD\u30FC\u30C8\u306B\u304A\u554F\u3044\u5408\u308F\u305B\u304F\u3060\u3055\u3044\u3002\u3054\u81EA\u8EAB\u3067\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u7BA1\u7406\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u305D\u306E\u7BA1\u7406\u8005\u306B\u30A2\u30AF\u30BB\u30B9\u307E\u305F\u306F\u4F7F\u7528\u91CF\u306E\u4E0A\u9650\u306E\u89E3\u6C7A\u3092\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002`,modelProviderUnavailable:(t,e=!1)=>e?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u3092\u547C\u3073\u51FA\u3057\u6642\u306B\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3059\u3067\u306B\u5F97\u3089\u308C\u305F\u8A3C\u62E0\u306F\u3001\u3053\u306E\u5B9F\u884C\u306E\u7D50\u679C\u3092\u5224\u65AD\u3059\u308B\u306E\u306B\u5341\u5206\u3067\u3059\u3002`:`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u3092 Testbot \u304C\u5229\u7528\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u306E\u6BB5\u968E\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3059\u3067\u306B\u5F97\u3089\u308C\u305F\u7D50\u679C\u306F\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306B\u6B8B\u3063\u3066\u3044\u307E\u3059\u3002\u30B3\u30FC\u30C9\u3084 Testbot \u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`},providerOutageHeadline:(t,e)=>`${t} \u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002Testbot \u306F ${e} \u56DE\u8A66\u884C\u3057\u307E\u3057\u305F\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002`,providerOutageActionStatusPage:t=>`${t} \u3067\u72B6\u6CC1\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30B5\u30FC\u30D3\u30B9\u304C\u5FA9\u65E7\u3057\u305F\u3089\u3001Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,providerRateLimitHeadline:t=>`${t} \u306E\u30EC\u30FC\u30C8\u5236\u9650\u306B\u3088\u308A\u5B9F\u884C\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F (HTTP 429)\u3002`,providerRateLimitAction:"\u5236\u9650\u304C\u89E3\u9664\u3055\u308C\u308B\u307E\u3067\u5F85\u3063\u3066\u304B\u3089\u3001Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u7E70\u308A\u8FD4\u3059\u5834\u5408\u306F\u3001\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C\u4F7F\u7528\u3059\u308B\u8A8D\u8A3C\u60C5\u5831\u306E\u30EC\u30FC\u30C8\u5236\u9650\u3092\u5F15\u304D\u4E0A\u3052\u308B\u304B\u3001\u540C\u6642\u306B\u5B9F\u884C\u3059\u308B PR \u306E\u6570\u3092\u6E1B\u3089\u3057\u3066\u304F\u3060\u3055\u3044\u3002",providerUsageLimitHeadline:t=>`${t} \u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5229\u7528\u4E0A\u9650\u306B\u9054\u3057\u307E\u3057\u305F\u3002`,providerUsageLimitAction:"\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E\u8A8D\u8A3C\u60C5\u5831\u306B\u7D10\u3065\u304F\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u5229\u7528\u4E0A\u9650\u3092\u5F15\u304D\u4E0A\u3052\u3066\u304B\u3089\u3001Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",providerAuthExpiredHeadline:t=>`\u5B9F\u884C\u4E2D\u306B\u3001Testbot \u304C ${t} \u3078\u63A5\u7D9A\u3059\u308B\u305F\u3081\u306E\u8A8D\u8A3C\u60C5\u5831\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u307E\u3057\u305F\u3002`,providerAuthExpiredAction:"\u8A8D\u8A3C\u60C5\u5831\u306E\u6709\u52B9\u671F\u9593\u306F\u56FA\u5B9A\u306E\u305F\u3081\u3001\u5B9F\u884C\u6642\u9593\u304C\u9577\u3044\u3068\u305D\u306E\u671F\u9593\u3092\u8D85\u3048\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u5B9F\u884C\u304C\u6709\u52B9\u671F\u9593\u3092\u5E38\u306B\u8D85\u3048\u308B\u5834\u5408\u306F\u3001\u30B8\u30E7\u30D6\u3054\u3068\u306B\u8A8D\u8A3C\u60C5\u5831\u3092\u767A\u884C\u3059\u308B\u304B\u3001\u5404\u30B8\u30E7\u30D6\u304C\u6709\u52B9\u671F\u9593\u5185\u306B\u53CE\u307E\u308B\u3088\u3046\u5B9F\u884C\u3092\u5206\u5272\u3057\u3066\u304F\u3060\u3055\u3044\u3002",providerTimeoutHeadline:t=>`Testbot \u306F\u5236\u9650\u6642\u9593 ${t} \u5206\u3092\u8D85\u3048\u305F\u305F\u3081\u505C\u6B62\u3055\u308C\u307E\u3057\u305F\u3002`,providerTimeoutAction:"\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u5B9F\u884C\u306B\u672C\u5F53\u306B\u6642\u9593\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u3001\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E `testbotTimeout` \u5165\u529B\u5024\u3092\u5927\u304D\u304F\u3057\u3066\u304F\u3060\u3055\u3044\u3002",staged:{testsSourcePullRequest:t=>`\u30BD\u30FC\u30B9\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8 ${t} \u306E\u30C6\u30B9\u30C8`,requestedByPerson:t=>`${t} \u3055\u3093\u306E\u4F9D\u983C\u3067\u5B9F\u884C`,requestedByPolicy:t=>`\u691C\u8A3C\u30DD\u30EA\u30B7\u30FC ${t} \u306B\u3088\u308A\u5B9F\u884C`,notTranslated:{"no-time":"> \u26A0\uFE0F \u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u82F1\u8A9E\u306E\u307E\u307E\u3067\u3059: \u7FFB\u8A33\u3059\u308B\u6642\u9593\u304C\u6B8B\u3063\u3066\u3044\u307E\u305B\u3093\u3067\u3057\u305F\u3002",failed:"> \u26A0\uFE0F \u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u82F1\u8A9E\u306E\u307E\u307E\u3067\u3059: \u7FFB\u8A33\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},noLiveApp:t=>`> \u26A0\uFE0F **\u3053\u306E\u5B9F\u884C\u3067\u306F\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\uFF08SUT\uFF09\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F** \u2014 \u4EE5\u4E0B\u306E ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u306F**\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093**\uFF08\u5B9F\u884C\u5BFE\u8C61\u306E\u30A2\u30D7\u30EA\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F\uFF09\u3002\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3057\u3001\u5408\u683C\u3059\u308B\u3053\u3068\uFF08\u304A\u3088\u3073\u518D\u73FE\u30C6\u30B9\u30C8\u304C\u610F\u56F3\u3069\u304A\u308A\u5931\u6557\u3059\u308B\u3053\u3068\uFF09\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,unitTestsInFile:(t,e,n)=>`**${t}**: ${n?`${n} \u306E`:""}\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8 ${e} \u4EF6`,addedToExistingFile:"\u65E2\u5B58\u306E\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306B\u8FFD\u52A0",testPackagesHeader:"### \u{1F4E6} \u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306E\u5B9F\u884C\u65B9\u6CD5",testPackageLine:(t,e)=>`\`${t}/\` \u306F Skyramp Testbot \u304C\u6240\u6709\u30FB\u4FDD\u5B88\u3059\u308B\u72EC\u7ACB\u3057\u305F\u30C6\u30B9\u30C8\u30D1\u30C3\u30B1\u30FC\u30B8\u3067\u3001\u72EC\u81EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3001\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\u3001\u30E9\u30F3\u30CA\u30FC\u8A2D\u5B9A\u3092\u6301\u3061\u307E\u3059\u3002\`${e}\` \u3067\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u5B9F\u884C\u3059\u308B\u306B\u306F\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092 CI \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,appManifestsUntouched:"\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u81EA\u8EAB\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3068\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\u306F\u5909\u66F4\u3057\u3066\u3044\u307E\u305B\u3093\u3002",dependencyChangesHeader:"### \u{1F4E6} \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u4F9D\u5B58\u95A2\u4FC2\u306E\u5909\u66F4",dependencyChangeLine:(t,e,n)=>`\`${e}\`\uFF08\u304A\u3088\u3073\u305D\u306E\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\uFF09\u306B \`${t}\` \u3092\u8FFD\u52A0${n?`: ${n}`:""}`,testMaintenanceHeader:"\u2705 \u30C6\u30B9\u30C8\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9",keptNot:"\u5909\u66F4\u305B\u305A\u7DAD\u6301 \u2014 \u898B\u9001\u3063\u305F\u64CD\u4F5C: ",declinedPlanned:"(\u4E88\u5B9A\u3057\u3066\u3044\u305F\u64CD\u4F5C\u3092\u898B\u9001\u308A: ",declinedMaintenanceHeader:"\u21A9\uFE0F \u898B\u9001\u3063\u305F\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9",existingEvidenceHeader:"\u2705 \u65E2\u5B58\u306E\u30A8\u30D3\u30C7\u30F3\u30B9",trustedCheckPassed:(t,e)=>`\u4FE1\u983C\u6E08\u307F\u306E CI \u30C1\u30A7\u30C3\u30AF ${t} \u304C${e?` ${e} \u3067`:""}\u5408\u683C\u3057\u3001\u6B21\u3092\u78BA\u8A8D\u3057\u307E\u3057\u305F:`,testResultsHeader:"\u{1F9EA} \u30C6\u30B9\u30C8\u7D50\u679C",resultsTableHeader:"| \u30C6\u30B9\u30C8 ID | \u30C6\u30B9\u30C8\u7A2E\u5225 | \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8 | \u30B9\u30C6\u30FC\u30BF\u30B9 | \u8A73\u7D30 |",unitResultsTableHeader:"| \u30C6\u30B9\u30C8 ID | \u30C6\u30B9\u30C8\u7A2E\u5225 | \u30C6\u30B9\u30C8\u5BFE\u8C61\u306E\u30B3\u30FC\u30C9 | \u30C6\u30B9\u30C8 | \u30B1\u30FC\u30B9\u6570 | \u30B9\u30C6\u30FC\u30BF\u30B9 | \u8A73\u7D30 |",casesPassed:(t,e,n)=>`${e} \u4EF6\u4E2D ${t} \u4EF6\u5408\u683C${n?`\u3001${n} \u4EF6\u30B9\u30AD\u30C3\u30D7`:""}`,behaviourCoverageHeader:"\u{1F517} \u632F\u308B\u821E\u3044\u306E\u30AB\u30D0\u30EC\u30C3\u30B8",coverageCaption:(t,e,n,r)=>`\uFF08\u751F\u6210 ${t} \xB7 \u5909\u66F4 ${e} \xB7 \u691C\u8A3C ${n} \xB7 \u5B9F\u884C ${r}\uFF09`,coverageTableHeader:"| \u632F\u308B\u821E\u3044 | \u30BD\u30FC\u30B9 | \u30C6\u30B9\u30C8 | \u30E1\u30F3\u30C6\u30CA\u30F3\u30B9 |",writtenNotRun:"\u4F5C\u6210\u6E08\u307F\u30FB\u672A\u5B9F\u884C",issuesFoundHeader:"\u26A0\uFE0F \u691C\u51FA\u3055\u308C\u305F\u554F\u984C",caveatsHeader:"### \u26A0\uFE0F \u3053\u306E\u5B9F\u884C\u3067\u78BA\u8A8D\u3067\u304D\u306A\u304B\u3063\u305F\u3053\u3068",commentHeader:"### Skyramp Testbot",timedOut:"> \u26A0\uFE0F \u5B9F\u884C\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F \u2014 \u4EE5\u4E0B\u306E\u7D50\u679C\u306F\u4E00\u90E8\u306E\u307F\u3067\u3059\u3002",stopReasons:{"pr-closed":"\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u30DE\u30FC\u30B8\u3055\u308C\u305A\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u307E\u3057\u305F",cancelled:"\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u305F\u304B\u3001\u30E9\u30F3\u30CA\u30FC\u304C\u505C\u6B62\u3057\u307E\u3057\u305F","attempt-cancelled":"Skyramp \u3067\u3053\u306E\u5B9F\u884C\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F","attempt-closed":"Skyramp \u304C\u3053\u306E\u5B9F\u884C\u3092\u7D42\u4E86\u3057\u307E\u3057\u305F"},maintenanceActions:{update:"\u66F4\u65B0",regenerate:"\u518D\u751F\u6210",delete:"\u524A\u9664",verify:"\u691C\u8A3C",updated:"\u66F4\u65B0",regenerated:"\u518D\u751F\u6210",deleted:"\u524A\u9664",verified:"\u691C\u8A3C"},publishFailures:{push:"\u30D7\u30C3\u30B7\u30E5\u306B\u5931\u6557",auth:"\u8A8D\u8A3C\u30A8\u30E9\u30FC",conflict:"\u7AF6\u5408",hook:"\u30B3\u30DF\u30C3\u30C8\u30D5\u30C3\u30AF\u304C\u5931\u6557",unknown:"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"},commitHook:t=>t?`${t} \u30D5\u30C3\u30AF`:"\u30B3\u30DF\u30C3\u30C8\u30D5\u30C3\u30AF",commitRefusedByHook:(t,e)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${t}\u304C\u751F\u6210\u3055\u308C\u305F\u30C6\u30B9\u30C8\u306E\u30B3\u30DF\u30C3\u30C8\u3092\u62D2\u5426\u3057\u305F\u305F\u3081\u3001Testbot PR \u306F\u4F5C\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30C3\u30AF\u306E\u30A8\u30E9\u30FC: \`${e}\`\u3002`,commitHookCouldNotRun:(t,e)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${t}\u3092\u5B9F\u884C\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001Testbot PR \u306F\u4F5C\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30C3\u30AF\u304C\u547C\u3073\u51FA\u3059\u30B3\u30DE\u30F3\u30C9\u304C\u30E9\u30F3\u30CA\u30FC\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30D5\u30C3\u30AF\u306E\u30A8\u30E9\u30FC: \`${e}\`\u3002`,stoppedEarly:(t,e)=>`> \u26A0\uFE0F \u5B9F\u884C\u304C\u9014\u4E2D\u3067\u505C\u6B62\u3057\u307E\u3057\u305F \u2014 ${t}\u3002\u4EE5\u4E0B\u306E\u7D50\u679C\u306F\u4E00\u90E8\u306E\u307F\u3067\u3059\u3002${e}`,viewInSkyramp:t=>` [Skyramp \u3067\u8868\u793A](${t})`,descriptionCut:(t,e,n)=>`_\u2026 \u6B8B\u308A\u306F\u7701\u7565\u3057\u307E\u3057\u305F${e===void 0?"\uFF08\u30C6\u30B9\u30C8\u7D50\u679C\u3092\u542B\u3080\uFF09":e?`\uFF08\u30C6\u30B9\u30C8\u7D50\u679C ${e} \u4EF6\u3092\u542B\u3080\uFF09`:""}\u3002Azure DevOps \u306E\u8AAC\u660E\u306F ${t} \u6587\u5B57\u307E\u3067\u3067\u3059\u3002${n?` [\u5B8C\u5168\u306A\u30EC\u30DD\u30FC\u30C8](${n})`:""}_`,testsReplaced:(t,e,n)=>[e?`Skyramp Testbot \u304C\u3053\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30C6\u30B9\u30C8\u3092[\u3053\u306E\u5B9F\u884C](${t})\u306E\u30C6\u30B9\u30C8\uFF08\u30B3\u30DF\u30C3\u30C8 \`${e}\`\uFF09\u306B\u7F6E\u304D\u63DB\u3048\u307E\u3057\u305F\u3002`:`Skyramp Testbot \u304C\u3053\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30C6\u30B9\u30C8\u3092[\u3053\u306E\u5B9F\u884C](${t})\u306E\u30C6\u30B9\u30C8\u306B\u7F6E\u304D\u63DB\u3048\u307E\u3057\u305F\u3002`,n?`[\u4EE5\u524D\u306E\u5B9F\u884C](${n})\u306E\u30C6\u30B9\u30C8\u306F\u7F6E\u304D\u63DB\u3048\u6E08\u307F\u3067\u3059\u3002`:"\u4EE5\u524D\u306E\u5B9F\u884C\u304C\u3053\u3053\u306B\u66F8\u3044\u305F\u30C6\u30B9\u30C8\u306F\u7F6E\u304D\u63DB\u3048\u6E08\u307F\u3067\u3059\u3002"].join(""),setupRunEnds:{finished:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002Skyramp \u304C\u7D50\u679C\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u3059\u3002",failed:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002",timedOut:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u304C\u6642\u9593\u5207\u308C\u306B\u306A\u308A\u307E\u3057\u305F\u3002",cancelledInSkyramp:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u306F Skyramp \u3067\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F\u3002",stoppedToResume:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u3092\u505C\u6B62\u3057\u307E\u3057\u305F\u3002Skyramp \u3067\u518D\u958B\u3067\u304D\u307E\u3059\u3002"},appUnreachable:t=>`Skyramp\uFF08${t}\uFF09\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002`,couldNotStart:t=>`Skyramp Testbot \u3092\u958B\u59CB\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${t}`,assembledAfterFailedChecks:t=>`> \u26A0\uFE0F \u4F5C\u6210\u30B9\u30C6\u30C3\u30D7\u304C\u30C1\u30A7\u30C3\u30AF\u306B\u5408\u683C\u3057\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u81EA\u52D5\u3067\u7D44\u307F\u7ACB\u3066\u3089\u308C\u307E\u3057\u305F\u3002${t} \u4EF6\u306E\u30C1\u30A7\u30C3\u30AF\u304C\u672A\u9054\u6210\u3067\u3059 \u2014 \u8A73\u7D30\u306F\u5B9F\u884C\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,testbotPrLine:(t,e,n)=>`Testbot PR${t?`\uFF08${t}\uFF09`:""}: [${e}](${n})`,viewRun:t=>`_[\u5B9F\u884C\u3092\u8868\u793A](${t})_`,testsPrNotOpened:(t,e)=>`\u30C6\u30B9\u30C8 PR \u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${t}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30D6\u30E9\u30F3\u30C1 \`${e}\` \u306B\u30D7\u30C3\u30B7\u30E5\u3055\u308C\u3066\u3044\u307E\u3059\u3002`,testsNotDelivered:t=>`\u30C6\u30B9\u30C8\u3092\u914D\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${t}`,testsNotPushed:(t,e)=>`\u30C6\u30B9\u30C8\u3092\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${t}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30ED\u30FC\u30AB\u30EB\u30D6\u30E9\u30F3\u30C1 \`${e}\` \u306B\u6B8B\u3063\u3066\u3044\u307E\u3059\u3002`,testsPrRetargeted:t=>`\u30C6\u30B9\u30C8\u306E\u751F\u6210\u4E2D\u306B\u958B\u767A PR \u304C\u30DE\u30FC\u30B8\u3055\u308C\u307E\u3057\u305F \u2014 \u30C6\u30B9\u30C8 PR \u306F\u4EE3\u308F\u308A\u306B\u30D9\u30FC\u30B9\u30D6\u30E9\u30F3\u30C1${t?`\uFF08\`${t}\`\uFF09`:""}\u3092\u5BFE\u8C61\u306B\u3057\u3066\u3044\u307E\u3059\u3002`,testsPrUnchanged:"\u3053\u306E\u30D7\u30C3\u30B7\u30E5\u3067\u306F\u65B0\u3057\u3044\u30C6\u30B9\u30C8\u306E\u5909\u66F4\u306F\u4E0D\u8981\u3067\u3057\u305F\u3002\u4EE5\u4E0B\u306E\u30C6\u30B9\u30C8 PR \u306F\u4EE5\u524D\u306E\u5B9F\u884C\u306E\u3082\u306E\u3067\u3001\u305D\u306E\u307E\u307E\u306B\u3057\u3066\u3044\u307E\u3059\u3002",committedNoPr:t=>`\u30C6\u30B9\u30C8\u306F\u30B3\u30DF\u30C3\u30C8\u3055\u308C\u307E\u3057\u305F\u304C\u3001PR \u306F\u4F5C\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F: ${t}\u3002`,testsNotProposed:t=>`\u30C6\u30B9\u30C8\u306F PR \u3068\u3057\u3066\u63D0\u6848\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F: ${t}\u3002`}};var gd=(n=>(n.En="en",n.Ja="ja",n))(gd||{}),Rj={en:fd,ja:qk},xj="en";function Em(t){let e=t.trim().toLowerCase();if(e==="")return"en";let n=Object.values(gd);return n.includes(e)?e:(Pe(`Invalid language '${t}'. Supported: ${n.join(", ")}. Falling back to 'en'.`),"en")}function fn(){return Rj[xj]}var md=(c=>(c.ProviderOutage="provider_outage",c.ProviderRateLimit="provider_rate_limit",c.ProviderUsageLimit="provider_usage_limit",c.ProviderAuthExpired="provider_auth_expired",c.Timeout="timeout",c.NoReport="no_report",c.RenderFailure="render_failure",c))(md||{});(e=>{function t(n,r){switch(n){case"provider_outage":return{headline:fn().providerOutageHeadline(r.provider.name,r.maxRetries),action:fn().providerOutageActionStatusPage(r.provider.statusUrl)};case"provider_rate_limit":return{headline:fn().providerRateLimitHeadline(r.provider.name),action:fn().providerRateLimitAction};case"provider_usage_limit":return{headline:fn().providerUsageLimitHeadline(r.provider.name),action:fn().providerUsageLimitAction};case"provider_auth_expired":return{headline:fn().providerAuthExpiredHeadline(r.provider.name),action:fn().providerAuthExpiredAction};case"timeout":return{headline:fn().providerTimeoutHeadline(r.timeoutMinutes),action:fn().providerTimeoutAction};case"no_report":case"render_failure":return}}e.buildNotice=t})(md||={});var Cm=(n=>(n.SameBranch="same-branch",n.SeparateBranch="separate-branch",n))(Cm||{});var Yk=(n=>(n.Sonnet="sonnet",n.Opus="opus",n))(Yk||{}),Tj="opus";function Im(t){return Object.values(Yk).includes(t)}function Jk(t){let e=(t??"").trim();if(e==="")return Tj;let n=e.toLowerCase();return Im(n)?n:e}var yd=(i=>(i.Low="low",i.Medium="medium",i.High="high",i.XHigh="xhigh",i.Max="max",i))(yd||{}),Ed="high";function Wk(t){return Object.values(yd).includes(t)}var zk=5;function Dj(t){let e=t.split(/\r?\n/).map(n=>n.trim()).filter(Boolean);if(e.length>zk)throw new Error(`relatedRepoPaths supports at most ${zk} entries (got ${e.length}); the cap limits how much cross-repo context is loaded to avoid overflowing Testbot's context window.`);return e}function Nj(t){let e=t.trim().toLowerCase();return e===""?"separate-branch":Object.values(Cm).includes(e)?e:(Pe(`Invalid generatedTestsMode '${t}'. Falling back to 'separate-branch'.`),"separate-branch")}function Fj(t){let e=(t??"").trim();if(e!==""){if(/^(?:[1-9]|10)$/.test(e))return Number(e);Pe(`Ignoring perTestMaxFixAttempts="${t}": expected a whole number from 1 to 10; the Skyramp MCP default applies`)}}function Mj(t){let e=(t??"").trim().toLowerCase();return e===""?Ed:Wk(e)?e:(Pe(`Ignoring effort="${t}": expected one of ${Object.values(yd).join(", ")}; using "${Ed}"`),Ed)}function Kk(){let t=Jk(he("model"));return Im(t)||Pe(`model '${t}' is not a tested alias (sonnet, opus); passing it to the agent verbatim as a raw model id.`),{skyrampLicenseFile:he("skyrampLicenseFile"),cursorApiKey:he("cursorApiKey"),copilotApiKey:he("copilotApiKey"),anthropicApiKey:he("anthropicApiKey"),useBedrock:Ts("useBedrock"),awsRegion:he("awsRegion"),useLocalAuth:he("useLocalAuth").toLowerCase()==="true",model:t,effort:Mj(he("effort")),targetSetupCommand:he("targetSetupCommand"),authTokenCommand:he("authTokenCommand"),uiCredentials:he("uiCredentials"),targetTeardownCommand:he("targetTeardownCommand"),skipTargetTeardown:Ts("skipTargetTeardown"),skyrampExecutorVersion:he("skyrampExecutorVersion"),skyrampMcpVersion:he("skyrampMcpVersion"),skyrampMcpSource:he("skyrampMcpSource"),skyrampMcpGithubToken:he("skyrampMcpGithubToken"),skyrampMcpGithubRef:he("skyrampMcpGithubRef"),nodeVersion:he("nodeVersion"),skipTargetSetup:Ts("skipTargetSetup"),targetReadyCheckCommand:he("targetReadyCheckCommand"),targetReadyCheckTimeout:(()=>{let n=parseInt(he("targetReadyCheckTimeout"),10)||1800;return n<1?(Pe(`targetReadyCheckTimeout must be at least 1 second, got ${n}. Using 1s.`),1):n})(),targetReadyCheckInterval:(()=>{let n=parseInt(he("targetReadyCheckInterval"),10),r=isNaN(n)?30:n;return r<1?(Pe(`targetReadyCheckInterval must be at least 1 second, got ${r}. Using 1s.`),1):r})(),targetReadyCheckDiagnosticsCommand:(()=>{let n=he("targetReadyCheckDiagnosticsCommand");return n.trim().toLowerCase()==="none"?"":n})(),workingDirectory:he("workingDirectory"),autoCommit:Ts("autoCommit"),commitMessage:he("commitMessage"),generatedTestsMode:Nj(he("generatedTestsMode")),postPrComment:Ts("postPrComment"),testExecutionTimeout:parseInt(he("testExecutionTimeout"),10)||300,maxRecommendations:(()=>{let n=parseInt(he("maxRecommendations"),10);return isNaN(n)?void 0:Math.max(0,n)})(),maxGenerate:(()=>{let n=parseInt(he("maxGenerate"),10);return isNaN(n)?void 0:Math.max(0,n)})(),perTestMaxFixAttempts:Fj(he("perTestMaxFixAttempts")),testbotMaxRetries:parseInt(he("testbotMaxRetries"),10)||3,testbotRetryDelay:parseInt(he("testbotRetryDelay"),10)||10,testbotTimeout:parseInt(he("testbotTimeout"),10)||60,targetSetupRetries:parseInt(he("targetSetupRetries"),10)||3,targetSetupRetryDelay:parseInt(he("targetSetupRetryDelay"),10)||10,authTokenRetries:(()=>{let n=parseInt(he("authTokenRetries"),10);return Number.isFinite(n)&&n>=1?n:6})(),authTokenRetryDelay:(()=>{let n=parseInt(he("authTokenRetryDelay"),10);return Number.isFinite(n)&&n>=0?n:10})(),reportCollapsed:Ts("reportCollapsed"),language:Em(he("language")),enableDebug:Ts("enableDebug"),testRepoPath:he("testRepoPath")||void 0,relatedRepoPaths:Dj(he("relatedRepoPaths")),allowedAuthors:he("allowedAuthors").split(/\r?\n/).map(n=>n.trim()).filter(Boolean)}}var _j={useBedrock:"false",skipTargetTeardown:"false",skyrampMcpSource:"npm",skyrampMcpGithubRef:"main",nodeVersion:"lts/*",skipTargetSetup:"false",targetReadyCheckTimeout:"1800",targetReadyCheckInterval:"30",targetReadyCheckDiagnosticsCommand:`docker ps -a --format 'table {{.Names}} {{.Status}} {{.Ports}}' && docker ps -a --format '{{.Names}}' | while read name; do [ -n "$name" ] && echo "--- logs $name (last 30) ---" && docker logs --tail 30 "$name"; done`,workingDirectory:".",autoCommit:"true",commitMessage:"Skyramp Testbot: test maintenance suggestions",generatedTestsMode:"separate-branch",pipeline:"staged",postPrComment:"true",testbotMaxRetries:"3",testbotRetryDelay:"10",testExecutionTimeout:"300",testbotTimeout:"60",targetSetupRetries:"3",targetSetupRetryDelay:"10",authTokenRetries:"6",authTokenRetryDelay:"10",reportCollapsed:"true",language:"en",enableDebug:"true",sutSetupMode:"none"};function Zk(t=process.env){for(let[e,n]of Object.entries(_j)){let r=`INPUT_${e.replace(/ /g,"_").toUpperCase()}`;(t[r]??"").trim()===""&&(t[r]=n)}}Ft();var Ox=Re(require("path"));var Ra=require("fs"),ts=Re(require("path"),1),jR=require("child_process"),qR=require("util");function Uj(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qt={},Cd={},Us={},Xk;function pu(){if(Xk)return Us;Xk=1;function t(a){return typeof a>"u"||a===null}function e(a){return typeof a=="object"&&a!==null}function n(a){return Array.isArray(a)?a:t(a)?[]:[a]}function r(a,c){if(c){let l=Object.keys(c);for(let A=0,p=l.length;A<p;A+=1){let h=l[A];a[h]=c[h]}}return a}function s(a,c){let l="";for(let A=0;A<c;A+=1)l+=a;return l}function i(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return Us.isNothing=t,Us.isObject=e,Us.toArray=n,Us.repeat=s,Us.isNegativeZero=i,Us.extend=r,Us}var Bm,eR;function hu(){if(eR)return Bm;eR=1;function t(n,r){let s="",i=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(s+='in "'+n.mark.name+'" '),s+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(s+=`
51
+ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function vk(t){process.exitCode=lm.Failure,gH(t)}function ak(t){ri("debug",{},t)}function gH(t,e={}){ri("error",zu(e),t instanceof Error?t.toString():t)}function Pe(t,e={}){ri("warning",zu(e),t instanceof Error?t.toString():t)}function cu(t,e={}){ri("notice",zu(e),t instanceof Error?t.toString():t)}function Qn(t){process.stdout.write(t+Sk.EOL)}function rd(t){Ep("group",t)}function sd(){Ep("endgroup")}function Ds(t){return process.env[`STATE_${t}`]||""}function kk(t){return fH(this,void 0,void 0,function*(){return yield KA.getIDToken(t)})}var Sk,fH,lm,Ft=Rt(()=>{BE();wE();Ku();Sk=Re(require("os"),1);ok();tm();tm();lk();bk();fH=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function c(p){try{A(r.next(p))}catch(h){a(h)}}function l(p){try{A(r.throw(p))}catch(h){a(h)}}function A(p){p.done?i(p.value):s(p.value).then(c,l)}A((r=r.apply(t,e||[])).next())})};(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(lm||(lm={}))});var m9={};mp(m9,{post:()=>aD});module.exports=pD(m9);Ft();var oD=Re(require("path"));Ft();Ft();var Am;(function(t){t.Pass="Pass",t.Fail="Fail",t.Error="Error",t.Skipped="Skipped",t.Unknown="Unknown"})(Am||(Am={}));var Rk;(function(t){t.High="high",t.Medium="medium",t.Low="low"})(Rk||(Rk={}));var xk;(function(t){t.Skyramp="skyramp",t.External="external"})(xk||(xk={}));var dm;(function(t){t.Update="UPDATE",t.Regenerate="REGENERATE",t.Delete="DELETE",t.Verify="VERIFY",t.Ignore="IGNORE"})(dm||(dm={}));var Tk;(function(t){t.Small="Small",t.Medium="Medium",t.Large="Large"})(Tk||(Tk={}));var U={};mp(U,{BRAND:()=>VH,DIRTY:()=>Ni,EMPTY_PATH:()=>CH,INVALID:()=>se,NEVER:()=>Sj,OK:()=>wt,ParseStatus:()=>mt,Schema:()=>Ee,ZodAny:()=>Ms,ZodArray:()=>es,ZodBigInt:()=>Mi,ZodBoolean:()=>_i,ZodBranded:()=>lu,ZodCatch:()=>Yi,ZodDate:()=>Ui,ZodDefault:()=>qi,ZodDiscriminatedUnion:()=>ad,ZodEffects:()=>vn,ZodEnum:()=>Hi,ZodError:()=>Yt,ZodFirstPartyTypeKind:()=>ue,ZodFunction:()=>ud,ZodIntersection:()=>$i,ZodIssueCode:()=>P,ZodLazy:()=>Vi,ZodLiteral:()=>Gi,ZodMap:()=>ba,ZodNaN:()=>va,ZodNativeEnum:()=>ji,ZodNever:()=>Zn,ZodNull:()=>Pi,ZodNullable:()=>Er,ZodNumber:()=>Fi,ZodObject:()=>Jt,ZodOptional:()=>bn,ZodParsedType:()=>W,ZodPipeline:()=>Au,ZodPromise:()=>_s,ZodReadonly:()=>Ji,ZodRecord:()=>cd,ZodSchema:()=>Ee,ZodSet:()=>Sa,ZodString:()=>Fs,ZodSymbol:()=>wa,ZodTransformer:()=>vn,ZodTuple:()=>yr,ZodType:()=>Ee,ZodUndefined:()=>Li,ZodUnion:()=>Oi,ZodUnknown:()=>Xr,ZodVoid:()=>Qa,addIssueToContext:()=>Y,any:()=>KH,array:()=>tj,bigint:()=>qH,boolean:()=>Vk,coerce:()=>bj,custom:()=>Pk,date:()=>YH,datetimeRegex:()=>Uk,defaultErrorMap:()=>Kr,discriminatedUnion:()=>ij,effect:()=>mj,enum:()=>hj,function:()=>Aj,getErrorMap:()=>Ca,getParsedType:()=>mr,instanceof:()=>HH,intersection:()=>oj,isAborted:()=>id,isAsync:()=>Ia,isDirty:()=>od,isValid:()=>Ns,late:()=>GH,lazy:()=>dj,literal:()=>pj,makeIssue:()=>uu,map:()=>uj,nan:()=>jH,nativeEnum:()=>fj,never:()=>XH,null:()=>zH,nullable:()=>Ej,number:()=>$k,object:()=>nj,objectUtil:()=>pm,oboolean:()=>Qj,onumber:()=>wj,optional:()=>yj,ostring:()=>Bj,pipeline:()=>Ij,preprocess:()=>Cj,promise:()=>gj,quotelessJson:()=>mH,record:()=>cj,set:()=>lj,setErrorMap:()=>EH,strictObject:()=>rj,string:()=>Ok,symbol:()=>JH,transformer:()=>mj,tuple:()=>aj,undefined:()=>WH,union:()=>sj,unknown:()=>ZH,util:()=>we,void:()=>ej});var we;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{let i={};for(let a of s)i[a]=a;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),a={};for(let c of i)a[c]=s[c];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(let a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(we||(we={}));var pm;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(pm||(pm={}));var W=we.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),mr=t=>{switch(typeof t){case"undefined":return W.undefined;case"string":return W.string;case"number":return Number.isNaN(t)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(t)?W.array:t===null?W.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?W.promise:typeof Map<"u"&&t instanceof Map?W.map:typeof Set<"u"&&t instanceof Set?W.set:typeof Date<"u"&&t instanceof Date?W.date:W.object;default:return W.unknown}};var P=we.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),mH=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Yt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,l=0;for(;l<a.path.length;){let A=a.path[l];l===a.path.length-1?(c[A]=c[A]||{_errors:[]},c[A]._errors.push(n(a))):c[A]=c[A]||{_errors:[]},c=c[A],l++}}};return s(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,we.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Yt.create=t=>new Yt(t);var yH=(t,e)=>{let n;switch(t.code){case P.invalid_type:t.received===W.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case P.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,we.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:n=`Unrecognized key(s) in object: ${we.joinValues(t.keys,", ")}`;break;case P.invalid_union:n="Invalid input";break;case P.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${we.joinValues(t.options)}`;break;case P.invalid_enum_value:n=`Invalid enum value. Expected ${we.joinValues(t.options)}, received '${t.received}'`;break;case P.invalid_arguments:n="Invalid function arguments";break;case P.invalid_return_type:n="Invalid function return type";break;case P.invalid_date:n="Invalid date";break;case P.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:we.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case P.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case P.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case P.custom:n="Invalid input";break;case P.invalid_intersection_types:n="Intersection results could not be merged";break;case P.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case P.not_finite:n="Number must be finite";break;default:n=e.defaultError,we.assertNever(t)}return{message:n}},Kr=yH;var Dk=Kr;function EH(t){Dk=t}function Ca(){return Dk}var uu=t=>{let{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let c="",l=r.filter(A=>!!A).slice().reverse();for(let A of l)c=A(a,{data:e,defaultError:c}).message;return{...s,path:i,message:c}},CH=[];function Y(t,e){let n=Ca(),r=uu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Kr?void 0:Kr].filter(s=>!!s)});t.common.issues.push(r)}var mt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let s of n){if(s.status==="aborted")return se;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let s of n){let i=await s.key,a=await s.value;r.push({key:i,value:a})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let s of n){let{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return se;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:e.value,value:r}}},se=Object.freeze({status:"aborted"}),Ni=t=>({status:"dirty",value:t}),wt=t=>({status:"valid",value:t}),id=t=>t.status==="aborted",od=t=>t.status==="dirty",Ns=t=>t.status==="valid",Ia=t=>typeof Promise<"u"&&t instanceof Promise;var K;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(K||(K={}));var Sn=class{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Nk=(t,e)=>{if(Ns(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Yt(t.common.issues);return this._error=n,this._error}}};function ge(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,c)=>{let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??c.defaultError}:typeof c.data>"u"?{message:l??r??c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:l??n??c.defaultError}},description:s}}var Ee=class{get description(){return this._def.description}_getType(e){return mr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:mr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mt,ctx:{common:e.parent.common,data:e.data,parsedType:mr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Ia(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mr(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Nk(r,s)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mr(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return Ns(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Ns(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mr(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Ia(s)?s:Promise.resolve(s));return Nk(r,i)}refine(e,n){let r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{let a=e(s),c=()=>i.addIssue({code:P.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new vn({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return bn.create(this,this._def)}nullable(){return Er.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return es.create(this)}promise(){return _s.create(this,this._def)}or(e){return Oi.create([this,e],this._def)}and(e){return $i.create(this,e,this._def)}transform(e){return new vn({...ge(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new qi({...ge(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new lu({typeName:ue.ZodBranded,type:this,...ge(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Yi({...ge(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Au.create(this,e)}readonly(){return Ji.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},IH=/^c[^\s-]{8,}$/i,BH=/^[0-9a-z]+$/,wH=/^[0-9A-HJKMNP-TV-Z]{26}$/i,QH=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bH=/^[a-z0-9_-]{21}$/i,SH=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vH=/^[-+]?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)?)??$/,kH=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hm,xH=/^(?:(?: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])$/,TH=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,DH=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,NH=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,FH=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,MH=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Mk="((\\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])))",_H=new RegExp(`^${Mk}$`);function _k(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function UH(t){return new RegExp(`^${_k(t)}$`)}function Uk(t){let e=`${Mk}T${_k(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function LH(t,e){return!!((e==="v4"||!e)&&xH.test(t)||(e==="v6"||!e)&&DH.test(t))}function PH(t,e){if(!SH.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function OH(t,e){return!!((e==="v4"||!e)&&TH.test(t)||(e==="v6"||!e)&&NH.test(t))}var Fs=class t extends Ee{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==W.string){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_type,expected:W.string,received:i.parsedType}),se}let r=new mt,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,c=e.data.length<i.value;(a||c)&&(s=this._getOrReturnCtx(e,s),a?Y(s,{code:P.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&Y(s,{code:P.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")kH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"email",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")hm||(hm=new RegExp(RH,"u")),hm.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"emoji",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")QH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"uuid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")bH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"nanoid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")IH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"cuid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")BH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"cuid2",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")wH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"ulid",code:P.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),Y(s,{validation:"url",code:P.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"regex",code:P.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Uk(i).test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?_H.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?UH(i).test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{code:P.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?vH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"duration",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?LH(e.data,i.version)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"ip",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?PH(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"jwt",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?OH(e.data,i.version)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"cidr",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?FH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"base64",code:P.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?MH.test(e.data)||(s=this._getOrReturnCtx(e,s),Y(s,{validation:"base64url",code:P.invalid_string,message:i.message}),r.dirty()):we.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:P.invalid_string,...K.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...K.errToObj(e)})}url(e){return this._addCheck({kind:"url",...K.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...K.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...K.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...K.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...K.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...K.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...K.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...K.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...K.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...K.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...K.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...K.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...K.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...K.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...K.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...K.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...K.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...K.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...K.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...K.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...K.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...K.errToObj(n)})}nonempty(e){return this.min(1,K.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Fs.create=t=>new Fs({checks:[],typeName:ue.ZodString,coerce:t?.coerce??!1,...ge(t)});function $H(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}var Fi=class t extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==W.number){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_type,expected:W.number,received:i.parsedType}),se}let r,s=new mt;for(let i of this._def.checks)i.kind==="int"?we.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Y(r,{code:P.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?$H(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Y(r,{code:P.not_finite,message:i.message}),s.dirty()):we.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:K.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:K.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:K.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:K.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&we.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};Fi.create=t=>new Fi({checks:[],typeName:ue.ZodNumber,coerce:t?.coerce||!1,...ge(t)});var Mi=class t extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==W.bigint)return this._getInvalidInput(e);let r,s=new mt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Y(r,{code:P.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):we.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return Y(n,{code:P.invalid_type,expected:W.bigint,received:n.parsedType}),se}gte(e,n){return this.setLimit("min",e,!0,K.toString(n))}gt(e,n){return this.setLimit("min",e,!1,K.toString(n))}lte(e,n){return this.setLimit("max",e,!0,K.toString(n))}lt(e,n){return this.setLimit("max",e,!1,K.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:K.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:K.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:K.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Mi.create=t=>new Mi({checks:[],typeName:ue.ZodBigInt,coerce:t?.coerce??!1,...ge(t)});var _i=class extends Ee{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==W.boolean){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.boolean,received:r.parsedType}),se}return wt(e.data)}};_i.create=t=>new _i({typeName:ue.ZodBoolean,coerce:t?.coerce||!1,...ge(t)});var Ui=class t extends Ee{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==W.date){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_type,expected:W.date,received:i.parsedType}),se}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return Y(i,{code:P.invalid_date}),se}let r=new mt,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),Y(s,{code:P.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):we.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:K.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:K.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};Ui.create=t=>new Ui({checks:[],coerce:t?.coerce||!1,typeName:ue.ZodDate,...ge(t)});var wa=class extends Ee{_parse(e){if(this._getType(e)!==W.symbol){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.symbol,received:r.parsedType}),se}return wt(e.data)}};wa.create=t=>new wa({typeName:ue.ZodSymbol,...ge(t)});var Li=class extends Ee{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.undefined,received:r.parsedType}),se}return wt(e.data)}};Li.create=t=>new Li({typeName:ue.ZodUndefined,...ge(t)});var Pi=class extends Ee{_parse(e){if(this._getType(e)!==W.null){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.null,received:r.parsedType}),se}return wt(e.data)}};Pi.create=t=>new Pi({typeName:ue.ZodNull,...ge(t)});var Ms=class extends Ee{constructor(){super(...arguments),this._any=!0}_parse(e){return wt(e.data)}};Ms.create=t=>new Ms({typeName:ue.ZodAny,...ge(t)});var Xr=class extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wt(e.data)}};Xr.create=t=>new Xr({typeName:ue.ZodUnknown,...ge(t)});var Zn=class extends Ee{_parse(e){let n=this._getOrReturnCtx(e);return Y(n,{code:P.invalid_type,expected:W.never,received:n.parsedType}),se}};Zn.create=t=>new Zn({typeName:ue.ZodNever,...ge(t)});var Qa=class extends Ee{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.void,received:r.parsedType}),se}return wt(e.data)}};Qa.create=t=>new Qa({typeName:ue.ZodVoid,...ge(t)});var es=class t extends Ee{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==W.array)return Y(n,{code:P.invalid_type,expected:W.array,received:n.parsedType}),se;if(s.exactLength!==null){let a=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(a||c)&&(Y(n,{code:a?P.too_big:P.too_small,minimum:c?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Y(n,{code:P.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Y(n,{code:P.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>s.type._parseAsync(new Sn(n,a,n.path,c)))).then(a=>mt.mergeArray(r,a));let i=[...n.data].map((a,c)=>s.type._parseSync(new Sn(n,a,n.path,c)));return mt.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:K.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:K.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:K.toString(n)}})}nonempty(e){return this.min(1,e)}};es.create=(t,e)=>new es({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...ge(e)});function Ba(t){if(t instanceof Jt){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=bn.create(Ba(r))}return new Jt({...t._def,shape:()=>e})}else return t instanceof es?new es({...t._def,type:Ba(t.element)}):t instanceof bn?bn.create(Ba(t.unwrap())):t instanceof Er?Er.create(Ba(t.unwrap())):t instanceof yr?yr.create(t.items.map(e=>Ba(e))):t}var Jt=class t extends Ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=we.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==W.object){let A=this._getOrReturnCtx(e);return Y(A,{code:P.invalid_type,expected:W.object,received:A.parsedType}),se}let{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(let A in s.data)a.includes(A)||c.push(A);let l=[];for(let A of a){let p=i[A],h=s.data[A];l.push({key:{status:"valid",value:A},value:p._parse(new Sn(s,h,s.path,A)),alwaysSet:A in s.data})}if(this._def.catchall instanceof Zn){let A=this._def.unknownKeys;if(A==="passthrough")for(let p of c)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(A==="strict")c.length>0&&(Y(s,{code:P.unrecognized_keys,keys:c}),r.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let A=this._def.catchall;for(let p of c){let h=s.data[p];l.push({key:{status:"valid",value:p},value:A._parse(new Sn(s,h,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let A=[];for(let p of l){let h=await p.key,g=await p.value;A.push({key:h,value:g,alwaysSet:p.alwaysSet})}return A}).then(A=>mt.mergeObjectSync(r,A)):mt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return K.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:K.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ue.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of we.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of we.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Ba(this)}partial(e){let n={};for(let r of we.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of we.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof bn;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return Lk(we.objectKeys(this.shape))}};Jt.create=(t,e)=>new Jt({shape:()=>t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});Jt.strictCreate=(t,e)=>new Jt({shape:()=>t,unknownKeys:"strict",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});Jt.lazycreate=(t,e)=>new Jt({shape:t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});var Oi=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Yt(c.ctx.common.issues));return Y(n,{code:P.invalid_union,unionErrors:a}),se}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let i,a=[];for(let l of r){let A={...n,common:{...n.common,issues:[]},parent:null},p=l._parseSync({data:n.data,path:n.path,parent:A});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:A}),A.common.issues.length&&a.push(A.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(l=>new Yt(l));return Y(n,{code:P.invalid_union,unionErrors:c}),se}}get options(){return this._def.options}};Oi.create=(t,e)=>new Oi({options:t,typeName:ue.ZodUnion,...ge(e)});var Zr=t=>t instanceof Vi?Zr(t.schema):t instanceof vn?Zr(t.innerType()):t instanceof Gi?[t.value]:t instanceof Hi?t.options:t instanceof ji?we.objectValues(t.enum):t instanceof qi?Zr(t._def.innerType):t instanceof Li?[void 0]:t instanceof Pi?[null]:t instanceof bn?[void 0,...Zr(t.unwrap())]:t instanceof Er?[null,...Zr(t.unwrap())]:t instanceof lu||t instanceof Ji?Zr(t.unwrap()):t instanceof Yi?Zr(t._def.innerType):[],ad=class t extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.object)return Y(n,{code:P.invalid_type,expected:W.object,received:n.parsedType}),se;let r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Y(n,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let s=new Map;for(let i of n){let a=Zr(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of a){if(s.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new t({typeName:ue.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...ge(r)})}};function fm(t,e){let n=mr(t),r=mr(e);if(t===e)return{valid:!0,data:t};if(n===W.object&&r===W.object){let s=we.objectKeys(e),i=we.objectKeys(t).filter(c=>s.indexOf(c)!==-1),a={...t,...e};for(let c of i){let l=fm(t[c],e[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}else if(n===W.array&&r===W.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let a=t[i],c=e[i],l=fm(a,c);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===W.date&&r===W.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var $i=class extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=(i,a)=>{if(id(i)||id(a))return se;let c=fm(i.value,a.value);return c.valid?((od(i)||od(a))&&n.dirty(),{status:n.value,value:c.data}):(Y(r,{code:P.invalid_intersection_types}),se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};$i.create=(t,e,n)=>new $i({left:t,right:e,typeName:ue.ZodIntersection,...ge(n)});var yr=class t extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.array)return Y(r,{code:P.invalid_type,expected:W.array,received:r.parsedType}),se;if(r.data.length<this._def.items.length)return Y(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),se;!this._def.rest&&r.data.length>this._def.items.length&&(Y(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new Sn(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>mt.mergeArray(n,a)):mt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};yr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:t,typeName:ue.ZodTuple,rest:null,...ge(e)})};var cd=class t extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.object)return Y(r,{code:P.invalid_type,expected:W.object,received:r.parsedType}),se;let s=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)s.push({key:i._parse(new Sn(r,c,r.path,c)),value:a._parse(new Sn(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?mt.mergeObjectAsync(n,s):mt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ee?new t({keyType:e,valueType:n,typeName:ue.ZodRecord,...ge(r)}):new t({keyType:Fs.create(),valueType:e,typeName:ue.ZodRecord,...ge(n)})}},ba=class extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.map)return Y(r,{code:P.invalid_type,expected:W.map,received:r.parsedType}),se;let s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,l],A)=>({key:s._parse(new Sn(r,c,r.path,[A,"key"])),value:i._parse(new Sn(r,l,r.path,[A,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of a){let A=await l.key,p=await l.value;if(A.status==="aborted"||p.status==="aborted")return se;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let l of a){let A=l.key,p=l.value;if(A.status==="aborted"||p.status==="aborted")return se;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}}}};ba.create=(t,e,n)=>new ba({valueType:e,keyType:t,typeName:ue.ZodMap,...ge(n)});var Sa=class t extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.set)return Y(r,{code:P.invalid_type,expected:W.set,received:r.parsedType}),se;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(Y(r,{code:P.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(Y(r,{code:P.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let i=this._def.valueType;function a(l){let A=new Set;for(let p of l){if(p.status==="aborted")return se;p.status==="dirty"&&n.dirty(),A.add(p.value)}return{status:n.value,value:A}}let c=[...r.data.values()].map((l,A)=>i._parse(new Sn(r,l,r.path,A)));return r.common.async?Promise.all(c).then(l=>a(l)):a(c)}min(e,n){return new t({...this._def,minSize:{value:e,message:K.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:K.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};Sa.create=(t,e)=>new Sa({valueType:t,minSize:null,maxSize:null,typeName:ue.ZodSet,...ge(e)});var ud=class t extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.function)return Y(n,{code:P.invalid_type,expected:W.function,received:n.parsedType}),se;function r(c,l){return uu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ca(),Kr].filter(A=>!!A),issueData:{code:P.invalid_arguments,argumentsError:l}})}function s(c,l){return uu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ca(),Kr].filter(A=>!!A),issueData:{code:P.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof _s){let c=this;return wt(async function(...l){let A=new Yt([]),p=await c._def.args.parseAsync(l,i).catch(C=>{throw A.addIssue(r(l,C)),A}),h=await Reflect.apply(a,this,p);return await c._def.returns._def.type.parseAsync(h,i).catch(C=>{throw A.addIssue(s(h,C)),A})})}else{let c=this;return wt(function(...l){let A=c._def.args.safeParse(l,i);if(!A.success)throw new Yt([r(l,A.error)]);let p=Reflect.apply(a,this,A.data),h=c._def.returns.safeParse(p,i);if(!h.success)throw new Yt([s(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:yr.create(e).rest(Xr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||yr.create([]).rest(Xr.create()),returns:n||Xr.create(),typeName:ue.ZodFunction,...ge(r)})}},Vi=class extends Ee{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Vi.create=(t,e)=>new Vi({getter:t,typeName:ue.ZodLazy,...ge(e)});var Gi=class extends Ee{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return Y(n,{received:n.data,code:P.invalid_literal,expected:this._def.value}),se}return{status:"valid",value:e.data}}get value(){return this._def.value}};Gi.create=(t,e)=>new Gi({value:t,typeName:ue.ZodLiteral,...ge(e)});function Lk(t,e){return new Hi({values:t,typeName:ue.ZodEnum,...ge(e)})}var Hi=class t extends Ee{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return Y(n,{expected:we.joinValues(r),received:n.parsedType,code:P.invalid_type}),se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return Y(n,{received:n.data,code:P.invalid_enum_value,options:r}),se}return wt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};Hi.create=Lk;var ji=class extends Ee{_parse(e){let n=we.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==W.string&&r.parsedType!==W.number){let s=we.objectValues(n);return Y(r,{expected:we.joinValues(s),received:r.parsedType,code:P.invalid_type}),se}if(this._cache||(this._cache=new Set(we.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=we.objectValues(n);return Y(r,{received:r.data,code:P.invalid_enum_value,options:s}),se}return wt(e.data)}get enum(){return this._def.values}};ji.create=(t,e)=>new ji({values:t,typeName:ue.ZodNativeEnum,...ge(e)});var _s=class extends Ee{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.promise&&n.common.async===!1)return Y(n,{code:P.invalid_type,expected:W.promise,received:n.parsedType}),se;let r=n.parsedType===W.promise?n.data:Promise.resolve(n.data);return wt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}};_s.create=(t,e)=>new _s({type:t,typeName:ue.ZodPromise,...ge(e)});var vn=class extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{Y(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async c=>{if(n.value==="aborted")return se;let l=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return l.status==="aborted"?se:l.status==="dirty"?Ni(l.value):n.value==="dirty"?Ni(l.value):l});{if(n.value==="aborted")return se;let c=this._def.schema._parseSync({data:a,path:r.path,parent:r});return c.status==="aborted"?se:c.status==="dirty"?Ni(c.value):n.value==="dirty"?Ni(c.value):c}}if(s.type==="refinement"){let a=c=>{let l=s.refinement(c,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?se:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?se:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ns(a))return se;let c=s.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Ns(a)?Promise.resolve(s.transform(a.value,i)).then(c=>({status:n.value,value:c})):se);we.assertNever(s)}};vn.create=(t,e,n)=>new vn({schema:t,typeName:ue.ZodEffects,effect:e,...ge(n)});vn.createWithPreprocess=(t,e,n)=>new vn({schema:e,effect:{type:"preprocess",transform:t},typeName:ue.ZodEffects,...ge(n)});var bn=class extends Ee{_parse(e){return this._getType(e)===W.undefined?wt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};bn.create=(t,e)=>new bn({innerType:t,typeName:ue.ZodOptional,...ge(e)});var Er=class extends Ee{_parse(e){return this._getType(e)===W.null?wt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Er.create=(t,e)=>new Er({innerType:t,typeName:ue.ZodNullable,...ge(e)});var qi=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===W.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};qi.create=(t,e)=>new qi({innerType:t,typeName:ue.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});var Yi=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ia(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Yi.create=(t,e)=>new Yi({innerType:t,typeName:ue.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});var va=class extends Ee{_parse(e){if(this._getType(e)!==W.nan){let r=this._getOrReturnCtx(e);return Y(r,{code:P.invalid_type,expected:W.nan,received:r.parsedType}),se}return{status:"valid",value:e.data}}};va.create=t=>new va({typeName:ue.ZodNaN,...ge(t)});var VH=Symbol("zod_brand"),lu=class extends Ee{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},Au=class t extends Ee{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?se:i.status==="dirty"?(n.dirty(),Ni(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?se:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:ue.ZodPipeline})}},Ji=class extends Ee{_parse(e){let n=this._def.innerType._parse(e),r=s=>(Ns(s)&&(s.value=Object.freeze(s.value)),s);return Ia(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};Ji.create=(t,e)=>new Ji({innerType:t,typeName:ue.ZodReadonly,...ge(e)});function Fk(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Pk(t,e={},n){return t?Ms.create().superRefine((r,s)=>{let i=t(r);if(i instanceof Promise)return i.then(a=>{if(!a){let c=Fk(e,r),l=c.fatal??n??!0;s.addIssue({code:"custom",...c,fatal:l})}});if(!i){let a=Fk(e,r),c=a.fatal??n??!0;s.addIssue({code:"custom",...a,fatal:c})}}):Ms.create()}var GH={object:Jt.lazycreate},ue;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ue||(ue={}));var HH=(t,e={message:`Input not instance of ${t.name}`})=>Pk(n=>n instanceof t,e),Ok=Fs.create,$k=Fi.create,jH=va.create,qH=Mi.create,Vk=_i.create,YH=Ui.create,JH=wa.create,WH=Li.create,zH=Pi.create,KH=Ms.create,ZH=Xr.create,XH=Zn.create,ej=Qa.create,tj=es.create,nj=Jt.create,rj=Jt.strictCreate,sj=Oi.create,ij=ad.create,oj=$i.create,aj=yr.create,cj=cd.create,uj=ba.create,lj=Sa.create,Aj=ud.create,dj=Vi.create,pj=Gi.create,hj=Hi.create,fj=ji.create,gj=_s.create,mj=vn.create,yj=bn.create,Ej=Er.create,Cj=vn.createWithPreprocess,Ij=Au.create,Bj=()=>Ok().optional(),wj=()=>$k().optional(),Qj=()=>Vk().optional(),bj={string:(t=>Fs.create({...t,coerce:!0})),number:(t=>Fi.create({...t,coerce:!0})),boolean:(t=>_i.create({...t,coerce:!0})),bigint:(t=>Mi.create({...t,coerce:!0})),date:(t=>Ui.create({...t,coerce:!0}))};var Sj=se;var ka=["playwright","pytest","robot","junit","vitest","jest","mocha","go","rspec","jasmine"];var Gk="skyramp_session_storage.json";var gm;(function(t){t.PYTHON="python",t.TYPESCRIPT="typescript",t.JAVASCRIPT="javascript",t.JAVA="java"})(gm||(gm={}));var Cr;(function(t){t.SMOKE="smoke",t.FUZZ="fuzz",t.CONTRACT="contract",t.LOAD="load",t.INTEGRATION="integration",t.E2E="e2e",t.UI="ui",t.UNIT="unit",t.UNKNOWN="unknown"})(Cr||(Cr={}));var xZ=[Cr.CONTRACT,Cr.INTEGRATION,Cr.E2E,Cr.UI];var Hk;(function(t){t.Rest="rest",t.Grpc="grpc",t.Kafka="kafka"})(Hk||(Hk={}));var ld;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS"})(ld||(ld={}));var du;(function(t){t.LOCAL="local",t.DOCKER="docker",t.KUBERNETES="k8s"})(du||(du={}));var vj=U.nativeEnum(du),mm=U.preprocess(t=>t==="kubernetes"?du.KUBERNETES:t,vj);var kj=U.object({language:U.nativeEnum(gm).describe("Programming language for the generated test (default: python). Must be one of: python, typescript, javascript, java"),framework:U.string().describe(`Testing framework to use. Supported: ${ka.join(", ")} (e.g. pytest for python, playwright/vitest/jest for js/ts, junit for java).`)}),jk=U.object({...kj.shape,deployDashboard:U.boolean().default(!1).describe("Whether to deploy the Skyramp dashboard for test monitoring"),runtime:mm.default(du.LOCAL).describe("Runtime environment (local, docker, or k8s; accepts kubernetes as an alias)"),dockerNetwork:U.string().default("").describe("Docker network name to use for containerized testing"),dockerWorkerPort:U.number().int().min(0).max(65535).default(0).describe("Port number for the Docker worker service"),k8sNamespace:U.string().default("").describe("Kubernetes namespace for deployment"),k8sConfig:U.string().default("").describe("Path to Kubernetes configuration file"),k8sContext:U.string().default("").describe("Kubernetes context to use"),authHeader:U.string().default("").describe("Name of the HTTP header that carries the auth credential. Common values: 'Authorization' (Bearer/Basic/Token auth), 'X-Api-Key', 'X-Auth-Token', 'Cookie'. Other accepted values: 'X-Access-Token', 'X-OAuth-Token', 'X-Client-ID', 'X-Client-Secret', 'X-Client-Token', 'X-GitHub-Token', 'X-Firebase-AppCheck', 'Proxy-Authorization', 'Fastly-Key', 'Heroku-Bearer'. Pass empty string to document an unauthenticated endpoint in the generated test's assertions. This is the header KEY name (e.g., 'X-Api-Key'), NOT the token value."),authScheme:U.string().default("").describe("Only for Authorization headers. The literal prefix before the token (e.g., 'Bearer' produces 'Authorization: Bearer <token>'). Common values: 'Bearer', 'Basic', 'Token'. If the API sends raw tokens with no prefix (e.g., 'Authorization: eyJ...'), leave empty or omit. Ignored when authHeader is not 'Authorization'."),insecure:U.boolean().default(!1).describe("Whether to allow insecure SSL connections for HTTPS endpoints"),output:U.string().optional().refine(t=>!t||t===""?!0:[".py",".ts",".js",".java"].some(n=>t.endsWith(n)),{message:"Output file must have one of these extensions: .py, .ts, .js, .java"}).describe("Name of the output test file. For Playwright, name the file the way the repository names its tests: read the test files already in outputDir and match their spelling. Use *.test.ts where they use it, *.spec.ts otherwise (e.g. contract_math_add.spec.ts, fuzz_orders.test.ts). For other frameworks (pytest, junit), standard extensions are fine (.py, .java). Optional \u2014 when omitted, Skyramp generates a default name."),outputDir:U.string().describe("MUST be absolute path to the directory where test files will be generated. If not provided, the CURRENT WORKING DIRECTORY will be used WITHOUT ANY SUBDIRECTORIES"),force:U.boolean().default(!0).describe("Whether to overwrite existing files in the output directory"),mockPort:U.number().int().min(0).max(65535).default(0).describe("Port number for the mock server"),optionalFields:U.boolean().default(!1).describe("Whether to include optional fields in the generated test/mock"),prompt:U.string().describe("The prompt user provided to generate the test")}),TZ=U.object({playwrightInput:U.string().describe("MUST be absolute path to the playwright input file like /path/to/playwright-ui-test.zip and MUST be a zip file captured using start_trace_collection tool"),playwrightStoragePath:U.string().optional().describe("Path to LOAD existing playwright session storage for trace collection with playwright enabled. THE PATH MUST BE AN ABSOLUTE PATH LIKE /Users/<path>/<filename>.json"),playwrightSaveStoragePath:U.string().optional().describe(`Path to SAVE Playwright session storage after trace collection. Omit this argument to use the default \u2014 \`${Gk}\` resolved against the active outputDir, which produces an absolute path like '/abs/outputDir/${Gk}'. SAVES authentication state (cookies, localStorage, sessionStorage) when the browser closes. To LOAD existing auth state, use playwrightStoragePath instead. Can be a bare filename (joined with outputDir), a relative path, or an absolute path.`),playwrightViewportSize:U.union([U.enum(["","hd","full-hd","2k"]),U.string().regex(/^\d+,\d+$/,"Custom viewport must be 'WIDTH,HEIGHT' format (e.g., '1920,1080')")]).default("").describe("Viewport size for playwright browser. THE VALUE MUST BE IN THE FORMAT ['', 'hd', 'full-hd', '2k', 'x,y' e.g. '1920,1080' for 1920x1080 resolution]. DEFAULT VALUE IS ''. If set to '', the browser will use its default viewport size."),browser:U.enum(["chromium","firefox","webkit"]).default("chromium").describe("Browser to use for Playwright trace collection. Supported browsers: 'chromium' (default), 'firefox', 'webkit'. Choose based on your testing requirements and target browser compatibility."),device:U.string().default("").describe("Device to emulate for Playwright trace collection. Supported devices include: 'iPhone 13', 'iPhone 13 Pro', 'Pixel 5', 'Galaxy S9+', 'iPad Pro', etc. Leave empty for no device emulation (desktop). Use specific device names for mobile/tablet testing.")}),DZ=U.object({trace:U.string().describe("Absolute path to the trace file in JSON format (e.g., /path/to/trace.json). Must use .json extension only. Do not use .jsonl files."),include:U.array(U.string()).default([]).describe("List of endpoints or patterns to include in test generation."),exclude:U.array(U.string()).default([]).describe("List of endpoints or patterns to exclude from test generation."),...jk.shape}),NZ={endpointURL:U.string().describe("The full endpoint URL to test including base URL and path (e.g., https://demoshop.skyramp.dev/api/v1/products). MUST include both the base URL and the endpoint path \u2014 never just the base URL alone."),method:U.union([U.nativeEnum(ld),U.literal("")]).default("").describe('HTTP method to use. DEFAULT: Use empty string ("") to test ALL available methods from OpenAPI schema (recommended). Only specify a specific method (GET, POST, PUT, DELETE, etc.) if user explicitly requests testing a single method only.'),apiSchema:U.string().default("").describe("MUST be absolute path(/path/to/openapi.json) to the OpenAPI/Swagger schema file or a URL to the OpenAPI/Swagger schema file(e.g. https://demoshop.skyramp.dev/openapi.json). DO NOT TRY TO ASSUME THE OPENAPI SCHEMA IF NOT PROVIDED. NOTE TO AI ASSISTANTS: You do not need to read the contents of this file - simply pass the file path as the backend will read and process it."),pathParams:U.string().default("").describe("Comma-separated path parameter values in the form 'key=value,key2=value2' (e.g., 'id=1,name=John'). DO NOT populate this field unless the user has explicitly provided path parameter values. For contract tests, parent path parameters are automatically handled via the parent provisioning mechanism (parentRequestData) \u2014 do NOT invent or guess values for those here. Only supply this field if the user explicitly states specific path parameter values to use."),queryParams:U.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for URL query parameters. Workspace-configured api.defaultQueryParams (if set) are merged in automatically, with any api.queryParamOverrides entry whose pathPattern matches this endpoint layered on top \u2014 no need to repeat them here. An explicit value for the same key here overrides both."),formParams:U.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for form data parameters"),requestData:U.string().default("").refine(t=>{if(!t||t===""||t.startsWith("@"))return!0;try{return JSON.parse(t),!0}catch{}let e=t.trim();return!!(e.startsWith("---")||/^\w[\w\s]*:/.test(e)||e.startsWith("-"))},{message:"requestData must be valid JSON, YAML, or an absolute file path prefixed with '@'. Received what appears to be plain text. Provide the actual request body as a JSON object."}).describe("Sample request body data, provided either as an inline JSON/YAML string or as an absolute file path prefixed with '@' (e.g., @/absolute/path/to/file). MUST be valid JSON or YAML \u2014 do NOT pass natural language descriptions."),responseStatusCode:U.string().default("").refine(t=>!t||/^[1-5]\d{2}$/.test(t),{message:"Must be a valid HTTP status code in 100-599 (e.g., '200', '404') or empty string"}).describe("Expected HTTP response status code (e.g., '200', '201', '404'). DO NOT ASSUME STATUS CODE IF NOT PROVIDED"),...jk.shape},FZ=U.object({codeReuse:U.boolean().default(!1).describe("Reuse existing code in the generated test \u2014 consolidates helper functions shared with sibling Skyramp-generated tests into a SkyrampUtils file; for TS/JS Playwright tests with POM reuse enabled it instead refactors the test to use the repo's existing Page Object Model"),modularizeCode:U.boolean().default(!1).describe("Whether to modularize the code")}),MZ=[Cr.INTEGRATION,Cr.CONTRACT,Cr.UI];var Ad;(function(t){t.Bug="bug",t.Lint="lint",t.Type="type",t.Config="config"})(Ad||(Ad={}));var dd;(function(t){t.NotMapped="not-mapped",t.DemotedByVerify="demoted-by-verify"})(dd||(dd={}));var pd;(function(t){t.Passed="passed",t.Failed="failed",t.SkippedNoPom="skipped-no-pom"})(pd||(pd={}));var ym;(function(t){t.Passed="passed",t.Failed="failed",t.NoUtilsFile="no-utils-file"})(ym||(ym={}));Ft();var hd=t=>`${t} POM call${t===1?"":"s"}`,fd={testRecommendationsImplementedHeader:t=>`\u{1F4A1} Test Recommendations Implemented (${t})`,testTypeCellLabels:{},statusLabels:{},severityLabels:{},reuse:{label:"POM reuse",noPomLayer:"skipped \u2014 no page-object layer detected for this test",reusedAndVerified:t=>`${hd(t)} reused and verified`,reusedThenVerified:(t,e)=>`${hd(t)} reused, ${e} of them verified`,reused:t=>`${hd(t)} reused`,verified:t=>`${hd(t)} verified`,unresolved:t=>`${t} not resolvable to POM source (informational, not declines)`,candidates:t=>`${t} candidate POM file${t===1?"":"s"} detected`,verificationPassed:"verification passed",verificationFailed:"\u26A0\uFE0F verification did not pass",keptInline:t=>`kept inline: ${t}`,gate:{"not-mapped":"not mapped","demoted-by-verify":"demoted by verification"}},testMaintenanceHeader:t=>`\u2705 Test Maintenance (${t})`,maintenanceTableHeader:"| Test Type | Endpoint | File | Change | Before | After |",testResultsHeader:t=>`\u{1F9EA} Test Results (${t})`,columnVideo:"Video",videoDownloadLink:t=>`[\u{1F4F9} download](${t})`,videosArtifactFallback:t=>`\u{1F4F9} Recorded UI test videos: [download from run artifacts](${t})`,issuesFoundHeader:t=>`\u26A0\uFE0F Issues Found (${t})`,configErrorsHeader:"\u2699\uFE0F Configuration Errors",nextStepsHeader:"### \u{1F4A1} Next Steps",caveatsHeader:"### \u26A0\uFE0F What this run could not prove",rows:{passed:t=>t?"passed against the running app":"passed",notRun:t=>t?"not run against a live app this run":"not run this run",failedBug:t=>t?"failed against the running app":"failed",executedOf:(t,e)=>e?` and executed ${t} of them against the running app.`:` and executed ${t} of them.`,noneExecuted:t=>t?"; none were executed against a live app this run.":"; none were executed this run."},caveats:{deployFailed:"The app could not be started, so nothing here was checked against a running system.",changeBrokeBringup:"This change appears to have broken the app's start-up: it could not run with the PR applied, so nothing was tested against it.",bringupFailed:"The app could not be started this run, for a reason outside this PR \u2014 nothing was tested against a live app.",testsNotExecuted:"No test was run against a live app this run \u2014 an un-run suite is not evidence the change works.",recipeDrift:"The recorded way to start the app was out of date and had to be corrected before it would come up.",recipeNotSaved:"The repository had no saved way to start the app, so Testbot worked it out from the repository.",mockedDependency:t=>`${t} was mocked rather than really deployed \u2014 a green run against it is not proof.`,finalizeNotReady:t=>`The tests are not ready to merge as they stand${t?`: ${t}`:"."}`,ciNotCovered:"No CI workflow runs these tests, so they will not execute on future pull requests.",ciNotCoveredBecause:t=>`The repo's CI will not run some of these tests on future pull requests: ${t}`,sutNotRequired:"No app was started: validation triage found no deployed behavior this change needs validated.",lintNotCovered:t=>`The repo's linter does not check ${t} \u2014 a style or type issue there would not be caught automatically.`,analysisUnverified:t=>`Part of the change analysis could not be verified (${t} unresolved check${t===1?"":"s"}); the tests were planned treating those claims as unconfirmed.`,unitTestsNotRun:t=>`Testbot could not run the unit tests it selected, so no unit result here is its own re-run: ${t}`,downstreamNotChecked:t=>`Not run: checks of other parts of the app that this change might affect. The change does not alter that behavior itself, so they are not needed to validate it. ${t}`,testsCouldNotRunHere:(t,e)=>`${t} ${t===1?"test exists":"tests exist"} in this change, but this environment could not run ${t===1?"it":"them"}, so ${t===1?"it has":"they have"} no result here (not skipped): ${e}`,modelProviderDenied:(t,e=!1)=>e?`${t}, the model provider, refused a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${t}, the model provider, refused Testbot's calls, so the run stopped before it finished. Access was denied because of credentials, permissions, or a usage limit. For Skyramp-managed provider access, contact Skyramp support before running again; if you manage the provider account, ask its administrator to resolve access or usage limits. No changes to your code are needed.`,modelProviderUnavailable:(t,e=!1)=>e?`${t}, the model provider, was unavailable for a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${t}, the model provider, was unavailable to Testbot, so this stage could not finish. Any results already obtained remain in this report. No changes to your code or Testbot setup are needed. Please try again later.`},providerOutageHeadline:(t,e)=>`Testbot could not reach ${t} \u2014 it tried ${e} times without success.`,providerOutageActionStatusPage:t=>`Check ${t}. Once the service is healthy, re-run this workflow from its run page in the Actions tab.`,providerRateLimitHeadline:t=>`Testbot was rate-limited by ${t} (HTTP 429).`,providerRateLimitAction:"Wait for the limit to reset, then re-run this workflow from its run page in the Actions tab. If this repeats, raise the rate limit on the credential this workflow uses or run Testbot on fewer pull requests at once.",providerUsageLimitHeadline:t=>`The account behind ${t} has reached its usage limit.`,providerUsageLimitAction:"Raise the spend or token cap on the account behind this workflow's credential, then re-run this workflow from its run page in the Actions tab.",providerAuthExpiredHeadline:t=>`The credential Testbot uses to reach ${t} expired while the run was still working.`,providerAuthExpiredAction:"The credential is issued with a fixed lifetime, so a longer run can outlive it. Re-run this workflow from its run page in the Actions tab. If runs on this repository regularly last longer than that lifetime, issue the credential per job or split the run so each job stays inside it.",providerTimeoutHeadline:t=>`Testbot ran past its ${t}-minute time limit and was stopped.`,providerTimeoutAction:"Raise the `testbotTimeout` input on the workflow if runs on this repository legitimately need longer.",staged:{testsSourcePullRequest:t=>`Tests for source pull request ${t}`,requestedByPerson:t=>`Requested by ${t}`,requestedByPolicy:t=>`Started by the Validation Policy ${t}`,notTranslated:{"no-time":"> \u26A0\uFE0F This report is in English: no time was left to translate it.",failed:"> \u26A0\uFE0F This report is in English: the translation failed."},noLiveApp:t=>`> \u26A0\uFE0F **No live app (SUT) was available this run** \u2014 the ${t} test(s) below were **not executed** (there was no app to run them against). Run them against a running app to confirm they pass (and that any repro test fails as intended).`,unitTestsInFile:(t,e,n)=>`**${t}**: ${e} unit test${e===1?"":"s"}${n?` for ${n}`:""}`,addedToExistingFile:"added to an existing test file",testPackagesHeader:"### \u{1F4E6} Running these tests",testPackageLine:(t,e)=>`\`${t}/\` is a self-contained test package Skyramp Testbot owns and maintains, with its own manifest, lockfile and runner config. Run it with \`${e}\`; to run it on every pull request, add that one command to CI.`,appManifestsUntouched:"The application's own manifests and lockfiles were not changed.",dependencyChangesHeader:"### \u{1F4E6} Changes to the application's dependencies",dependencyChangeLine:(t,e,n)=>`Added \`${t}\` to \`${e}\` (and its lockfile)${n?`: ${n}`:""}`,testMaintenanceHeader:"\u2705 Test Maintenance",keptNot:"kept, not ",declinedPlanned:"(declined the planned ",declinedMaintenanceHeader:"\u21A9\uFE0F Declined Maintenance",existingEvidenceHeader:"\u2705 Existing Evidence",trustedCheckPassed:(t,e)=>`Trusted CI check ${t} passed${e?` on ${e}`:""}, establishing:`,testResultsHeader:"\u{1F9EA} Test Results",resultsTableHeader:"| Test ID | Test Type | Endpoint | Status | Details |",unitResultsTableHeader:"| Test ID | Test Type | Code under test | Test | Cases | Status | Details |",casesPassed:(t,e,n)=>`${t}/${e} passed${n?`, ${n} skipped`:""}`,behaviourCoverageHeader:"\u{1F517} Behaviour Coverage",coverageCaption:(t,e,n,r)=>` (${t} generated \xB7 ${e} modified \xB7 ${n} verified \xB7 ${r} executed)`,coverageTableHeader:"| Behaviour | Source | Tested By | Maintained By |",writtenNotRun:"written, not run",issuesFoundHeader:"\u26A0\uFE0F Issues Found",caveatsHeader:"### \u26A0\uFE0F What This Run Could Not Prove",commentHeader:"### Skyramp Testbot",timedOut:"> \u26A0\uFE0F Run timed out \u2014 the results below are partial.",stopReasons:{},publishFailures:{},commitHook:t=>t?`${t} hook`:"commit hook",commitRefusedByHook:(t,e)=>`Your repository's ${t} rejected the generated-test commit, so no Testbot PR was created. Hook error: \`${e}\`.`,commitHookCouldNotRun:(t,e)=>`Your repository's ${t} could not run, so no Testbot PR was created: a command it calls is not installed on the runner. Hook error: \`${e}\`.`,maintenanceActions:{},stoppedEarly:(t,e)=>`> \u26A0\uFE0F Run stopped early \u2014 ${t}. The results below are partial.${e}`,viewInSkyramp:t=>` [View in Skyramp](${t})`,descriptionCut:(t,e,n)=>`_\u2026 The rest is left out${e===void 0?", with more test results":e?`, with ${e} more test result${e===1?"":"s"}`:""}: Azure DevOps takes at most ${t} characters.${n?` [Full report](${n})`:""}_`,testsReplaced:(t,e,n)=>[e?`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${t}), commit \`${e}\`.`:`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${t}).`,n?`The tests of [the earlier run](${n}) are superseded.`:"The tests an earlier run wrote here are superseded."].join(" "),setupRunEnds:{finished:"Setup run finished. Skyramp is checking the result.",failed:"Setup run failed.",timedOut:"Setup run ran out of time.",cancelledInSkyramp:"Setup run was cancelled in Skyramp.",stoppedToResume:"Setup run stopped. Resume it in Skyramp."},appUnreachable:t=>`Unable to contact the mothership ${t}. Please try again later.`,couldNotStart:t=>`Skyramp Testbot could not start: ${t}`,assembledAfterFailedChecks:t=>`> \u26A0\uFE0F This report was assembled automatically after the write-up step failed its checks; ${t} check(s) remain unmet \u2014 see the run log for details.`,testbotPrLine:(t,e,n)=>`Testbot PR${t?` (${t})`:""} : [${e}](${n})`,viewRun:t=>`_[View run](${t})_`,testsPrNotOpened:(t,e)=>`The tests PR could not be opened (${t}); the tests were pushed to branch \`${e}\`.`,testsNotDelivered:t=>`The tests could not be delivered: ${t}`,testsNotPushed:(t,e)=>`The tests could not be pushed (${t}); they remain on the local branch \`${e}\`.`,testsPrRetargeted:t=>`The dev PR merged while tests were being generated \u2014 the tests PR targets its base branch${t?` (\`${t}\`)`:""} instead.`,testsPrUnchanged:"This push required no new test changes; the tests PR below is from an earlier run and was left as is.",committedNoPr:t=>`The tests were committed but no PR was opened: ${t}.`,testsNotProposed:t=>`The tests were not proposed in a pull request: ${t}.`}};var qk={testRecommendationsImplementedHeader:t=>`\u{1F4A1} \u5B9F\u88C5\u3057\u305F\u30C6\u30B9\u30C8\u63A8\u5968\uFF08${t}\u4EF6\uFF09`,testTypeCellLabels:{smoke:"\u30B9\u30E2\u30FC\u30AF",fuzz:"\u30D5\u30A1\u30BA",contract:"\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8",load:"\u8CA0\u8377",integration:"\u7D71\u5408",e2e:"E2E",ui:"UI",unit:"\u30E6\u30CB\u30C3\u30C8"},statusLabels:{Pass:"\u5408\u683C",Fail:"\u4E0D\u5408\u683C",Error:"\u30A8\u30E9\u30FC",Skipped:"\u30B9\u30AD\u30C3\u30D7"},severityLabels:{critical:"\u91CD\u5927",high:"\u9AD8",medium:"\u4E2D",low:"\u4F4E"},reuse:{label:"POM \u518D\u5229\u7528",noPomLayer:"\u30B9\u30AD\u30C3\u30D7 \u2014 \u3053\u306E\u30C6\u30B9\u30C8\u306B\u518D\u5229\u7528\u3067\u304D\u308B\u30DA\u30FC\u30B8\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u5C64\u306F\u691C\u51FA\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",reusedAndVerified:t=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u518D\u5229\u7528\u30FB\u691C\u8A3C\u6E08\u307F`,reusedThenVerified:(t,e)=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u518D\u5229\u7528\uFF08\u3046\u3061 ${e} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F\uFF09`,reused:t=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u518D\u5229\u7528`,verified:t=>`POM \u547C\u3073\u51FA\u3057 ${t} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F`,unresolved:t=>`${t} \u4EF6\u306F POM \u30BD\u30FC\u30B9\u307E\u3067\u89E3\u6C7A\u3067\u304D\u305A\uFF08\u53C2\u8003\u60C5\u5831\u3067\u3042\u308A\u3001\u9664\u5916\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF09`,candidates:t=>`\u5019\u88DC\u3068\u306A\u308B POM \u30D5\u30A1\u30A4\u30EB ${t} \u4EF6\u3092\u691C\u51FA`,verificationPassed:"\u691C\u8A3C\u306B\u5408\u683C",verificationFailed:"\u26A0\uFE0F \u691C\u8A3C\u306B\u5408\u683C\u3057\u307E\u305B\u3093\u3067\u3057\u305F",keptInline:t=>`\u30A4\u30F3\u30E9\u30A4\u30F3\u306E\u307E\u307E: ${t}`,gate:{"not-mapped":"\u30DE\u30C3\u30D4\u30F3\u30B0\u5BFE\u8C61\u5916","demoted-by-verify":"\u691C\u8A3C\u3067\u5DEE\u3057\u623B\u3057"}},testMaintenanceHeader:t=>`\u2705 \u30C6\u30B9\u30C8\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\uFF08${t}\u4EF6\uFF09`,maintenanceTableHeader:"| \u30C6\u30B9\u30C8\u7A2E\u5225 | \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8 | \u30D5\u30A1\u30A4\u30EB | \u5909\u66F4\u5185\u5BB9 | \u5909\u66F4\u524D | \u5909\u66F4\u5F8C |",testResultsHeader:t=>`\u{1F9EA} \u30C6\u30B9\u30C8\u7D50\u679C\uFF08${t}\u4EF6\uFF09`,columnVideo:"\u30D3\u30C7\u30AA",videoDownloadLink:t=>`[\u{1F4F9} \u30C0\u30A6\u30F3\u30ED\u30FC\u30C9](${t})`,videosArtifactFallback:t=>`\u{1F4F9} \u9332\u753B\u3055\u308C\u305F UI \u30C6\u30B9\u30C8\u30D3\u30C7\u30AA: [\u5B9F\u884C\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u304B\u3089\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9](${t})`,issuesFoundHeader:t=>`\u26A0\uFE0F \u691C\u51FA\u3055\u308C\u305F\u554F\u984C\uFF08${t}\u4EF6\uFF09`,configErrorsHeader:"\u2699\uFE0F \u8A2D\u5B9A\u30A8\u30E9\u30FC",nextStepsHeader:"### \u{1F4A1} \u6B21\u306E\u30B9\u30C6\u30C3\u30D7",caveatsHeader:"### \u26A0\uFE0F \u3053\u306E\u5B9F\u884C\u3067\u78BA\u8A8D\u3067\u304D\u306A\u304B\u3063\u305F\u3053\u3068",rows:{passed:t=>t?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u6210\u529F\u3057\u307E\u3057\u305F":"\u6210\u529F\u3057\u307E\u3057\u305F",notRun:t=>t?"\u3053\u306E\u5B9F\u884C\u3067\u306F\u30E9\u30A4\u30D6\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F":"\u3053\u306E\u5B9F\u884C\u3067\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",failedBug:t=>t?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5931\u6557\u3057\u307E\u3057\u305F":"\u5931\u6557\u3057\u307E\u3057\u305F",executedOf:(t,e)=>e?`\u3001\u305D\u306E\u3046\u3061 ${t} \u4EF6\u3092\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3057\u307E\u3057\u305F\u3002`:`\u3001\u305D\u306E\u3046\u3061 ${t} \u4EF6\u3092\u5B9F\u884C\u3057\u307E\u3057\u305F\u3002`,noneExecuted:t=>t?"\u3002\u3053\u306E\u5B9F\u884C\u3067\u306F\u30E9\u30A4\u30D6\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3055\u308C\u305F\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002":"\u3002\u3053\u306E\u5B9F\u884C\u3067\u306F\u5B9F\u884C\u3055\u308C\u305F\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002"},caveats:{deployFailed:"\u30A2\u30D7\u30EA\u3092\u8D77\u52D5\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u3053\u306B\u793A\u3059\u5185\u5BB9\u306F\u7A3C\u50CD\u4E2D\u306E\u30B7\u30B9\u30C6\u30E0\u306B\u5BFE\u3057\u3066\u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",changeBrokeBringup:"\u3053\u306E\u5909\u66F4\u306B\u3088\u308A\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u304C\u58CA\u308C\u305F\u3068\u601D\u308F\u308C\u307E\u3059\u3002PR \u3092\u9069\u7528\u3057\u305F\u72B6\u614B\u3067\u8D77\u52D5\u3067\u304D\u305A\u3001\u30C6\u30B9\u30C8\u306F\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",bringupFailed:"\u3053\u306E PR \u3068\u306F\u7121\u95A2\u4FC2\u306E\u7406\u7531\u3067\u30A2\u30D7\u30EA\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3059\u308B\u30C6\u30B9\u30C8\u306F\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",testsNotExecuted:"\u3053\u306E\u5B9F\u884C\u3067\u306F\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u30C6\u30B9\u30C8\u304C\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u672A\u5B9F\u884C\u306E\u30C6\u30B9\u30C8\u306F\u5909\u66F4\u304C\u6B63\u3057\u304F\u52D5\u4F5C\u3059\u308B\u8A3C\u62E0\u306B\u306A\u308A\u307E\u305B\u3093\u3002",recipeDrift:"\u8A18\u9332\u3055\u308C\u3066\u3044\u305F\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u624B\u9806\u304C\u53E4\u304F\u306A\u3063\u3066\u304A\u308A\u3001\u8D77\u52D5\u524D\u306B\u4FEE\u6B63\u304C\u5FC5\u8981\u3067\u3057\u305F\u3002",recipeNotSaved:"\u30EA\u30DD\u30B8\u30C8\u30EA\u306B\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u624B\u9806\u304C\u4FDD\u5B58\u3055\u308C\u3066\u3044\u306A\u304B\u3063\u305F\u305F\u3081\u3001Testbot \u304C\u30EA\u30DD\u30B8\u30C8\u30EA\u304B\u3089\u8D77\u52D5\u65B9\u6CD5\u3092\u5224\u65AD\u3057\u307E\u3057\u305F\u3002",mockedDependency:t=>`${t} \u306F\u5B9F\u969B\u306B\u30C7\u30D7\u30ED\u30A4\u3055\u308C\u305A\u30E2\u30C3\u30AF\u5316\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u5BFE\u3059\u308B\u6210\u529F\u7D50\u679C\u306F\u8A3C\u660E\u306B\u306F\u306A\u308A\u307E\u305B\u3093\u3002`,finalizeNotReady:t=>`\u30C6\u30B9\u30C8\u306F\u73FE\u72B6\u3067\u306F\u30DE\u30FC\u30B8\u53EF\u80FD\u306A\u72B6\u614B\u3067\u306F\u3042\u308A\u307E\u305B\u3093${t?`: ${t}`:"\u3002"}`,ciNotCovered:"\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3059\u308B CI \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C\u306A\u3044\u305F\u3081\u3001\u4ECA\u5F8C\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3002",ciNotCoveredBecause:t=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u306F\u3001\u4ECA\u5F8C\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306E\u4E00\u90E8\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093: ${t}`,sutNotRequired:"\u30A2\u30D7\u30EA\u306F\u8D77\u52D5\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u691C\u8A3C\u30C8\u30EA\u30A2\u30FC\u30B8\u306B\u3088\u308A\u3001\u3053\u306E\u5909\u66F4\u3067\u691C\u8A3C\u304C\u5FC5\u8981\u306A\u30C7\u30D7\u30ED\u30A4\u5F8C\u306E\u632F\u308B\u821E\u3044\u306F\u306A\u3044\u3068\u5224\u65AD\u3055\u308C\u307E\u3057\u305F\u3002",lintNotCovered:t=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30EA\u30F3\u30BF\u30FC\u306F ${t} \u3092\u30C1\u30A7\u30C3\u30AF\u3057\u307E\u305B\u3093\u3002\u30B9\u30BF\u30A4\u30EB\u3084\u578B\u306E\u554F\u984C\u304C\u81EA\u52D5\u7684\u306B\u306F\u691C\u51FA\u3055\u308C\u307E\u305B\u3093\u3002`,analysisUnverified:t=>`\u5909\u66F4\u306E\u5206\u6790\u306E\u4E00\u90E8\u3092\u691C\u8A3C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u672A\u89E3\u6C7A\u306E\u30C1\u30A7\u30C3\u30AF ${t} \u4EF6\uFF09\u3002\u8A72\u5F53\u3059\u308B\u4E3B\u5F35\u306F\u672A\u78BA\u8A8D\u3068\u3057\u3066\u6271\u3044\u3001\u30C6\u30B9\u30C8\u3092\u8A08\u753B\u3057\u307E\u3057\u305F\u3002`,unitTestsNotRun:t=>`Testbot \u306F\u9078\u629E\u3057\u305F\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3053\u3053\u306B\u3042\u308B\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8\u306E\u7D50\u679C\u306F Testbot \u81EA\u8EAB\u306E\u518D\u5B9F\u884C\u306B\u3088\u308B\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093: ${t}`,downstreamNotChecked:t=>`\u672A\u5B9F\u884C: \u3053\u306E\u5909\u66F4\u304C\u5F71\u97FF\u3057\u3046\u308B\u3001\u30A2\u30D7\u30EA\u306E\u4ED6\u306E\u90E8\u5206\u306E\u78BA\u8A8D\u3067\u3059\u3002\u3053\u306E\u5909\u66F4\u81EA\u4F53\u306F\u305D\u306E\u52D5\u4F5C\u3092\u5909\u3048\u306A\u3044\u305F\u3081\u3001\u5909\u66F4\u306E\u691C\u8A3C\u306B\u306F\u4E0D\u8981\u3067\u3059\u3002${t}`,testsCouldNotRunHere:(t,e)=>`\u3053\u306E\u5909\u66F4\u306B\u306F ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u306E\u74B0\u5883\u3067\u306F\u5B9F\u884C\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\uFF08\u30B9\u30AD\u30C3\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\uFF09: ${e}`,modelProviderDenied:(t,e=!1)=>e?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u304C\u547C\u3073\u51FA\u3057\u3092\u62D2\u5426\u3057\u307E\u3057\u305F\u3002\u3059\u3067\u306B\u5F97\u3089\u308C\u305F\u8A3C\u62E0\u306F\u3001\u3053\u306E\u5B9F\u884C\u306E\u7D50\u679C\u3092\u5224\u65AD\u3059\u308B\u306E\u306B\u5341\u5206\u3067\u3059\u3002`:`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u304C Testbot \u306E\u547C\u3073\u51FA\u3057\u3092\u62D2\u5426\u3057\u305F\u305F\u3081\u3001\u5B9F\u884C\u306F\u5B8C\u4E86\u524D\u306B\u505C\u6B62\u3057\u307E\u3057\u305F\u3002\u8A8D\u8A3C\u60C5\u5831\u3001\u6A29\u9650\u3001\u307E\u305F\u306F\u4F7F\u7528\u91CF\u306E\u4E0A\u9650\u306B\u3088\u308A\u30A2\u30AF\u30BB\u30B9\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F\u3002\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u3092 Skyramp \u304C\u7BA1\u7406\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u518D\u5B9F\u884C\u3059\u308B\u524D\u306B Skyramp \u30B5\u30DD\u30FC\u30C8\u306B\u304A\u554F\u3044\u5408\u308F\u305B\u304F\u3060\u3055\u3044\u3002\u3054\u81EA\u8EAB\u3067\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u7BA1\u7406\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u305D\u306E\u7BA1\u7406\u8005\u306B\u30A2\u30AF\u30BB\u30B9\u307E\u305F\u306F\u4F7F\u7528\u91CF\u306E\u4E0A\u9650\u306E\u89E3\u6C7A\u3092\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002`,modelProviderUnavailable:(t,e=!1)=>e?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u3092\u547C\u3073\u51FA\u3057\u6642\u306B\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3059\u3067\u306B\u5F97\u3089\u308C\u305F\u8A3C\u62E0\u306F\u3001\u3053\u306E\u5B9F\u884C\u306E\u7D50\u679C\u3092\u5224\u65AD\u3059\u308B\u306E\u306B\u5341\u5206\u3067\u3059\u3002`:`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u3092 Testbot \u304C\u5229\u7528\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u306E\u6BB5\u968E\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3059\u3067\u306B\u5F97\u3089\u308C\u305F\u7D50\u679C\u306F\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306B\u6B8B\u3063\u3066\u3044\u307E\u3059\u3002\u30B3\u30FC\u30C9\u3084 Testbot \u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`},providerOutageHeadline:(t,e)=>`${t} \u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002Testbot \u306F ${e} \u56DE\u8A66\u884C\u3057\u307E\u3057\u305F\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002`,providerOutageActionStatusPage:t=>`${t} \u3067\u72B6\u6CC1\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30B5\u30FC\u30D3\u30B9\u304C\u5FA9\u65E7\u3057\u305F\u3089\u3001Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,providerRateLimitHeadline:t=>`${t} \u306E\u30EC\u30FC\u30C8\u5236\u9650\u306B\u3088\u308A\u5B9F\u884C\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F (HTTP 429)\u3002`,providerRateLimitAction:"\u5236\u9650\u304C\u89E3\u9664\u3055\u308C\u308B\u307E\u3067\u5F85\u3063\u3066\u304B\u3089\u3001Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u7E70\u308A\u8FD4\u3059\u5834\u5408\u306F\u3001\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C\u4F7F\u7528\u3059\u308B\u8A8D\u8A3C\u60C5\u5831\u306E\u30EC\u30FC\u30C8\u5236\u9650\u3092\u5F15\u304D\u4E0A\u3052\u308B\u304B\u3001\u540C\u6642\u306B\u5B9F\u884C\u3059\u308B PR \u306E\u6570\u3092\u6E1B\u3089\u3057\u3066\u304F\u3060\u3055\u3044\u3002",providerUsageLimitHeadline:t=>`${t} \u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5229\u7528\u4E0A\u9650\u306B\u9054\u3057\u307E\u3057\u305F\u3002`,providerUsageLimitAction:"\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E\u8A8D\u8A3C\u60C5\u5831\u306B\u7D10\u3065\u304F\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u5229\u7528\u4E0A\u9650\u3092\u5F15\u304D\u4E0A\u3052\u3066\u304B\u3089\u3001Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",providerAuthExpiredHeadline:t=>`\u5B9F\u884C\u4E2D\u306B\u3001Testbot \u304C ${t} \u3078\u63A5\u7D9A\u3059\u308B\u305F\u3081\u306E\u8A8D\u8A3C\u60C5\u5831\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u307E\u3057\u305F\u3002`,providerAuthExpiredAction:"\u8A8D\u8A3C\u60C5\u5831\u306E\u6709\u52B9\u671F\u9593\u306F\u56FA\u5B9A\u306E\u305F\u3081\u3001\u5B9F\u884C\u6642\u9593\u304C\u9577\u3044\u3068\u305D\u306E\u671F\u9593\u3092\u8D85\u3048\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002Actions \u30BF\u30D6\u306E\u5B9F\u884C\u30DA\u30FC\u30B8\u304B\u3089\u3053\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u5B9F\u884C\u304C\u6709\u52B9\u671F\u9593\u3092\u5E38\u306B\u8D85\u3048\u308B\u5834\u5408\u306F\u3001\u30B8\u30E7\u30D6\u3054\u3068\u306B\u8A8D\u8A3C\u60C5\u5831\u3092\u767A\u884C\u3059\u308B\u304B\u3001\u5404\u30B8\u30E7\u30D6\u304C\u6709\u52B9\u671F\u9593\u5185\u306B\u53CE\u307E\u308B\u3088\u3046\u5B9F\u884C\u3092\u5206\u5272\u3057\u3066\u304F\u3060\u3055\u3044\u3002",providerTimeoutHeadline:t=>`Testbot \u306F\u5236\u9650\u6642\u9593 ${t} \u5206\u3092\u8D85\u3048\u305F\u305F\u3081\u505C\u6B62\u3055\u308C\u307E\u3057\u305F\u3002`,providerTimeoutAction:"\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u5B9F\u884C\u306B\u672C\u5F53\u306B\u6642\u9593\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u3001\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E `testbotTimeout` \u5165\u529B\u5024\u3092\u5927\u304D\u304F\u3057\u3066\u304F\u3060\u3055\u3044\u3002",staged:{testsSourcePullRequest:t=>`\u30BD\u30FC\u30B9\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8 ${t} \u306E\u30C6\u30B9\u30C8`,requestedByPerson:t=>`${t} \u3055\u3093\u306E\u4F9D\u983C\u3067\u5B9F\u884C`,requestedByPolicy:t=>`\u691C\u8A3C\u30DD\u30EA\u30B7\u30FC ${t} \u306B\u3088\u308A\u5B9F\u884C`,notTranslated:{"no-time":"> \u26A0\uFE0F \u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u82F1\u8A9E\u306E\u307E\u307E\u3067\u3059: \u7FFB\u8A33\u3059\u308B\u6642\u9593\u304C\u6B8B\u3063\u3066\u3044\u307E\u305B\u3093\u3067\u3057\u305F\u3002",failed:"> \u26A0\uFE0F \u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u82F1\u8A9E\u306E\u307E\u307E\u3067\u3059: \u7FFB\u8A33\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},noLiveApp:t=>`> \u26A0\uFE0F **\u3053\u306E\u5B9F\u884C\u3067\u306F\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\uFF08SUT\uFF09\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F** \u2014 \u4EE5\u4E0B\u306E ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u306F**\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u305B\u3093**\uFF08\u5B9F\u884C\u5BFE\u8C61\u306E\u30A2\u30D7\u30EA\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F\uFF09\u3002\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5B9F\u884C\u3057\u3001\u5408\u683C\u3059\u308B\u3053\u3068\uFF08\u304A\u3088\u3073\u518D\u73FE\u30C6\u30B9\u30C8\u304C\u610F\u56F3\u3069\u304A\u308A\u5931\u6557\u3059\u308B\u3053\u3068\uFF09\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,unitTestsInFile:(t,e,n)=>`**${t}**: ${n?`${n} \u306E`:""}\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8 ${e} \u4EF6`,addedToExistingFile:"\u65E2\u5B58\u306E\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306B\u8FFD\u52A0",testPackagesHeader:"### \u{1F4E6} \u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306E\u5B9F\u884C\u65B9\u6CD5",testPackageLine:(t,e)=>`\`${t}/\` \u306F Skyramp Testbot \u304C\u6240\u6709\u30FB\u4FDD\u5B88\u3059\u308B\u72EC\u7ACB\u3057\u305F\u30C6\u30B9\u30C8\u30D1\u30C3\u30B1\u30FC\u30B8\u3067\u3001\u72EC\u81EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3001\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\u3001\u30E9\u30F3\u30CA\u30FC\u8A2D\u5B9A\u3092\u6301\u3061\u307E\u3059\u3002\`${e}\` \u3067\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u5B9F\u884C\u3059\u308B\u306B\u306F\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092 CI \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,appManifestsUntouched:"\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u81EA\u8EAB\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3068\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\u306F\u5909\u66F4\u3057\u3066\u3044\u307E\u305B\u3093\u3002",dependencyChangesHeader:"### \u{1F4E6} \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u4F9D\u5B58\u95A2\u4FC2\u306E\u5909\u66F4",dependencyChangeLine:(t,e,n)=>`\`${e}\`\uFF08\u304A\u3088\u3073\u305D\u306E\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\uFF09\u306B \`${t}\` \u3092\u8FFD\u52A0${n?`: ${n}`:""}`,testMaintenanceHeader:"\u2705 \u30C6\u30B9\u30C8\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9",keptNot:"\u5909\u66F4\u305B\u305A\u7DAD\u6301 \u2014 \u898B\u9001\u3063\u305F\u64CD\u4F5C: ",declinedPlanned:"(\u4E88\u5B9A\u3057\u3066\u3044\u305F\u64CD\u4F5C\u3092\u898B\u9001\u308A: ",declinedMaintenanceHeader:"\u21A9\uFE0F \u898B\u9001\u3063\u305F\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9",existingEvidenceHeader:"\u2705 \u65E2\u5B58\u306E\u30A8\u30D3\u30C7\u30F3\u30B9",trustedCheckPassed:(t,e)=>`\u4FE1\u983C\u6E08\u307F\u306E CI \u30C1\u30A7\u30C3\u30AF ${t} \u304C${e?` ${e} \u3067`:""}\u5408\u683C\u3057\u3001\u6B21\u3092\u78BA\u8A8D\u3057\u307E\u3057\u305F:`,testResultsHeader:"\u{1F9EA} \u30C6\u30B9\u30C8\u7D50\u679C",resultsTableHeader:"| \u30C6\u30B9\u30C8 ID | \u30C6\u30B9\u30C8\u7A2E\u5225 | \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8 | \u30B9\u30C6\u30FC\u30BF\u30B9 | \u8A73\u7D30 |",unitResultsTableHeader:"| \u30C6\u30B9\u30C8 ID | \u30C6\u30B9\u30C8\u7A2E\u5225 | \u30C6\u30B9\u30C8\u5BFE\u8C61\u306E\u30B3\u30FC\u30C9 | \u30C6\u30B9\u30C8 | \u30B1\u30FC\u30B9\u6570 | \u30B9\u30C6\u30FC\u30BF\u30B9 | \u8A73\u7D30 |",casesPassed:(t,e,n)=>`${e} \u4EF6\u4E2D ${t} \u4EF6\u5408\u683C${n?`\u3001${n} \u4EF6\u30B9\u30AD\u30C3\u30D7`:""}`,behaviourCoverageHeader:"\u{1F517} \u632F\u308B\u821E\u3044\u306E\u30AB\u30D0\u30EC\u30C3\u30B8",coverageCaption:(t,e,n,r)=>`\uFF08\u751F\u6210 ${t} \xB7 \u5909\u66F4 ${e} \xB7 \u691C\u8A3C ${n} \xB7 \u5B9F\u884C ${r}\uFF09`,coverageTableHeader:"| \u632F\u308B\u821E\u3044 | \u30BD\u30FC\u30B9 | \u30C6\u30B9\u30C8 | \u30E1\u30F3\u30C6\u30CA\u30F3\u30B9 |",writtenNotRun:"\u4F5C\u6210\u6E08\u307F\u30FB\u672A\u5B9F\u884C",issuesFoundHeader:"\u26A0\uFE0F \u691C\u51FA\u3055\u308C\u305F\u554F\u984C",caveatsHeader:"### \u26A0\uFE0F \u3053\u306E\u5B9F\u884C\u3067\u78BA\u8A8D\u3067\u304D\u306A\u304B\u3063\u305F\u3053\u3068",commentHeader:"### Skyramp Testbot",timedOut:"> \u26A0\uFE0F \u5B9F\u884C\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F \u2014 \u4EE5\u4E0B\u306E\u7D50\u679C\u306F\u4E00\u90E8\u306E\u307F\u3067\u3059\u3002",stopReasons:{"pr-closed":"\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u30DE\u30FC\u30B8\u3055\u308C\u305A\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u307E\u3057\u305F",cancelled:"\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u305F\u304B\u3001\u30E9\u30F3\u30CA\u30FC\u304C\u505C\u6B62\u3057\u307E\u3057\u305F","attempt-cancelled":"Skyramp \u3067\u3053\u306E\u5B9F\u884C\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F","attempt-closed":"Skyramp \u304C\u3053\u306E\u5B9F\u884C\u3092\u7D42\u4E86\u3057\u307E\u3057\u305F"},maintenanceActions:{update:"\u66F4\u65B0",regenerate:"\u518D\u751F\u6210",delete:"\u524A\u9664",verify:"\u691C\u8A3C",updated:"\u66F4\u65B0",regenerated:"\u518D\u751F\u6210",deleted:"\u524A\u9664",verified:"\u691C\u8A3C"},publishFailures:{push:"\u30D7\u30C3\u30B7\u30E5\u306B\u5931\u6557",auth:"\u8A8D\u8A3C\u30A8\u30E9\u30FC",conflict:"\u7AF6\u5408",hook:"\u30B3\u30DF\u30C3\u30C8\u30D5\u30C3\u30AF\u304C\u5931\u6557",unknown:"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"},commitHook:t=>t?`${t} \u30D5\u30C3\u30AF`:"\u30B3\u30DF\u30C3\u30C8\u30D5\u30C3\u30AF",commitRefusedByHook:(t,e)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${t}\u304C\u751F\u6210\u3055\u308C\u305F\u30C6\u30B9\u30C8\u306E\u30B3\u30DF\u30C3\u30C8\u3092\u62D2\u5426\u3057\u305F\u305F\u3081\u3001Testbot PR \u306F\u4F5C\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30C3\u30AF\u306E\u30A8\u30E9\u30FC: \`${e}\`\u3002`,commitHookCouldNotRun:(t,e)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${t}\u3092\u5B9F\u884C\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001Testbot PR \u306F\u4F5C\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30C3\u30AF\u304C\u547C\u3073\u51FA\u3059\u30B3\u30DE\u30F3\u30C9\u304C\u30E9\u30F3\u30CA\u30FC\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30D5\u30C3\u30AF\u306E\u30A8\u30E9\u30FC: \`${e}\`\u3002`,stoppedEarly:(t,e)=>`> \u26A0\uFE0F \u5B9F\u884C\u304C\u9014\u4E2D\u3067\u505C\u6B62\u3057\u307E\u3057\u305F \u2014 ${t}\u3002\u4EE5\u4E0B\u306E\u7D50\u679C\u306F\u4E00\u90E8\u306E\u307F\u3067\u3059\u3002${e}`,viewInSkyramp:t=>` [Skyramp \u3067\u8868\u793A](${t})`,descriptionCut:(t,e,n)=>`_\u2026 \u6B8B\u308A\u306F\u7701\u7565\u3057\u307E\u3057\u305F${e===void 0?"\uFF08\u30C6\u30B9\u30C8\u7D50\u679C\u3092\u542B\u3080\uFF09":e?`\uFF08\u30C6\u30B9\u30C8\u7D50\u679C ${e} \u4EF6\u3092\u542B\u3080\uFF09`:""}\u3002Azure DevOps \u306E\u8AAC\u660E\u306F ${t} \u6587\u5B57\u307E\u3067\u3067\u3059\u3002${n?` [\u5B8C\u5168\u306A\u30EC\u30DD\u30FC\u30C8](${n})`:""}_`,testsReplaced:(t,e,n)=>[e?`Skyramp Testbot \u304C\u3053\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30C6\u30B9\u30C8\u3092[\u3053\u306E\u5B9F\u884C](${t})\u306E\u30C6\u30B9\u30C8\uFF08\u30B3\u30DF\u30C3\u30C8 \`${e}\`\uFF09\u306B\u7F6E\u304D\u63DB\u3048\u307E\u3057\u305F\u3002`:`Skyramp Testbot \u304C\u3053\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30C6\u30B9\u30C8\u3092[\u3053\u306E\u5B9F\u884C](${t})\u306E\u30C6\u30B9\u30C8\u306B\u7F6E\u304D\u63DB\u3048\u307E\u3057\u305F\u3002`,n?`[\u4EE5\u524D\u306E\u5B9F\u884C](${n})\u306E\u30C6\u30B9\u30C8\u306F\u7F6E\u304D\u63DB\u3048\u6E08\u307F\u3067\u3059\u3002`:"\u4EE5\u524D\u306E\u5B9F\u884C\u304C\u3053\u3053\u306B\u66F8\u3044\u305F\u30C6\u30B9\u30C8\u306F\u7F6E\u304D\u63DB\u3048\u6E08\u307F\u3067\u3059\u3002"].join(""),setupRunEnds:{finished:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002Skyramp \u304C\u7D50\u679C\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u3059\u3002",failed:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002",timedOut:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u304C\u6642\u9593\u5207\u308C\u306B\u306A\u308A\u307E\u3057\u305F\u3002",cancelledInSkyramp:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u306F Skyramp \u3067\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F\u3002",stoppedToResume:"\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B9F\u884C\u3092\u505C\u6B62\u3057\u307E\u3057\u305F\u3002Skyramp \u3067\u518D\u958B\u3067\u304D\u307E\u3059\u3002"},appUnreachable:t=>`Skyramp\uFF08${t}\uFF09\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002`,couldNotStart:t=>`Skyramp Testbot \u3092\u958B\u59CB\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${t}`,assembledAfterFailedChecks:t=>`> \u26A0\uFE0F \u4F5C\u6210\u30B9\u30C6\u30C3\u30D7\u304C\u30C1\u30A7\u30C3\u30AF\u306B\u5408\u683C\u3057\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u81EA\u52D5\u3067\u7D44\u307F\u7ACB\u3066\u3089\u308C\u307E\u3057\u305F\u3002${t} \u4EF6\u306E\u30C1\u30A7\u30C3\u30AF\u304C\u672A\u9054\u6210\u3067\u3059 \u2014 \u8A73\u7D30\u306F\u5B9F\u884C\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,testbotPrLine:(t,e,n)=>`Testbot PR${t?`\uFF08${t}\uFF09`:""}: [${e}](${n})`,viewRun:t=>`_[\u5B9F\u884C\u3092\u8868\u793A](${t})_`,testsPrNotOpened:(t,e)=>`\u30C6\u30B9\u30C8 PR \u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${t}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30D6\u30E9\u30F3\u30C1 \`${e}\` \u306B\u30D7\u30C3\u30B7\u30E5\u3055\u308C\u3066\u3044\u307E\u3059\u3002`,testsNotDelivered:t=>`\u30C6\u30B9\u30C8\u3092\u914D\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${t}`,testsNotPushed:(t,e)=>`\u30C6\u30B9\u30C8\u3092\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${t}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30ED\u30FC\u30AB\u30EB\u30D6\u30E9\u30F3\u30C1 \`${e}\` \u306B\u6B8B\u3063\u3066\u3044\u307E\u3059\u3002`,testsPrRetargeted:t=>`\u30C6\u30B9\u30C8\u306E\u751F\u6210\u4E2D\u306B\u958B\u767A PR \u304C\u30DE\u30FC\u30B8\u3055\u308C\u307E\u3057\u305F \u2014 \u30C6\u30B9\u30C8 PR \u306F\u4EE3\u308F\u308A\u306B\u30D9\u30FC\u30B9\u30D6\u30E9\u30F3\u30C1${t?`\uFF08\`${t}\`\uFF09`:""}\u3092\u5BFE\u8C61\u306B\u3057\u3066\u3044\u307E\u3059\u3002`,testsPrUnchanged:"\u3053\u306E\u30D7\u30C3\u30B7\u30E5\u3067\u306F\u65B0\u3057\u3044\u30C6\u30B9\u30C8\u306E\u5909\u66F4\u306F\u4E0D\u8981\u3067\u3057\u305F\u3002\u4EE5\u4E0B\u306E\u30C6\u30B9\u30C8 PR \u306F\u4EE5\u524D\u306E\u5B9F\u884C\u306E\u3082\u306E\u3067\u3001\u305D\u306E\u307E\u307E\u306B\u3057\u3066\u3044\u307E\u3059\u3002",committedNoPr:t=>`\u30C6\u30B9\u30C8\u306F\u30B3\u30DF\u30C3\u30C8\u3055\u308C\u307E\u3057\u305F\u304C\u3001PR \u306F\u4F5C\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F: ${t}\u3002`,testsNotProposed:t=>`\u30C6\u30B9\u30C8\u306F PR \u3068\u3057\u3066\u63D0\u6848\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F: ${t}\u3002`}};var gd=(n=>(n.En="en",n.Ja="ja",n))(gd||{}),Rj={en:fd,ja:qk},xj="en";function Em(t){let e=t.trim().toLowerCase();if(e==="")return"en";let n=Object.values(gd);return n.includes(e)?e:(Pe(`Invalid language '${t}'. Supported: ${n.join(", ")}. Falling back to 'en'.`),"en")}function fn(){return Rj[xj]}var md=(c=>(c.ProviderOutage="provider_outage",c.ProviderRateLimit="provider_rate_limit",c.ProviderUsageLimit="provider_usage_limit",c.ProviderAuthExpired="provider_auth_expired",c.Timeout="timeout",c.NoReport="no_report",c.RenderFailure="render_failure",c))(md||{});(e=>{function t(n,r){switch(n){case"provider_outage":return{headline:fn().providerOutageHeadline(r.provider.name,r.maxRetries),action:fn().providerOutageActionStatusPage(r.provider.statusUrl)};case"provider_rate_limit":return{headline:fn().providerRateLimitHeadline(r.provider.name),action:fn().providerRateLimitAction};case"provider_usage_limit":return{headline:fn().providerUsageLimitHeadline(r.provider.name),action:fn().providerUsageLimitAction};case"provider_auth_expired":return{headline:fn().providerAuthExpiredHeadline(r.provider.name),action:fn().providerAuthExpiredAction};case"timeout":return{headline:fn().providerTimeoutHeadline(r.timeoutMinutes),action:fn().providerTimeoutAction};case"no_report":case"render_failure":return}}e.buildNotice=t})(md||={});var Cm=(n=>(n.SameBranch="same-branch",n.SeparateBranch="separate-branch",n))(Cm||{});var Yk=(n=>(n.Sonnet="sonnet",n.Opus="opus",n))(Yk||{}),Tj="opus";function Im(t){return Object.values(Yk).includes(t)}function Jk(t){let e=(t??"").trim();if(e==="")return Tj;let n=e.toLowerCase();return Im(n)?n:e}var yd=(i=>(i.Low="low",i.Medium="medium",i.High="high",i.XHigh="xhigh",i.Max="max",i))(yd||{}),Ed="high";function Wk(t){return Object.values(yd).includes(t)}var zk=5;function Dj(t){let e=t.split(/\r?\n/).map(n=>n.trim()).filter(Boolean);if(e.length>zk)throw new Error(`relatedRepoPaths supports at most ${zk} entries (got ${e.length}); the cap limits how much cross-repo context is loaded to avoid overflowing Testbot's context window.`);return e}function Nj(t){let e=t.trim().toLowerCase();return e===""?"separate-branch":Object.values(Cm).includes(e)?e:(Pe(`Invalid generatedTestsMode '${t}'. Falling back to 'separate-branch'.`),"separate-branch")}function Fj(t){let e=(t??"").trim();if(e!==""){if(/^(?:[1-9]|10)$/.test(e))return Number(e);Pe(`Ignoring perTestMaxFixAttempts="${t}": expected a whole number from 1 to 10; the Skyramp MCP default applies`)}}function Mj(t){let e=(t??"").trim().toLowerCase();return e===""?Ed:Wk(e)?e:(Pe(`Ignoring effort="${t}": expected one of ${Object.values(yd).join(", ")}; using "${Ed}"`),Ed)}function Kk(){let t=Jk(he("model"));return Im(t)||Pe(`model '${t}' is not a tested alias (sonnet, opus); passing it to the agent verbatim as a raw model id.`),{skyrampLicenseFile:he("skyrampLicenseFile"),cursorApiKey:he("cursorApiKey"),copilotApiKey:he("copilotApiKey"),anthropicApiKey:he("anthropicApiKey"),useBedrock:Ts("useBedrock"),awsRegion:he("awsRegion"),useLocalAuth:he("useLocalAuth").toLowerCase()==="true",model:t,effort:Mj(he("effort")),targetSetupCommand:he("targetSetupCommand"),authTokenCommand:he("authTokenCommand"),uiCredentials:he("uiCredentials"),targetTeardownCommand:he("targetTeardownCommand"),skipTargetTeardown:Ts("skipTargetTeardown"),skyrampExecutorVersion:he("skyrampExecutorVersion"),skyrampMcpVersion:he("skyrampMcpVersion"),skyrampMcpSource:he("skyrampMcpSource"),skyrampMcpGithubToken:he("skyrampMcpGithubToken"),skyrampMcpGithubRef:he("skyrampMcpGithubRef"),nodeVersion:he("nodeVersion"),skipTargetSetup:Ts("skipTargetSetup"),targetReadyCheckCommand:he("targetReadyCheckCommand"),targetReadyCheckTimeout:(()=>{let n=parseInt(he("targetReadyCheckTimeout"),10)||1800;return n<1?(Pe(`targetReadyCheckTimeout must be at least 1 second, got ${n}. Using 1s.`),1):n})(),targetReadyCheckInterval:(()=>{let n=parseInt(he("targetReadyCheckInterval"),10),r=isNaN(n)?30:n;return r<1?(Pe(`targetReadyCheckInterval must be at least 1 second, got ${r}. Using 1s.`),1):r})(),targetReadyCheckDiagnosticsCommand:(()=>{let n=he("targetReadyCheckDiagnosticsCommand");return n.trim().toLowerCase()==="none"?"":n})(),workingDirectory:he("workingDirectory"),autoCommit:Ts("autoCommit"),commitMessage:he("commitMessage"),generatedTestsMode:Nj(he("generatedTestsMode")),postPrComment:Ts("postPrComment"),testExecutionTimeout:parseInt(he("testExecutionTimeout"),10)||300,maxRecommendations:(()=>{let n=parseInt(he("maxRecommendations"),10);return isNaN(n)?void 0:Math.max(0,n)})(),maxGenerate:(()=>{let n=parseInt(he("maxGenerate"),10);return isNaN(n)?void 0:Math.max(0,n)})(),perTestMaxFixAttempts:Fj(he("perTestMaxFixAttempts")),testbotMaxRetries:parseInt(he("testbotMaxRetries"),10)||3,testbotRetryDelay:parseInt(he("testbotRetryDelay"),10)||10,testbotTimeout:parseInt(he("testbotTimeout"),10)||60,targetSetupRetries:parseInt(he("targetSetupRetries"),10)||3,targetSetupRetryDelay:parseInt(he("targetSetupRetryDelay"),10)||10,authTokenRetries:(()=>{let n=parseInt(he("authTokenRetries"),10);return Number.isFinite(n)&&n>=1?n:6})(),authTokenRetryDelay:(()=>{let n=parseInt(he("authTokenRetryDelay"),10);return Number.isFinite(n)&&n>=0?n:10})(),reportCollapsed:Ts("reportCollapsed"),language:Em(he("language")),enableDebug:Ts("enableDebug"),testRepoPath:he("testRepoPath")||void 0,relatedRepoPaths:Dj(he("relatedRepoPaths")),allowedAuthors:he("allowedAuthors").split(/\r?\n/).map(n=>n.trim()).filter(Boolean)}}var _j={useBedrock:"false",skipTargetTeardown:"false",skyrampMcpSource:"npm",skyrampMcpGithubRef:"main",nodeVersion:"lts/*",skipTargetSetup:"false",targetReadyCheckTimeout:"1800",targetReadyCheckInterval:"30",targetReadyCheckDiagnosticsCommand:`docker ps -a --format 'table {{.Names}} {{.Status}} {{.Ports}}' && docker ps -a --format '{{.Names}}' | while read name; do [ -n "$name" ] && echo "--- logs $name (last 30) ---" && docker logs --tail 30 "$name"; done`,workingDirectory:".",autoCommit:"true",commitMessage:"Skyramp Testbot: test maintenance suggestions",generatedTestsMode:"separate-branch",pipeline:"staged",postPrComment:"true",testbotMaxRetries:"3",testbotRetryDelay:"10",testExecutionTimeout:"300",testbotTimeout:"60",targetSetupRetries:"3",targetSetupRetryDelay:"10",authTokenRetries:"6",authTokenRetryDelay:"10",reportCollapsed:"true",language:"en",enableDebug:"true",sutSetupMode:"none"};function Zk(t=process.env){for(let[e,n]of Object.entries(_j)){let r=`INPUT_${e.replace(/ /g,"_").toUpperCase()}`;(t[r]??"").trim()===""&&(t[r]=n)}}Ft();var Ox=Re(require("path"));var Ra=require("fs"),ts=Re(require("path"),1),jR=require("child_process"),qR=require("util");function Uj(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qt={},Cd={},Us={},Xk;function pu(){if(Xk)return Us;Xk=1;function t(a){return typeof a>"u"||a===null}function e(a){return typeof a=="object"&&a!==null}function n(a){return Array.isArray(a)?a:t(a)?[]:[a]}function r(a,c){if(c){let l=Object.keys(c);for(let A=0,p=l.length;A<p;A+=1){let h=l[A];a[h]=c[h]}}return a}function s(a,c){let l="";for(let A=0;A<c;A+=1)l+=a;return l}function i(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return Us.isNothing=t,Us.isObject=e,Us.toArray=n,Us.repeat=s,Us.isNegativeZero=i,Us.extend=r,Us}var Bm,eR;function hu(){if(eR)return Bm;eR=1;function t(n,r){let s="",i=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(s+='in "'+n.mark.name+'" '),s+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(s+=`
52
52
 
53
53
  `+n.mark.snippet),i+" "+s):i}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},Bm=e,Bm}var wm,tR;function Lj(){if(tR)return wm;tR=1;let t=pu();function e(s,i,a,c,l){let A="",p="",h=Math.floor(l/2)-1;return c-i>h&&(A=" ... ",i=c-h+A.length),a-c>h&&(p=" ...",a=c+h-p.length),{str:A+s.slice(i,a).replace(/\t/g,"\u2192")+p,pos:c-i+A.length}}function n(s,i){return t.repeat(" ",i-s.length)+s}function r(s,i){if(i=Object.create(i||null),!s.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,c=[0],l=[],A,p=-1;for(;A=a.exec(s.buffer);)l.push(A.index),c.push(A.index+A[0].length),s.position<=A.index&&p<0&&(p=c.length-2);p<0&&(p=c.length-1);let h="",g=Math.min(s.line+i.linesAfter,l.length).toString().length,C=i.maxLength-(i.indent+g+3);for(let k=1;k<=i.linesBefore&&!(p-k<0);k++){let T=e(s.buffer,c[p-k],l[p-k],s.position-(c[p]-c[p-k]),C);h=t.repeat(" ",i.indent)+n((s.line-k+1).toString(),g)+" | "+T.str+`
54
54
  `+h}let S=e(s.buffer,c[p],l[p],s.position,C);h+=t.repeat(" ",i.indent)+n((s.line+1).toString(),g)+" | "+S.str+`
@@ -113,7 +113,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}fun
113
113
  `+d.slice(b,v),b=v+1),I=R;return N+=`
114
114
  `,d.length-b>m&&I>b?N+=d.slice(b,I)+`
115
115
  `+d.slice(I+1):N+=d.slice(b),N.slice(1)}function pt(d){let m="",y=0;for(let Q=0;Q<d.length;y>=65536?Q+=2:Q++){y=ze(d,Q);let b=fe[y];!b&&At(y)?(m+=d[Q],y>=65536&&(m+=d[Q+1])):m+=b||st(y)}return m}function ei(d,m,y){let Q="",b=d.tag;for(let v=0,I=y.length;v<I;v+=1){let R=y[v];d.replacer&&(R=d.replacer.call(y,String(v),R)),(f(d,m,R,!1,!1)||typeof R>"u"&&f(d,m,null,!1,!1))&&(Q!==""&&(Q+=","+(d.condenseFlow?"":" ")),Q+=d.dump)}d.tag=b,d.dump="["+Q+"]"}function On(d,m,y,Q){let b="",v=d.tag;for(let I=0,R=y.length;I<R;I+=1){let N=y[I];d.replacer&&(N=d.replacer.call(y,String(I),N)),(f(d,m+1,N,!0,!0,!1,!0)||typeof N>"u"&&f(d,m+1,null,!0,!0,!1,!0))&&((!Q||b!=="")&&(b+=en(d,m)),d.dump&&c===d.dump.charCodeAt(0)?b+="-":b+="- ",b+=d.dump)}d.tag=v,d.dump=b||"[]"}function ti(d,m,y){let Q="",b=d.tag,v=Object.keys(y);for(let I=0,R=v.length;I<R;I+=1){let N="";Q!==""&&(N+=", "),d.condenseFlow&&(N+='"');let M=v[I],_=y[M];d.replacer&&(_=d.replacer.call(y,M,_)),f(d,m,M,!1,!1)&&(d.dump.length>1024&&(N+="? "),N+=d.dump+(d.condenseFlow?'"':"")+":"+(d.condenseFlow?"":" "),f(d,m,_,!1,!1)&&(N+=d.dump,Q+=N))}d.tag=b,d.dump="{"+Q+"}"}function ni(d,m,y,Q){let b="",v=d.tag,I=Object.keys(y);if(d.sortKeys===!0)I.sort();else if(typeof d.sortKeys=="function")I.sort(d.sortKeys);else if(d.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let R=0,N=I.length;R<N;R+=1){let M="";(!Q||b!=="")&&(M+=en(d,m));let _=I[R],G=y[_];if(d.replacer&&(G=d.replacer.call(y,_,G)),!f(d,m+1,_,!0,!0,!0))continue;let q=d.tag!==null&&d.tag!=="?"||d.dump&&d.dump.length>1024;q&&(d.dump&&c===d.dump.charCodeAt(0)?M+="?":M+="? "),M+=d.dump,q&&(M+=en(d,m)),f(d,m+1,G,!0,q)&&(d.dump&&c===d.dump.charCodeAt(0)?M+=":":M+=": ",M+=d.dump,b+=M)}d.tag=v,d.dump=b||"{}"}function o(d,m,y){let Q=y?d.explicitTypes:d.implicitTypes;for(let b=0,v=Q.length;b<v;b+=1){let I=Q[b];if((I.instanceOf||I.predicate)&&(!I.instanceOf||typeof m=="object"&&m instanceof I.instanceOf)&&(!I.predicate||I.predicate(m))){if(y?I.multi&&I.representName?d.tag=I.representName(m):d.tag=I.tag:d.tag="?",I.represent){let R=d.styleMap[I.tag]||I.defaultStyle,N;if(r.call(I.represent)==="[object Function]")N=I.represent(m,R);else if(s.call(I.represent,R))N=I.represent[R](m,R);else throw new e("!<"+I.tag+'> tag resolver accepts not "'+R+'" style');d.dump=N}return!0}}return!1}function f(d,m,y,Q,b,v,I){d.tag=null,d.dump=y,o(d,y,!1)||o(d,y,!0);let R=r.call(d.dump),N=Q;Q&&(Q=d.flowLevel<0||d.flowLevel>m);let M=R==="[object Object]"||R==="[object Array]",_,G;if(M&&(_=d.duplicates.indexOf(y),G=_!==-1),(d.tag!==null&&d.tag!=="?"||G||d.indent!==2&&m>0)&&(b=!1),G&&d.usedDuplicates[_])d.dump="*ref_"+_;else{if(M&&G&&!d.usedDuplicates[_]&&(d.usedDuplicates[_]=!0),R==="[object Object]")Q&&Object.keys(d.dump).length!==0?(ni(d,m,d.dump,b),G&&(d.dump="&ref_"+_+d.dump)):(ti(d,m,d.dump),G&&(d.dump="&ref_"+_+" "+d.dump));else if(R==="[object Array]")Q&&d.dump.length!==0?(d.noArrayIndent&&!I&&m>0?On(d,m-1,d.dump,b):On(d,m,d.dump,b),G&&(d.dump="&ref_"+_+d.dump)):(ei(d,m,d.dump),G&&(d.dump="&ref_"+_+" "+d.dump));else if(R==="[object String]")d.tag!=="?"&&Nr(d,d.dump,m,v,N);else{if(R==="[object Undefined]")return!1;if(d.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+R)}if(d.tag!==null&&d.tag!=="?"){let q=encodeURI(d.tag[0]==="!"?d.tag.slice(1):d.tag).replace(/!/g,"%21");d.tag[0]==="!"?q="!"+q:q.slice(0,18)==="tag:yaml.org,2002:"?q="!!"+q.slice(18):q="!<"+q+">",d.dump=q+" "+d.dump}}return!0}function B(d,m){let y=[],Q=[];w(d,y,Q);let b=Q.length;for(let v=0;v<b;v+=1)m.duplicates.push(y[Q[v]]);m.usedDuplicates=new Array(b)}function w(d,m,y){if(d!==null&&typeof d=="object"){let Q=m.indexOf(d);if(Q!==-1)y.indexOf(Q)===-1&&y.push(Q);else if(m.push(d),Array.isArray(d))for(let b=0,v=d.length;b<v;b+=1)w(d[b],m,y);else{let b=Object.keys(d);for(let v=0,I=b.length;v<I;v+=1)w(d[b[v]],m,y)}}}function E(d,m){m=m||{};let y=new Zs(m);y.noRefs||B(d,y);let Q=d;return y.replacer&&(Q=y.replacer.call({"":Q},"",Q)),f(y,0,Q,!0,!0)?y.dump+`
116
- `:""}return hy.dump=E,hy}var Ex;function Xj(){if(Ex)return bt;Ex=1;let t=Kj(),e=Zj();function n(r,s){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return bt.Type=_t(),bt.Schema=Cx(),bt.FAILSAFE_SCHEMA=Qx(),bt.JSON_SCHEMA=Rx(),bt.CORE_SCHEMA=xx(),bt.DEFAULT_SCHEMA=fy(),bt.load=t.load,bt.loadAll=t.loadAll,bt.dump=e.dump,bt.YAMLException=mu(),bt.types={binary:Nx(),float:kx(),map:wx(),null:bx(),pairs:Mx(),set:_x(),timestamp:Tx(),bool:Sx(),int:vx(),merge:Dx(),omap:Fx(),seq:Bx(),str:Ix()},bt.safeLoad=n("safeLoad","load"),bt.safeLoadAll=n("safeLoadAll","loadAll"),bt.safeDump=n("safeDump","dump"),bt}var eq=Xj(),tq=Wj(eq),{Type:U4,Schema:L4,FAILSAFE_SCHEMA:P4,JSON_SCHEMA:Ux,CORE_SCHEMA:O4,DEFAULT_SCHEMA:$4,load:yu,loadAll:nq,dump:V4,YAMLException:G4,types:H4,safeLoad:j4,safeLoadAll:q4,safeDump:Y4}=tq;var ns=t=>typeof t=="string"?t:void 0;function Px(t){let e={services:[]},n;try{let l=Lx.readFileSync(t,"utf8");n=yu(l,{schema:Ux})}catch(l){return Pe(`Lenient parse: failed to read/parse ${t}: ${l.message}`),e}if(!n||typeof n!="object"||Array.isArray(n))return Pe(`Lenient parse: ${t} did not contain a YAML object`),e;let r=n,s=r.metadata&&typeof r.metadata=="object"?r.metadata:void 0,i=s?{executorVersion:ns(s.executorVersion),mcpVersion:ns(s.mcpVersion)}:void 0,c=(Array.isArray(r.services)?r.services:[]).reduce((l,A,p)=>{if(!A||typeof A!="object"||Array.isArray(A))return Pe(`Lenient parse: services[${p}] is not an object \u2014 skipping`),l;let h=A,g=ns(h.serviceName);if(!g)return Pe(`Lenient parse: services[${p}] missing or non-string serviceName \u2014 skipping`),l;let C=h.api&&typeof h.api=="object"?h.api:void 0,S=h.runtimeDetails&&typeof h.runtimeDetails=="object"?h.runtimeDetails:void 0;return l.push({serviceName:g,language:ns(h.language),framework:ns(h.framework),testDirectory:ns(h.testDirectory),api:C?{baseUrl:ns(C.baseUrl)}:void 0,runtimeDetails:S?{serverStartCommand:ns(S.serverStartCommand),serverTeardownCommand:ns(S.serverTeardownCommand)}:void 0}),l},[]);return{metadata:i,services:c}}async function $x(t){let e=Ox.resolve(t.workingDirectory),n=new Bd(e),r=[],s=t.targetSetupCommand,i=t.targetTeardownCommand,a=t.skyrampExecutorVersion,c=t.skyrampMcpVersion;if(await n.exists()){Qn(`Found ${n.getConfigPath()}, loading workspace configuration...`);try{let A;try{A=await n.read()}catch(h){Pe(`${n.getConfigPath()} failed strict validation: ${h.message}. Re-reading with per-field lenient parse \u2014 invalid fields will fall back to action input defaults.`),A=Px(n.getConfigPath())}A.metadata&&(!a&&A.metadata.executorVersion&&(a=A.metadata.executorVersion),!c&&A.metadata.mcpVersion&&(c=A.metadata.mcpVersion));for(let h of A.services??[])r.push({serviceName:h.serviceName,language:h.language,framework:h.framework,baseUrl:h.api?.baseUrl,testDirectory:h.testDirectory});let p=(A.services??[])[0];if(p){!s&&p.runtimeDetails?.serverStartCommand&&(s=p.runtimeDetails.serverStartCommand);let h=p.runtimeDetails?.serverTeardownCommand;!i&&typeof h=="string"&&(i=h)}}catch(A){Pe(`Failed to parse ${n.getConfigPath()}: ${A.message} \u2014 falling back to action input defaults`)}}else cu("No .skyramp/workspace.yml found, using action input defaults");a||(a="v1.3.54"),c||(c="latest"),s||(s="docker compose up -d --build");let l={targetSetupCommand:s,authTokenCommand:t.authTokenCommand,targetTeardownCommand:i,skipTargetTeardown:t.skipTargetTeardown,skyrampExecutorVersion:a,skyrampMcpVersion:c,skyrampMcpSource:t.skyrampMcpSource,skyrampMcpGithubRef:t.skyrampMcpGithubRef,nodeVersion:t.nodeVersion,skipTargetSetup:t.skipTargetSetup,targetReadyCheckCommand:t.targetReadyCheckCommand,targetReadyCheckTimeout:t.targetReadyCheckTimeout,targetReadyCheckInterval:t.targetReadyCheckInterval,targetReadyCheckDiagnosticsCommand:t.targetReadyCheckDiagnosticsCommand,autoCommit:t.autoCommit,commitMessage:t.commitMessage,generatedTestsMode:t.generatedTestsMode,postPrComment:t.postPrComment,testExecutionTimeout:t.testExecutionTimeout,maxRecommendations:t.maxRecommendations,maxGenerate:t.maxGenerate,perTestMaxFixAttempts:t.perTestMaxFixAttempts,testbotMaxRetries:t.testbotMaxRetries,testbotRetryDelay:t.testbotRetryDelay,testbotTimeout:t.testbotTimeout,targetSetupRetries:t.targetSetupRetries,targetSetupRetryDelay:t.targetSetupRetryDelay,authTokenRetries:t.authTokenRetries,authTokenRetryDelay:t.authTokenRetryDelay,reportCollapsed:t.reportCollapsed,language:t.language,enableDebug:t.enableDebug,testRepoPath:t.testRepoPath,relatedRepoPaths:t.relatedRepoPaths,services:r};rd("Resolved configuration");for(let[A,p]of Object.entries(l))A==="authTokenCommand"?Qn(` ${A}: [REDACTED]`):A==="services"?Qn(` ${A}: ${JSON.stringify(p)}`):Qn(` ${A}: ${p}`);return sd(),l}Ft();Ft();cm();var Gx=Re(require("child_process")),gy=class extends Error{constructor(e){super(e),this.name="ExecTimeoutError"}},bd=class extends Error{constructor(e){super(e),this.name="ExecAbortedError"}};function Vx(t,e){if(!(!t||t.destroyed||t.writableEnded))try{t.write(e)}catch(n){Pe(`stream write failed: ${n instanceof Error?n.message:String(n)}`)}}async function Hx(t,e=[],n={}){let r="",s="",i={cwd:n.cwd,silent:n.silent??!1,ignoreReturnCode:n.ignoreReturnCode??!1,env:n.env?{...process.env,...n.env}:void 0,input:n.input,listeners:{stdout:c=>{r+=c.toString(),Vx(n.stdoutStream,c)},stderr:c=>{s+=c.toString()}}};if(n.timeout||n.signal){let c=n.signal;return c?.aborted?Promise.reject(new bd(`Command aborted before start: ${t}`)):new Promise((l,A)=>{let p=Gx.spawn(t,e,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:process.env,stdio:["pipe","pipe","pipe"],shell:!1});p.stdout?.on("data",k=>{r+=k.toString(),n.silent||process.stdout.write(k),Vx(n.stdoutStream,k)}),p.stderr?.on("data",k=>{s+=k.toString(),n.silent||process.stderr.write(k)}),n.input&&p.stdin?.end(n.input);let h=()=>{S&&clearTimeout(S),c?.removeEventListener("abort",C)},g=k=>{h();try{p.kill("SIGTERM")}catch{}A(k)},C=()=>g(new bd(`Command aborted: ${t}`)),S=n.timeout?setTimeout(()=>g(new gy(`Command timed out after ${Math.round(n.timeout/6e4)}m: ${t}`)),n.timeout):void 0;c?.addEventListener("abort",C,{once:!0}),p.on("close",k=>{h();let T=k??1;T!==0&&!n.ignoreReturnCode?A(new Error(`The process '${t}' failed with exit code ${T}`)):l({exitCode:T,stdout:r,stderr:s})}),p.on("error",k=>{h(),A(k)})})}return{exitCode:await wk(t,e,i),stdout:r,stderr:s}}async function jx(t,e){rd(t);try{return await e()}finally{sd()}}async function qx(t,e){await jx("Tearing down services",async()=>{if(t.skipTargetTeardown){cu("Skipping service teardown (skipTargetTeardown=true)");return}if(!t.targetTeardownCommand){Qn("No targetTeardownCommand configured, skipping teardown");return}Qn(`Running teardown command: ${t.targetTeardownCommand}`);try{await Hx("bash",["-c",t.targetTeardownCommand],{cwd:e}),cu("Services torn down successfully")}catch(n){let r=n instanceof Error?n.message:String(n);Pe(`Service teardown command failed (non-fatal): ${r}`)}})}Ft();Ft();var Wi=(i=>(i.NotFound="not_found",i.NoAccess="no_access",i.Unavailable="unavailable",i.AccessLost="access_lost",i.CannotOpen="cannot_open",i))(Wi||{});var my=t=>`${t.source}:${t.site??""}:${t.key}`;var Sd=/^pasted-[0-9a-f]{16}$/,Eu=/^file-[0-9a-f]{16}$/,Cu=(s=>(s.Pdf="application/pdf",s.Csv="text/csv",s.Docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.Xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s))(Cu||{});var vd=(r=>(r.New="new",r.Updated="updated",r.Existing="existing",r))(vd||{}),zi=(r=>(r.Sufficient="sufficient",r.Insufficient="insufficient",r.NoChange="no_change",r))(zi||{}),xa=(T=>(T.RelatedChangeConflict="related_change_conflict",T.ReferenceOutsideTarget="reference_outside_target",T.SourceAccessLost="source_access_lost",T.ConfigurationIncomplete="configuration_incomplete",T.CredentialUnavailable="credential_unavailable",T.WorkflowBindingUnverified="workflow_binding_unverified",T.WorkflowRefUnprotected="workflow_ref_unprotected",T.BedrockWorkflowRequired="bedrock_workflow_required",T.DeploymentReview="deployment_review",T.SutRevisionMismatch="sut_revision_mismatch",T.IsolationUnavailable="isolation_unavailable",T.EvidenceInsufficient="evidence_insufficient",T.ConfigurationUnresolved="configuration_unresolved",T.ModelProviderDenied="model_provider_denied",T.ModelProviderUnavailable="model_provider_unavailable",T.RunnerProviderNotReady="runner_provider_not_ready",T))(xa||{}),Ps=(i=>(i.CiCheck="ci_check",i.TestReport="test_report",i.StaticAnalysis="static_analysis",i.CodeReview="code_review",i.Other="other",i))(Ps||{}),kd=(r=>(r.Application="application",r.Environment="environment",r.TestDefect="test_defect",r))(kd||{}),Rd=(c=>(c.AuthToken="auth_token",c.Secret="secret",c.DataConnection="data_connection",c.AppNotStarted="app_not_started",c.Login="login",c.ExternalDependency="external_dependency",c.RecordingReplay="recording_replay",c))(Rd||{});var xd=(n=>(n.Probe="probe",n.Agent="agent",n))(xd||{}),Td=(r=>(r.Seed="seed",r.RuntimeMock="runtime_mock",r.EnvOverride="env_override",r))(Td||{}),Dd=(r=>(r.TestCode="test_code",r.SkyrampMocker="skyramp_mocker",r.RecipeOverride="recipe_override",r))(Dd||{});var sq=["generate-unit","native-run"],s8=["preflight","plan","write",...sq,"report","deliver"];var Nd=(r=>(r.Unit="unit",r.Integration="integration",r.E2e="e2e",r))(Nd||{});var Fd="\xABredacted\xBB";function rs(t,e){if(!t||e.length===0)return t;let n=t;for(let r of e)!r||!n.includes(r)||(n=n.split(r).join(Fd));return n}var A8=new TextDecoder("utf-8",{fatal:!0});function ot(t,e=[]){let n=t.trim();if(!n)return{error:"session produced no output"};let r=l=>{try{let A=JSON.parse(l);return typeof A=="object"&&A!==null&&!Array.isArray(A)?A:void 0}catch{return}},s=r(n);if(s!==void 0)return{value:s};let i;if(n.startsWith("{")&&n.endsWith("}"))try{JSON.parse(n)}catch(l){i=l instanceof Error?l.message:String(l)}let a=[...n.matchAll(/```(?:json)?\s*\n([\s\S]*?)```/g)];for(let l=a.length-1;l>=0;l--){let A=r(a[l][1].trim());if(A!==void 0)return{value:A}}let c;for(let l=n.indexOf("{");l!==-1;l=n.indexOf("{",l+1)){let A=0,p=!1,h=!1;for(let g=l;g<n.length;g++){let C=n[g];if(h){h=!1;continue}if(C==="\\"){h=p;continue}if(C==='"'){p=!p;continue}if(!p){if(C==="{")A++;else if(C==="}"&&(A--,A===0)){let S=r(n.slice(l,g+1));S!==void 0&&Object.keys(S).length>0&&(c=S,l=g);break}}}}return i&&(c===void 0||Object.keys(c).length<3)?{error:`final message is not valid JSON \u2014 ${i}. Most often an unescaped double quote inside a string (e.g. in "summary" or "evidence"): escape it as \\" or use single quotes in prose`}:c!==void 0?{value:c}:i?{error:`final message is not valid JSON \u2014 ${i}. Most often an unescaped double quote inside a string (e.g. in "summary" or "evidence"): escape it as \\" or use single quotes in prose`}:{error:`no parseable JSON object found in session output \u2014 the final message was: "${iq(rs(n,e))}"`}}var Yx=240;function iq(t){let e=t.replace(/\s+/g," ").trim();return e.length<=Yx?e:`\u2026${e.slice(-Yx)}`}var Bu=Re(require("fs")),wu=Re(require("path"));var oq=8;function yt(t,e,n={}){let r=e.slice(0,oq),s=e.length-r.length;return{name:t,passed:!1,details:r.join("; ")+(s>0?`; \u2026and ${s} more`:""),...n.fatal?{fatal:!0}:{}}}function Ta(t){if(Bu.existsSync(t))try{return JSON.parse(Bu.readFileSync(t,"utf-8"))}catch{return}}function Ut(t,e){return Ta(wu.join(t.outputsDir,e))}function kn(t,e){return{name:t,verify(n,r){let{errors:s}=e(n,r);return s.length===0?{name:this.name,passed:!0}:yt(this.name,s,{fatal:!0})}}}function Qu(t){return t.replace(/\s+/g," ").trim()}var Md=new RegExp("(^|/)("+["test_[^/]+\\.py","[^/]+_test\\.py","[^/]+\\.(spec|test)\\.[cm]?[jt]sx?","[^/]+\\.e2e-(spec|test)\\.[cm]?[jt]sx?","[^/]+_test\\.go","[^/]+Tests?\\.(java|kts?)","[^/]+_(test|spec)\\.rb","[^/]+\\.feature","[^/]+Tests?\\.cs","[^/]+_test\\.rs","tests/[^/]+\\.rs","[^/]+Test\\.php","[^/]+(Test|Spec|Suite)\\.scala","[^/]+Tests?\\.swift","[^/]+_test\\.exs","[^/]+_test\\.dart","[^/]+_test\\.(c|cc|cpp|cxx)","test_[^/]+\\.(c|cc|cpp|cxx)","[^/]+(Spec|Test)\\.groovy"].join("|")+")$","i");var u={};mp(u,{BRAND:()=>Dq,DIRTY:()=>Ki,EMPTY_PATH:()=>lq,INVALID:()=>ie,NEVER:()=>gY,OK:()=>St,ParseStatus:()=>Et,Schema:()=>Ce,ZodAny:()=>Vs,ZodArray:()=>as,ZodBigInt:()=>Xi,ZodBoolean:()=>eo,ZodBranded:()=>Su,ZodCatch:()=>Ao,ZodDate:()=>to,ZodDefault:()=>lo,ZodDiscriminatedUnion:()=>Ld,ZodEffects:()=>Tn,ZodEnum:()=>co,ZodError:()=>Wt,ZodFirstPartyTypeKind:()=>le,ZodFunction:()=>Od,ZodIntersection:()=>io,ZodIssueCode:()=>O,ZodLazy:()=>oo,ZodLiteral:()=>ao,ZodMap:()=>Ua,ZodNaN:()=>Pa,ZodNativeEnum:()=>uo,ZodNever:()=>Xn,ZodNull:()=>ro,ZodNullable:()=>wr,ZodNumber:()=>Zi,ZodObject:()=>zt,ZodOptional:()=>Rn,ZodParsedType:()=>z,ZodPipeline:()=>vu,ZodPromise:()=>Gs,ZodReadonly:()=>po,ZodRecord:()=>Pd,ZodSchema:()=>Ce,ZodSet:()=>La,ZodString:()=>$s,ZodSymbol:()=>Ma,ZodTransformer:()=>Tn,ZodTuple:()=>Br,ZodType:()=>Ce,ZodUndefined:()=>no,ZodUnion:()=>so,ZodUnknown:()=>os,ZodVoid:()=>_a,addIssueToContext:()=>J,any:()=>$q,array:()=>jq,bigint:()=>_q,boolean:()=>s0,coerce:()=>fY,custom:()=>t0,date:()=>Uq,datetimeRegex:()=>Xx,defaultErrorMap:()=>ss,discriminatedUnion:()=>Wq,effect:()=>aY,enum:()=>sY,function:()=>tY,getErrorMap:()=>Da,getParsedType:()=>Ir,instanceof:()=>Fq,intersection:()=>zq,isAborted:()=>_d,isAsync:()=>Na,isDirty:()=>Ud,isValid:()=>Os,late:()=>Nq,lazy:()=>nY,literal:()=>rY,makeIssue:()=>bu,map:()=>Xq,nan:()=>Mq,nativeEnum:()=>iY,never:()=>Gq,null:()=>Oq,nullable:()=>uY,number:()=>r0,object:()=>qq,objectUtil:()=>Ey,oboolean:()=>hY,onumber:()=>pY,optional:()=>cY,ostring:()=>dY,pipeline:()=>AY,preprocess:()=>lY,promise:()=>oY,quotelessJson:()=>aq,record:()=>Zq,set:()=>eY,setErrorMap:()=>uq,strictObject:()=>Yq,string:()=>n0,symbol:()=>Lq,transformer:()=>aY,tuple:()=>Kq,undefined:()=>Pq,union:()=>Jq,unknown:()=>Vq,util:()=>Qe,void:()=>Hq});var Qe;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{let i={};for(let a of s)i[a]=a;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),a={};for(let c of i)a[c]=s[c];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(let a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Qe||(Qe={}));var Ey;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ey||(Ey={}));var z=Qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ir=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}};var O=Qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),aq=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Wt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,l=0;for(;l<a.path.length;){let A=a.path[l],p=l===a.path.length-1;if(A==="_errors"){p&&c._errors.push(n(a)),l++;continue}Object.prototype.hasOwnProperty.call(c,A)||(A==="__proto__"?Object.defineProperty(c,A,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):c[A]={_errors:[]}),c=c[A],p&&c._errors.push(n(a)),l++}}};return s(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n=Object.create(null),r=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Wt.create=t=>new Wt(t);var cq=(t,e)=>{let n;switch(t.code){case O.invalid_type:t.received===z.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case O.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Qe.jsonStringifyReplacer)}`;break;case O.unrecognized_keys:n=`Unrecognized key(s) in object: ${Qe.joinValues(t.keys,", ")}`;break;case O.invalid_union:n="Invalid input";break;case O.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Qe.joinValues(t.options)}`;break;case O.invalid_enum_value:n=`Invalid enum value. Expected ${Qe.joinValues(t.options)}, received '${t.received}'`;break;case O.invalid_arguments:n="Invalid function arguments";break;case O.invalid_return_type:n="Invalid function return type";break;case O.invalid_date:n="Invalid date";break;case O.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Qe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case O.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case O.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case O.custom:n="Invalid input";break;case O.invalid_intersection_types:n="Intersection results could not be merged";break;case O.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case O.not_finite:n="Number must be finite";break;default:n=e.defaultError,Qe.assertNever(t)}return{message:n}},ss=cq;var Jx=ss;function uq(t){Jx=t}function Da(){return Jx}var bu=t=>{let{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let c="",l=r.filter(A=>!!A).slice().reverse();for(let A of l)c=A(a,{data:e,defaultError:c}).message;return{...s,path:i,message:c}},lq=[];function J(t,e){let n=Da(),r=bu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ss?void 0:ss].filter(s=>!!s)});t.common.issues.push(r)}var Et=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let s of n){if(s.status==="aborted")return ie;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let s of n){let i=await s.key,a=await s.value;r.push({key:i,value:a})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let s of n){let{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return ie;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:e.value,value:r}}},ie=Object.freeze({status:"aborted"}),Ki=t=>({status:"dirty",value:t}),St=t=>({status:"valid",value:t}),_d=t=>t.status==="aborted",Ud=t=>t.status==="dirty",Os=t=>t.status==="valid",Na=t=>typeof Promise<"u"&&t instanceof Promise;var Z;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Z||(Z={}));var xn=class{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wx=(t,e)=>{if(Os(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Wt(t.common.issues);return this._error=n,this._error}}};function me(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,c)=>{let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??c.defaultError}:typeof c.data>"u"?{message:l??r??c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:l??n??c.defaultError}},description:s}}var Ce=class{get description(){return this._def.description}_getType(e){return Ir(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Ir(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Et,ctx:{common:e.parent.common,data:e.data,parsedType:Ir(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Na(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ir(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Wx(r,s)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ir(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return Os(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Os(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ir(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Na(s)?s:Promise.resolve(s));return Wx(r,i)}refine(e,n){let r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{let a=e(s),c=()=>i.addIssue({code:O.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Tn({schema:this,typeName:le.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Rn.create(this,this._def)}nullable(){return wr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return as.create(this)}promise(){return Gs.create(this,this._def)}or(e){return so.create([this,e],this._def)}and(e){return io.create(this,e,this._def)}transform(e){return new Tn({...me(this._def),schema:this,typeName:le.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new lo({...me(this._def),innerType:this,defaultValue:n,typeName:le.ZodDefault})}brand(){return new Su({typeName:le.ZodBranded,type:this,...me(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Ao({...me(this._def),innerType:this,catchValue:n,typeName:le.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return vu.create(this,e)}readonly(){return po.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Aq=/^c[^\s-]{8,}$/i,dq=/^[0-9a-z]+$/,pq=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hq=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fq=/^[a-z0-9_-]{21}$/i,gq=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,mq=/^[-+]?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)?)??$/,yq=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Eq="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Cy,Cq=/^(?:(?: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])$/,Iq=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Bq=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wq=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kx="((\\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])))",Sq=new RegExp(`^${Kx}$`);function Zx(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function vq(t){return new RegExp(`^${Zx(t)}$`)}function Xx(t){let e=`${Kx}T${Zx(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function kq(t,e){return!!((e==="v4"||!e)&&Cq.test(t)||(e==="v6"||!e)&&Bq.test(t))}function Rq(t,e){if(!gq.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function xq(t,e){return!!((e==="v4"||!e)&&Iq.test(t)||(e==="v6"||!e)&&wq.test(t))}var $s=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_type,expected:z.string,received:i.parsedType}),ie}let r=new Et,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,c=e.data.length<i.value;(a||c)&&(s=this._getOrReturnCtx(e,s),a?J(s,{code:O.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&J(s,{code:O.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"email",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Cy||(Cy=new RegExp(Eq,"u")),Cy.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"emoji",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")hq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"uuid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")fq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"nanoid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Aq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"cuid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")dq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"cuid2",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")pq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"ulid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),J(s,{validation:"url",code:O.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"regex",code:O.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Xx(i).test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Sq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?vq(i).test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?mq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"duration",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?kq(e.data,i.version)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"ip",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Rq(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"jwt",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?xq(e.data,i.version)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"cidr",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Qq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"base64",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?bq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"base64url",code:O.invalid_string,message:i.message}),r.dirty()):Qe.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:O.invalid_string,...Z.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Z.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Z.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Z.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Z.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Z.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Z.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Z.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Z.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Z.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Z.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Z.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Z.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Z.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Z.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Z.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Z.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Z.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Z.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Z.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Z.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Z.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Z.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Z.errToObj(n)})}nonempty(e){return this.min(1,Z.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};$s.create=t=>new $s({checks:[],typeName:le.ZodString,coerce:t?.coerce??!1,...me(t)});function Tq(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}var Zi=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_type,expected:z.number,received:i.parsedType}),ie}let r,s=new Et;for(let i of this._def.checks)i.kind==="int"?Qe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),J(r,{code:O.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Tq(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),J(r,{code:O.not_finite,message:i.message}),s.dirty()):Qe.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Z.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Z.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Z.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Z.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Z.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Z.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Z.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Z.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Z.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Z.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Z.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Qe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};Zi.create=t=>new Zi({checks:[],typeName:le.ZodNumber,coerce:t?.coerce||!1,...me(t)});var Xi=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==z.bigint)return this._getInvalidInput(e);let r,s=new Et;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Qe.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return J(n,{code:O.invalid_type,expected:z.bigint,received:n.parsedType}),ie}gte(e,n){return this.setLimit("min",e,!0,Z.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Z.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Z.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Z.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Z.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Z.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Z.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Xi.create=t=>new Xi({checks:[],typeName:le.ZodBigInt,coerce:t?.coerce??!1,...me(t)});var eo=class extends Ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.boolean,received:r.parsedType}),ie}return St(e.data)}};eo.create=t=>new eo({typeName:le.ZodBoolean,coerce:t?.coerce||!1,...me(t)});var to=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_type,expected:z.date,received:i.parsedType}),ie}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_date}),ie}let r=new Et,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Qe.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Z.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Z.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};to.create=t=>new to({checks:[],coerce:t?.coerce||!1,typeName:le.ZodDate,...me(t)});var Ma=class extends Ce{_parse(e){if(this._getType(e)!==z.symbol){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.symbol,received:r.parsedType}),ie}return St(e.data)}};Ma.create=t=>new Ma({typeName:le.ZodSymbol,...me(t)});var no=class extends Ce{_parse(e){if(this._getType(e)!==z.undefined){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.undefined,received:r.parsedType}),ie}return St(e.data)}};no.create=t=>new no({typeName:le.ZodUndefined,...me(t)});var ro=class extends Ce{_parse(e){if(this._getType(e)!==z.null){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.null,received:r.parsedType}),ie}return St(e.data)}};ro.create=t=>new ro({typeName:le.ZodNull,...me(t)});var Vs=class extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return St(e.data)}};Vs.create=t=>new Vs({typeName:le.ZodAny,...me(t)});var os=class extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return St(e.data)}};os.create=t=>new os({typeName:le.ZodUnknown,...me(t)});var Xn=class extends Ce{_parse(e){let n=this._getOrReturnCtx(e);return J(n,{code:O.invalid_type,expected:z.never,received:n.parsedType}),ie}};Xn.create=t=>new Xn({typeName:le.ZodNever,...me(t)});var _a=class extends Ce{_parse(e){if(this._getType(e)!==z.undefined){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.void,received:r.parsedType}),ie}return St(e.data)}};_a.create=t=>new _a({typeName:le.ZodVoid,...me(t)});var as=class t extends Ce{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==z.array)return J(n,{code:O.invalid_type,expected:z.array,received:n.parsedType}),ie;if(s.exactLength!==null){let a=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(a||c)&&(J(n,{code:a?O.too_big:O.too_small,minimum:c?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(J(n,{code:O.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(J(n,{code:O.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>s.type._parseAsync(new xn(n,a,n.path,c)))).then(a=>Et.mergeArray(r,a));let i=[...n.data].map((a,c)=>s.type._parseSync(new xn(n,a,n.path,c)));return Et.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:Z.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:Z.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:Z.toString(n)}})}nonempty(e){return this.min(1,e)}};as.create=(t,e)=>new as({type:t,minLength:null,maxLength:null,exactLength:null,typeName:le.ZodArray,...me(e)});function Fa(t){if(t instanceof zt){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=Rn.create(Fa(r))}return new zt({...t._def,shape:()=>e})}else return t instanceof as?new as({...t._def,type:Fa(t.element)}):t instanceof Rn?Rn.create(Fa(t.unwrap())):t instanceof wr?wr.create(Fa(t.unwrap())):t instanceof Br?Br.create(t.items.map(e=>Fa(e))):t}var zt=class t extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=Qe.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==z.object){let A=this._getOrReturnCtx(e);return J(A,{code:O.invalid_type,expected:z.object,received:A.parsedType}),ie}let{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Xn&&this._def.unknownKeys==="strip"))for(let A in s.data)a.includes(A)||c.push(A);let l=[];for(let A of a){let p=i[A],h=s.data[A];l.push({key:{status:"valid",value:A},value:p._parse(new xn(s,h,s.path,A)),alwaysSet:A in s.data})}if(this._def.catchall instanceof Xn){let A=this._def.unknownKeys;if(A==="passthrough")for(let p of c)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(A==="strict")c.length>0&&(J(s,{code:O.unrecognized_keys,keys:c}),r.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let A=this._def.catchall;for(let p of c){let h=s.data[p];l.push({key:{status:"valid",value:p},value:A._parse(new xn(s,h,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let A=[];for(let p of l){let h=await p.key,g=await p.value;A.push({key:h,value:g,alwaysSet:p.alwaysSet})}return A}).then(A=>Et.mergeObjectSync(r,A)):Et.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Z.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Z.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:le.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of Qe.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of Qe.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Fa(this)}partial(e){let n={};for(let r of Qe.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of Qe.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Rn;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return e0(Qe.objectKeys(this.shape))}};zt.create=(t,e)=>new zt({shape:()=>t,unknownKeys:"strip",catchall:Xn.create(),typeName:le.ZodObject,...me(e)});zt.strictCreate=(t,e)=>new zt({shape:()=>t,unknownKeys:"strict",catchall:Xn.create(),typeName:le.ZodObject,...me(e)});zt.lazycreate=(t,e)=>new zt({shape:t,unknownKeys:"strip",catchall:Xn.create(),typeName:le.ZodObject,...me(e)});var so=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Wt(c.ctx.common.issues));return J(n,{code:O.invalid_union,unionErrors:a}),ie}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let i,a=[];for(let l of r){let A={...n,common:{...n.common,issues:[]},parent:null},p=l._parseSync({data:n.data,path:n.path,parent:A});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:A}),A.common.issues.length&&a.push(A.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(l=>new Wt(l));return J(n,{code:O.invalid_union,unionErrors:c}),ie}}get options(){return this._def.options}};so.create=(t,e)=>new so({options:t,typeName:le.ZodUnion,...me(e)});var is=t=>t instanceof oo?is(t.schema):t instanceof Tn?is(t.innerType()):t instanceof ao?[t.value]:t instanceof co?t.options:t instanceof uo?Qe.objectValues(t.enum):t instanceof lo?is(t._def.innerType):t instanceof no?[void 0]:t instanceof ro?[null]:t instanceof Rn?[void 0,...is(t.unwrap())]:t instanceof wr?[null,...is(t.unwrap())]:t instanceof Su||t instanceof po?is(t.unwrap()):t instanceof Ao?is(t._def.innerType):[],Ld=class t extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.object)return J(n,{code:O.invalid_type,expected:z.object,received:n.parsedType}),ie;let r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:O.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let s=new Map;for(let i of n){let a=is(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of a){if(s.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new t({typeName:le.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...me(r)})}};function Iy(t,e){let n=Ir(t),r=Ir(e);if(t===e)return{valid:!0,data:t};if(n===z.object&&r===z.object){let s=Qe.objectKeys(e),i=Qe.objectKeys(t).filter(c=>s.indexOf(c)!==-1),a={...t,...e};Object.prototype.hasOwnProperty.call(a,"__proto__")&&delete a.__proto__;for(let c of i){if(c==="__proto__")continue;let l=Iy(t[c],e[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}else if(n===z.array&&r===z.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let a=t[i],c=e[i],l=Iy(a,c);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===z.date&&r===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var io=class extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=(i,a)=>{if(_d(i)||_d(a))return ie;let c=Iy(i.value,a.value);return c.valid?((Ud(i)||Ud(a))&&n.dirty(),{status:n.value,value:c.data}):(J(r,{code:O.invalid_intersection_types}),ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};io.create=(t,e,n)=>new io({left:t,right:e,typeName:le.ZodIntersection,...me(n)});var Br=class t extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.array)return J(r,{code:O.invalid_type,expected:z.array,received:r.parsedType}),ie;if(r.data.length<this._def.items.length)return J(r,{code:O.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:O.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new xn(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Et.mergeArray(n,a)):Et.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Br.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Br({items:t,typeName:le.ZodTuple,rest:null,...me(e)})};var Pd=class t extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.object)return J(r,{code:O.invalid_type,expected:z.object,received:r.parsedType}),ie;let s=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)s.push({key:i._parse(new xn(r,c,r.path,c)),value:a._parse(new xn(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?Et.mergeObjectAsync(n,s):Et.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ce?new t({keyType:e,valueType:n,typeName:le.ZodRecord,...me(r)}):new t({keyType:$s.create(),valueType:e,typeName:le.ZodRecord,...me(n)})}},Ua=class extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.map)return J(r,{code:O.invalid_type,expected:z.map,received:r.parsedType}),ie;let s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,l],A)=>({key:s._parse(new xn(r,c,r.path,[A,"key"])),value:i._parse(new xn(r,l,r.path,[A,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of a){let A=await l.key,p=await l.value;if(A.status==="aborted"||p.status==="aborted")return ie;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let l of a){let A=l.key,p=l.value;if(A.status==="aborted"||p.status==="aborted")return ie;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}}}};Ua.create=(t,e,n)=>new Ua({valueType:e,keyType:t,typeName:le.ZodMap,...me(n)});var La=class t extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.set)return J(r,{code:O.invalid_type,expected:z.set,received:r.parsedType}),ie;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(J(r,{code:O.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(J(r,{code:O.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let i=this._def.valueType;function a(l){let A=new Set;for(let p of l){if(p.status==="aborted")return ie;p.status==="dirty"&&n.dirty(),A.add(p.value)}return{status:n.value,value:A}}let c=[...r.data.values()].map((l,A)=>i._parse(new xn(r,l,r.path,A)));return r.common.async?Promise.all(c).then(l=>a(l)):a(c)}min(e,n){return new t({...this._def,minSize:{value:e,message:Z.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:Z.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};La.create=(t,e)=>new La({valueType:t,minSize:null,maxSize:null,typeName:le.ZodSet,...me(e)});var Od=class t extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.function)return J(n,{code:O.invalid_type,expected:z.function,received:n.parsedType}),ie;function r(c,l){return bu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Da(),ss].filter(A=>!!A),issueData:{code:O.invalid_arguments,argumentsError:l}})}function s(c,l){return bu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Da(),ss].filter(A=>!!A),issueData:{code:O.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Gs){let c=this;return St(async function(...l){let A=new Wt([]),p=await c._def.args.parseAsync(l,i).catch(C=>{throw A.addIssue(r(l,C)),A}),h=await Reflect.apply(a,this,p);return await c._def.returns._def.type.parseAsync(h,i).catch(C=>{throw A.addIssue(s(h,C)),A})})}else{let c=this;return St(function(...l){let A=c._def.args.safeParse(l,i);if(!A.success)throw new Wt([r(l,A.error)]);let p=Reflect.apply(a,this,A.data),h=c._def.returns.safeParse(p,i);if(!h.success)throw new Wt([s(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Br.create(e).rest(os.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||Br.create([]).rest(os.create()),returns:n||os.create(),typeName:le.ZodFunction,...me(r)})}},oo=class extends Ce{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};oo.create=(t,e)=>new oo({getter:t,typeName:le.ZodLazy,...me(e)});var ao=class extends Ce{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return J(n,{received:n.data,code:O.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:e.data}}get value(){return this._def.value}};ao.create=(t,e)=>new ao({value:t,typeName:le.ZodLiteral,...me(e)});function e0(t,e){return new co({values:t,typeName:le.ZodEnum,...me(e)})}var co=class t extends Ce{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return J(n,{expected:Qe.joinValues(r),received:n.parsedType,code:O.invalid_type}),ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return J(n,{received:n.data,code:O.invalid_enum_value,options:r}),ie}return St(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};co.create=e0;var uo=class extends Ce{_parse(e){let n=Qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==z.string&&r.parsedType!==z.number){let s=Qe.objectValues(n);return J(r,{expected:Qe.joinValues(s),received:r.parsedType,code:O.invalid_type}),ie}if(this._cache||(this._cache=new Set(Qe.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=Qe.objectValues(n);return J(r,{received:r.data,code:O.invalid_enum_value,options:s}),ie}return St(e.data)}get enum(){return this._def.values}};uo.create=(t,e)=>new uo({values:t,typeName:le.ZodNativeEnum,...me(e)});var Gs=class extends Ce{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.promise&&n.common.async===!1)return J(n,{code:O.invalid_type,expected:z.promise,received:n.parsedType}),ie;let r=n.parsedType===z.promise?n.data:Promise.resolve(n.data);return St(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Gs.create=(t,e)=>new Gs({type:t,typeName:le.ZodPromise,...me(e)});var Tn=class extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{J(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async c=>{if(n.value==="aborted")return ie;let l=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return l.status==="aborted"?ie:l.status==="dirty"?Ki(l.value):n.value==="dirty"?Ki(l.value):l});{if(n.value==="aborted")return ie;let c=this._def.schema._parseSync({data:a,path:r.path,parent:r});return c.status==="aborted"?ie:c.status==="dirty"?Ki(c.value):n.value==="dirty"?Ki(c.value):c}}if(s.type==="refinement"){let a=c=>{let l=s.refinement(c,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?ie:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?ie:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Os(a))return ie;let c=s.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Os(a)?Promise.resolve(s.transform(a.value,i)).then(c=>({status:n.value,value:c})):ie);Qe.assertNever(s)}};Tn.create=(t,e,n)=>new Tn({schema:t,typeName:le.ZodEffects,effect:e,...me(n)});Tn.createWithPreprocess=(t,e,n)=>new Tn({schema:e,effect:{type:"preprocess",transform:t},typeName:le.ZodEffects,...me(n)});var Rn=class extends Ce{_parse(e){return this._getType(e)===z.undefined?St(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Rn.create=(t,e)=>new Rn({innerType:t,typeName:le.ZodOptional,...me(e)});var wr=class extends Ce{_parse(e){return this._getType(e)===z.null?St(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};wr.create=(t,e)=>new wr({innerType:t,typeName:le.ZodNullable,...me(e)});var lo=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===z.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};lo.create=(t,e)=>new lo({innerType:t,typeName:le.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...me(e)});var Ao=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Na(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Wt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Ao.create=(t,e)=>new Ao({innerType:t,typeName:le.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...me(e)});var Pa=class extends Ce{_parse(e){if(this._getType(e)!==z.nan){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.nan,received:r.parsedType}),ie}return{status:"valid",value:e.data}}};Pa.create=t=>new Pa({typeName:le.ZodNaN,...me(t)});var Dq=Symbol("zod_brand"),Su=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},vu=class t extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ie:i.status==="dirty"?(n.dirty(),Ki(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ie:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:le.ZodPipeline})}},po=class extends Ce{_parse(e){let n=this._def.innerType._parse(e),r=s=>(Os(s)&&(s.value=Object.freeze(s.value)),s);return Na(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:le.ZodReadonly,...me(e)});function zx(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function t0(t,e={},n){return t?Vs.create().superRefine((r,s)=>{let i=t(r);if(i instanceof Promise)return i.then(a=>{if(!a){let c=zx(e,r),l=c.fatal??n??!0;s.addIssue({code:"custom",...c,fatal:l})}});if(!i){let a=zx(e,r),c=a.fatal??n??!0;s.addIssue({code:"custom",...a,fatal:c})}}):Vs.create()}var Nq={object:zt.lazycreate},le;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(le||(le={}));var Fq=(t,e={message:`Input not instance of ${t.name}`})=>t0(n=>n instanceof t,e),n0=$s.create,r0=Zi.create,Mq=Pa.create,_q=Xi.create,s0=eo.create,Uq=to.create,Lq=Ma.create,Pq=no.create,Oq=ro.create,$q=Vs.create,Vq=os.create,Gq=Xn.create,Hq=_a.create,jq=as.create,qq=zt.create,Yq=zt.strictCreate,Jq=so.create,Wq=Ld.create,zq=io.create,Kq=Br.create,Zq=Pd.create,Xq=Ua.create,eY=La.create,tY=Od.create,nY=oo.create,rY=ao.create,sY=co.create,iY=uo.create,oY=Gs.create,aY=Tn.create,cY=Rn.create,uY=wr.create,lY=Tn.createWithPreprocess,AY=vu.create,dY=()=>n0().optional(),pY=()=>r0().optional(),hY=()=>s0().optional(),fY={string:(t=>$s.create({...t,coerce:!0})),number:(t=>Zi.create({...t,coerce:!0})),boolean:(t=>eo.create({...t,coerce:!0})),bigint:(t=>Xi.create({...t,coerce:!0})),date:(t=>to.create({...t,coerce:!0}))};var gY=ie;function mY(t){return t.issues.map(e=>{let n=e.path.map(s=>typeof s=="number"?`[${s}]`:`.${s}`).join("").replace(/^\./,""),r=n||"output";if(!/^(Expected |Required$|Invalid |String must|Array must|Number must)/.test(e.message))return`${r} ${e.message}`;switch(e.code){case"invalid_type":return n?e.expected==="object"?`${r} must be an object`:e.received==="undefined"?`${r} is required`:`${r} must be ${e.expected}, got ${e.received}`:"output is not a JSON object";case"invalid_enum_value":{let s=JSON.stringify(e.received),i=e.options.find(c=>typeof c=="string"&&typeof e.received=="string"&&e.received.startsWith(c)),a=i?` \u2014 you sent ${s}; the value must be exactly ${JSON.stringify(i)}, with any qualifier moved to a field that takes free text`:` \u2014 you sent ${s}`;return`${r} must be one of: ${e.options.join(", ")}${a}`}case"invalid_literal":return`${r} must be ${JSON.stringify(e.expected)}`;case"too_small":return e.type==="string"?`${r} must be a non-empty string`:`${r} must have at least ${e.minimum} item(s)`;case"unrecognized_keys":return`${r} has unknown key(s): ${e.keys.join(", ")}`;default:return`${r}: ${e.message}`}})}function gn(t,e){let n=t.safeParse(e);if(n.success)return{value:n.data,errors:[]};let r=(i,a)=>a.reduce((c,l)=>c&&typeof c=="object"?c[l]:void 0,i),s=n.error.issues.filter(i=>i.path.length&&r(e,i.path)===null);if(s.length===n.error.issues.length)try{let i=t.safeParse(s.reduce((a,{path:c})=>i0(a,c),e));if(i.success)return{value:i.data,errors:[]}}catch{}return{errors:mY(n.error)}}function i0(t,e){if(!e.length||!t||typeof t!="object")return t;let[n,...r]=e,s=Array.isArray(t)?t.slice():{...t};return r.length?s[n]=i0(s[n],r):delete s[n],s}var W8=new Set(Object.values(Ps));var z8=u.object({checks:u.array(u.object({repository:u.string().optional(),name:u.string().min(1),headSha:u.string().regex(/^[0-9a-f]{40}$|^[0-9a-f]{64}$/i),status:u.string().default("completed"),conclusion:u.string().nullable().optional(),url:u.string().optional(),summary:u.string().optional()}))});var ku=["-c","core.fsmonitor=false"],EY=new Set(["GH_TOKEN","GITHUB_TOKEN","GH_ENTERPRISE_TOKEN","GITHUB_ENTERPRISE_TOKEN","ACTIONS_RUNTIME_TOKEN","ACTIONS_ID_TOKEN_REQUEST_TOKEN","ACTIONS_ID_TOKEN_REQUEST_URL","SYSTEM_ACCESSTOKEN","SYSTEM_OIDCREQUESTURI","SKYRAMP_MCP_GITHUB_TOKEN","SSH_AUTH_SOCK","GIT_SSH","GIT_SSH_COMMAND","GITHUB_STEP_SUMMARY"]),CY=new Set(["ANTHROPIC_API_KEY","ANTHROPIC_AUTH_TOKEN","CLAUDE_CODE_OAUTH_TOKEN","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","AWS_BEARER_TOKEN_BEDROCK","AWS_PROFILE","AWS_WEB_IDENTITY_TOKEN_FILE","AWS_ROLE_ARN","AWS_ROLE_SESSION_NAME","AWS_CONTAINER_CREDENTIALS_FULL_URI","AWS_CONTAINER_CREDENTIALS_RELATIVE_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"]);function Dn(t=process.env,e,n="repo-command"){let r={};for(let[s,i]of Object.entries(t))n==="repo-command"&&CY.has(s)||(r[s]=i);Object.assign(r,e??{});for(let s of Object.keys(r))(EY.has(s)||s.startsWith("INPUT_"))&&delete r[s];return r}var Oa=Re(require("path"));var i5=Oa.join(".skyramp","workspace.yml");var IY={py:"python",go:"go",java:"java",kt:"kotlin",rb:"ruby",cs:"csharp",ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",kts:"kotlin",rs:"rust",php:"php",scala:"scala",swift:"swift",ex:"elixir",exs:"elixir",dart:"dart",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",hh:"cpp",groovy:"groovy"};var o5=new Set(Object.values(IY));var Qr=(s=>(s.Clean="clean",s.RecipeDrift="recipe-drift",s.ChangeBrokeBringup="change-broke-bringup",s.BringupFailed="bringup-failed",s))(Qr||{}),Hs=u.string().trim().min(1),wY=u.object({url:u.string().optional().describe("the URL probed, if the check is an HTTP request"),command:u.string().optional().describe("the command run, if the check is a script \u2014 preferred when auth is needed"),headers:u.record(u.string()).optional(),status:u.union([u.number(),u.string()]).optional().describe("expected HTTP status for a url check (default 200)"),output:Hs.describe("what the check returned, VERBATIM \u2014 the bytes, nothing appended; this gate RE-RUNS the check")}),By=u.array(u.object({component:Hs.describe("a shared component listed above"),url:Hs.describe("the URL on the component's own origin (scheme, host and port) that answers with its deployed commit"),output:Hs.describe("what the URL returned, VERBATIM; this gate FETCHES each url")})).describe("only when shared components are listed above: one check per component whose deployed commit you found"),a0=u.object({schemaVersion:u.literal(1),baseUrls:u.record(u.string()).optional().describe("service \u2192 base URL of the running app; omit on a failed bring-up, never invent one"),health:wY.optional(),teardown:Hs.describe("command that tears the SUT down"),dependencies:u.record(u.boolean()).optional().describe("EVERY backing service: true = really deployed, false = mocked; REQUIRED when the app came up"),outcome:u.nativeEnum(Qr).describe("clean | recipe-drift (you corrected the recipe) | change-broke-bringup (the PR broke it) | bringup-failed (environment, not the PR)"),recipeFixes:u.array(u.string()).optional().describe("required when outcome is recipe-drift: what was corrected"),bringupError:u.object({command:Hs,output:Hs}).optional().describe("required when bring-up failed: the exact failing command and what it printed"),suspectFiles:u.array(u.string()).optional().describe("required for change-broke-bringup: files THIS PR changed that the failure points at, relative to your working directory (a file in another checkout of the run: its absolute path)"),seeded:u.boolean(),startedAt:Hs.describe("ISO timestamp"),revisions:By.optional()});var Ru=(n=>(n.Full="full",n.Static="static",n))(Ru||{}),js=(r=>(r.Contract="contract",r.Integration="integration",r.Ui="ui",r))(js||{}),xu=(i=>(i.OwnSurface="own_surface",i.StateReadBack="state_read_back",i.Referential="referential",i.Lifecycle="lifecycle",i.Boundaries="boundaries",i))(xu||{}),qs=(s=>(s.Update="update",s.Regenerate="regenerate",s.Delete="delete",s.Verify="verify",s))(qs||{}),$d=(A=>(A.Equals="equals",A.NotEquals="not_equals",A.GreaterThan="greater_than",A.LessThan="less_than",A.Contains="contains",A.NotContains="not_contains",A.Matches="matches",A.Absent="absent",A.Present="present",A))($d||{});var mn=u.string().trim().min(1),bY=u.object({subject:mn.describe('what the test READS: a response field path, the literal "status", or the on-screen text for a ui case \u2014 the FINAL read in a multi-step case'),comparator:u.nativeEnum($d),value:u.union([u.string(),u.number(),u.boolean(),u.null()]).optional().describe("the ONE value a broken build would not produce; OMIT for absent/present")}),SY=u.object({test:mn.describe("existing test path, relative to its repository"),repository:mn.optional().describe("owner/repo the test lives in, when the run has several checkouts; omit for the working checkout"),action:u.nativeEnum(qs),evidence:mn.describe("why \u2014 drift vs the diff, or a finding"),covers_behaviors:u.array(u.string()).optional().describe("analyze behavior ids this maintenance covers")});var vY=u.object({surface:mn.describe("a surface from the list, copied verbatim"),axis:u.nativeEnum(xu)}),kY=u.object({id:mn.describe("short-slug, unique across generate[]"),type:u.nativeEnum(js),target:mn.describe('"METHOD /path", or a business-flow name'),from_finding:u.string().optional().describe("analyze finding id this case catches"),from_behavior:u.string().optional().describe("analyze behavior id this case pins"),derived_from:vY.optional().describe("the surface \xD7 axis this case pins when no analyze behavior or finding names it \u2014 one of the three is required"),rationale:mn.describe("why this test matters"),expected_observable:mn.describe("one sentence for a human: what a catching test asserts, and what a broken build does instead"),expected:bY.describe("the same intent AS DATA \u2014 see the rules below"),seededPrecondition:mn.optional().describe("seeded non-initial state + how to reach it; only when a seeded-state transition applies"),verifiable:u.boolean().describe("true only when a live SUT could confirm this test (full mode)")}),RY=u.object({covered:u.array(u.string()).optional(),abstain:u.string().optional()}).superRefine((t,e)=>{let n=Array.isArray(t.covered),r=typeof t.abstain=="string";if(n===r)return void e.addIssue({code:u.ZodIssueCode.custom,message:"must have exactly one of covered[] or abstain"});n&&t.covered.length===0&&e.addIssue({code:u.ZodIssueCode.custom,path:["covered"],message:"must list at least one id (else abstain)"}),r&&!t.abstain.trim()&&e.addIssue({code:u.ZodIssueCode.custom,path:["abstain"],message:"must give a reason"})}).describe('{ "covered": [ids] } OR { "abstain": "reason" } \u2014 exactly one'),xY=u.object({surface:mn.describe("a surface from the list, copied verbatim"),axes:u.object(Object.fromEntries(Object.values(xu).map(t=>[t,RY])))}),c0=u.object({schemaVersion:u.literal(1),mode:u.nativeEnum(Ru),maintenance:u.array(SY),generate:u.array(kY),surfaces:u.array(xY).describe("one entry per changed surface in the list \u2014 none missing, none invented"),budget:u.object({total:u.number().describe("case count"),rationale:mn}),summary:mn.describe("one paragraph")});var ho=(n=>(n.Ready="ready",n.Blocked="blocked",n))(ho||{}),Je=u.string().trim().min(1),TY=u.object({action:u.enum(["start","run","wait"]),text:Je,source:u.enum(["file","notes","testbot"]).describe("file: a file in the repository; notes: the Target's notes; testbot: Testbot's own finding"),file:Je.nullable().describe("the file the step came from, relative to the component's repository; null unless source is file")}).strict().refine(t=>t.source==="file"==(t.file!==null),{path:["file"],message:"a file exactly when the step came from one"}),DY=/^[A-Za-z_][A-Za-z0-9_]*$/,$a=/^(?!GITHUB_)(?!SKYRAMP_RUNNER_)[A-Z][A-Z0-9_]{0,99}$/,Va=(a=>(a.VersionEndpoint="version_endpoint",a.DeployWorkflow="deploy_workflow",a.KubernetesLabels="kubernetes_labels",a.Command="command",a.Api="api",a.NotTracked="not_tracked",a))(Va||{}),Kt="shared",NY=Je.refine(t=>{try{let e=new URL(t);return["http:","https:"].includes(e.protocol)&&!e.username&&!e.password}catch{return!1}},"an http(s) URL with no login in it"),Ga=u.object({address:NY,readyWhen:Je.nullable(),credentials:u.array(u.string().regex($a)).max(50),revisionSources:u.array(u.object({method:u.nativeEnum(Va),detail:Je.describe("what Testbot reads, such as GET /version or the deploy workflow's name; for not_tracked, why nothing shows it"),components:u.array(Je).min(1).describe("the components it tells the revision of, by name")}).strict()).max(50)}).strict(),wy={steps:u.array(TY).max(20).optional().describe("how it starts, in order"),kind:u.enum(["web_app","service","database","external_service"]).optional(),from:u.object({file:Je,service:Je.nullable()}).strict().optional(),credentials:u.array(u.string().max(100).regex(DY)).max(50).optional().describe("the Target's credentials this component's recipe uses: a sign-in (a test user, password or token) or an API key, which the workflow supplies from a GitHub Actions secret as the environment variable of the credential's name; give each name exactly as the recipe reads it. Names only, never a value, and not a secret the recipe generates itself")},FY=u.object({name:Je,repository:Je.describe("owner/repo of the Target repository the component is built or started from, such as the one whose compose file starts its database"),healthy:u.boolean(),...wy,deployed:Je.nullable().optional().describe('only with "environment": the revision the component runs, as you read it from its revision source, or null when you could not tell')}),MY=u.object({component:Je,problem:Je,evidence:Je.describe("the exact command and output that shows it"),fix:Je.describe("what the user must provide, and where")}),_Y=u.object({framework:Je,file:Je.describe("the test file run, relative to its repository root"),result:u.enum(["pass","fail","error"])}),UY=u.object({input:Je.describe("the part of the user's SUT input, as given"),reason:Je}),u0=u.object({schemaVersion:u.literal(1),status:u.nativeEnum(ho).describe("ready only if every component came up healthy and the recipe is written"),components:u.array(FY),suites:u.array(_Y).default([]).describe("one run per test suite the Target's repositories have; empty when they have none"),inputsUsed:u.array(Je).default([]).describe("the parts of the user's SUT input the recipe used as given"),inputsUsedHow:u.array(u.object({input:Je.describe("exactly as written in inputsUsed; an entry that is not there is left out"),how:Je.describe("what the recipe did with it")})).optional(),inputsNotUsed:u.array(UY).default([]).describe("the parts it did not use, and why. A part that is wrong goes here, with what was wrong, even when the recipe does something like it instead: one that names a file, command, port, route or setting that does not exist or does not work"),blockers:u.array(MY).describe("required (non-empty) when status is blocked"),environment:Ga.optional().describe("only when the whole SUT is an existing deployment you tested where it runs, building and starting nothing: its address, what says it is ready, the credentials that reach it, and how to read what each component runs. Leave it out when any part was built or started on the runner, or reaching it needed something there (a tunnel, port-forward, proxy or client certificate)")});var Tu=64*1024,Du=512*1024,Qy=/[\u0000-\u0008\u000b\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;var l0=Re(require("path"));var vt=u.string().trim().min(1),by=(n=>(n.TestbotManaged="testbot_managed",n.CustomerDeployed="customer_deployed",n))(by||{}),Vd=[".skyramp/sut/setup.sh",".skyramp/sut/teardown.sh"],Sy=u.object({schemaVersion:u.literal(1),type:u.nativeEnum(by).optional(),status:u.enum(["ready","blocked"]),environment:Ga.optional(),components:u.array(u.object({name:vt,repository:vt.describe(`owner/repo, or "${Kt}" for a customer-deployed component no repository builds`),healthy:u.boolean(),url:u.string().min(1).nullable(),...wy,credentials:u.array(u.string().regex($a)).max(50).optional(),deployed:vt.nullable().optional().describe("customer_deployed only: the revision the component runs, as setup read it (WF-SETUP-22's Deployed now), or null when it could not tell")}).strict()),suites:u.array(u.object({framework:vt,file:vt,result:u.enum(["pass","fail","error"])}).strict()),inputsUsed:u.array(vt),inputsUsedHow:u.array(u.object({input:vt,how:vt}).strict()).optional(),inputsNotUsed:u.array(u.object({input:vt,reason:vt}).strict()),blockers:u.array(u.object({component:vt,problem:vt,evidence:vt,fix:vt}).strict()),replay:u.object({outcome:vt,durationSeconds:u.number().nonnegative().nullable()}).strict().nullable(),files:u.array(u.object({path:vt,content:u.string()}).strict())}).strict().superRefine((t,e)=>{t.inputsUsedHow?.forEach((s,i)=>{t.inputsUsed.includes(s.input)||e.addIssue({code:u.ZodIssueCode.custom,path:["inputsUsedHow",i,"input"],message:"not one of inputsUsed"})}),t.components.forEach((s,i)=>{s.credentials&&new Set(s.credentials).size!==s.credentials.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"credentials"],message:"names a credential twice"})});let n=t.type==="customer_deployed";n!==(t.environment!==void 0)&&e.addIssue({code:u.ZodIssueCode.custom,path:["environment"],message:"an environment exactly when the plan's type is customer_deployed"}),t.environment&&new Set(t.environment.credentials).size!==t.environment.credentials.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["environment","credentials"],message:"names a credential twice"});let r=new Set(t.components.map(s=>s.name));if(t.environment?.revisionSources.forEach((s,i)=>{s.components.forEach((a,c)=>{r.has(a)||e.addIssue({code:u.ZodIssueCode.custom,path:["environment","revisionSources",i,"components",c],message:"not one of components"})})}),t.components.forEach((s,i)=>{s.deployed!==void 0!==n&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"deployed"],message:"what a component runs exactly when the plan is customer_deployed"}),s.repository===Kt&&!n&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"repository"],message:`only a customer_deployed component is ${Kt}`})}),n&&(t.components.forEach((s,i)=>{t.components.findIndex(a=>a.name===s.name)!==i&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"name"],message:"names a component twice"})}),t.replay!==null&&e.addIssue({code:u.ZodIssueCode.custom,path:["replay"],message:"a customer_deployed plan is never replayed"}),t.files.forEach((s,i)=>{Vd.includes(s.path)&&e.addIssue({code:u.ZodIssueCode.custom,path:["files",i,"path"],message:"a customer_deployed plan has no script that starts or stops the system"})})),n&&t.status==="ready"){let s=new Set(t.environment?.revisionSources.flatMap(i=>i.components));t.components.forEach((i,a)=>{i.repository!==Kt&&!s.has(i.name)&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",a,"name"],message:"a ready customer_deployed plan reads what every component a repository builds runs"})})}});var I5=["clean","recipe-drift"];function Nu(t){let e=l0.posix.normalize(t);return e===t&&(e===".skyramp/workspace.yml"||e.startsWith(".skyramp/sut/")&&e.length>13)}var Mu=(n=>(n.GitHub="github",n.AzureDevOps="azure-devops",n))(Mu||{}),ky=(i=>(i.Trigger="TRIGGER",i.Baseline="BASELINE",i.AuthoritativeRelatedChange="AUTHORITATIVE_RELATED_CHANGE",i.ConfiguredSharedDependency="CONFIGURED_SHARED_DEPENDENCY",i.ManualOverride="MANUAL_OVERRIDE",i))(ky||{}),_u=(a=>(a.PullRequest="pull_request",a.ReadyForReview="ready_for_review",a.Schedule="schedule",a.Manual="manual",a.SutSetup="sut_setup",a.RevisionRead="revision_read",a))(_u||{}),LY=["sut_setup"],PY=["sut_setup","schedule","revision_read"];var jd=(e=>(e.PullRequest="pull_request",e))(jd||{}),Uu=(s=>(s.ModelProvider="model_provider",s.SutAccess="sut_access",s.Skyramp="skyramp",s.Other="other",s))(Uu||{});var qd=(i=>(i.ReportUploaded="report_uploaded",i.NoReport="no_report",i.Cancelled="cancelled",i.RecipeUploaded="recipe_uploaded",i.RevisionsUploaded="revisions_uploaded",i))(qd||{}),B0=(n=>(n.Running="running",n.Ended="ended",n))(B0||{}),Yd=(p=>(p.TimedOut="timed_out",p.AgentFailed="agent_failed",p.SetupFailed="setup_failed",p.CredentialMissing="credential_missing",p.RunnerLost="runner_lost",p.CheckoutFailed="checkout_failed",p.EnvironmentUnverified="environment_unverified",p.ModelProviderDenied="model_provider_denied",p.ModelProviderUnavailable="model_provider_unavailable",p.RunnerProviderNotReady="runner_provider_not_ready",p))(Yd||{}),Ry=(r=>(r.Onboard="onboard",r.Deploy="deploy",r.Recheck="recheck",r))(Ry||{}),xy=(n=>(n.Started="started",n.Finished="finished",n))(xy||{}),Ty=(r=>(r.Passed="passed",r.Failed="failed",r.Skipped="skipped",r))(Ty||{});var Dy=(r=>(r.ChooseCredential="choose_credential",r.FreeText="free_text",r.ChooseSource="choose_source",r))(Dy||{});var Jd=(r=>(r.Discover="discover",r.Start="start",r.Check="check",r))(Jd||{}),Wd=(s=>(s.ValidationPlan="validation_plan",s.TestEnvironment="test_environment",s.TestConditions="test_conditions",s.Tests="tests",s))(Wd||{}),Lu=(s=>(s.Found="found",s.Starting="starting",s.Up="up",s.OutOfScope="out_of_scope",s))(Lu||{}),er=u.string().regex(/^[1-9][0-9]{0,18}$/),br=u.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),ja=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,Lt=u.string().regex(ja),Pt=u.string().regex(/^[0-9a-f]{64}$/),Hd=u.object({id:Lt,revision:er}).strict(),zd={provider:u.literal("github"),providerAccountId:er,providerRepositoryId:er},Kd={provider:u.literal("azure-devops"),providerAccountId:Lt,providerRepositoryId:Lt},tr=u.discriminatedUnion("provider",[u.object(zd).strict(),u.object(Kd).strict()]),Ny=u.discriminatedUnion("provider",[u.object(zd).passthrough(),u.object(Kd).passthrough()]),fo=t=>`${t.provider}:${t.providerRepositoryId}`,A0={namespace:u.string().min(1),name:u.string().min(1)},w0=u.discriminatedUnion("provider",[u.object({...zd,...A0}).strict(),u.object({...Kd,...A0}).strict()]),d0=u.object({ref:u.string().min(1),revision:br}).strict(),OY=u.object({repository:w0,revision:br,ref:u.string().nullable(),reason:u.nativeEnum(ky),change:u.object({kind:u.nativeEnum(jd),number:er,base:d0.optional()}).strict().nullable(),compareWith:d0.optional()}).strict();function $Y(t){if(t.trigger.kind==="revision_read"!=!t.baseline)return t.baseline?"a revision_read run names no baseline":"names its baseline";if(!t.baseline)return null;let{confirmedRunId:e,initialBaselineId:n,sources:r}=t.baseline;if(e!==null&&n!==void 0)return"a run compares with one baseline";let s=t.trigger.kind==="schedule"&&e!==null||n!==void 0;if(!r)return s?"names every source of the snapshot, once":null;if(e===null&&n===void 0)return"a run with no Confirmed Baseline names no baseline sources";let i=new Set(t.sources.map(l=>fo(l.repository))),a=new Set(r.map(l=>fo(l.repository)));return a.size===r.length&&a.size===i.size&&[...a].every(l=>i.has(l))?null:"names every source of the snapshot, once"}var Q0=/^[A-Z][A-Z0-9_]+-[1-9][0-9]*$/,b0=/^[1-9][0-9]{0,18}$/,p0=new RegExp(`${Q0.source}|${b0.source}`),h0=/^https:\/\/[a-z0-9-]+(\.[a-z0-9-]+)+$/,VY=u.union([u.object({source:u.literal("jira"),site:u.string().regex(h0),key:u.string().regex(Q0),updated:u.string().datetime(),contentHash:Pt}).strict(),u.object({source:u.literal("confluence"),site:u.string().regex(h0),key:u.string().regex(b0),version:u.number().int().positive(),contentHash:Pt}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Sd),contentHash:Pt}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Eu),contentHash:Pt,fileName:u.string().min(1).max(255),mediaType:u.nativeEnum(Cu)}).strict()]),f0=u.union([u.literal("jira"),u.literal("confluence")]),GY=u.object({schemaVersion:u.literal(1),items:u.array(u.union([u.object({source:f0,site:u.string(),key:u.string().regex(p0),state:u.literal("read"),text:u.string(),version:u.string().min(1),contentMatches:u.boolean()}).strict(),u.object({source:f0,site:u.string(),key:u.string().regex(p0),state:u.literal("not_read"),reason:u.nativeEnum(Wi)}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Sd),state:u.literal("read"),text:u.string(),version:u.string().min(1),contentMatches:u.boolean()}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Sd),state:u.literal("not_read"),reason:u.nativeEnum(Wi)}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Eu),state:u.literal("read"),version:Pt,fileName:u.string().min(1).max(255),mediaType:u.nativeEnum(Cu)}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Eu),state:u.literal("not_read"),reason:u.nativeEnum(Wi)}).strict()])),instructions:u.array(u.string()).optional()}).strict(),HY=u.object({schemaVersion:u.literal(1),runId:Lt,skyrampOrgId:Lt,target:Hd,policy:Hd.nullable(),trigger:u.object({kind:u.nativeEnum(_u),requestedAt:u.string().datetime()}).strict(),configuration:u.object({captureId:Lt,revision:er.nullable(),hash:Pt}).strict(),baseline:u.object({confirmedRunId:Lt.nullable(),initialBaselineId:Lt.optional(),sources:u.array(u.object({repository:tr,revision:br}).strict()).optional()}).strict().optional(),sources:u.array(OY).min(1),execution:u.object({provider:u.nativeEnum(Mu),repository:w0,workflowPath:u.string(),ref:u.string()}).strict(),credentials:u.array(u.object({name:u.string(),purpose:u.nativeEnum(Uu),required:u.boolean()}).strict()),requirements:u.array(VY).min(1).optional(),instructions:u.object({contentHash:Pt}).strict().optional(),deployedRevisions:u.array(u.object({repository:tr,revision:br}).strict()).min(1).optional()}).strict().superRefine((t,e)=>{let n=new Set;(t.requirements??[]).forEach((l,A)=>{let p="fileName"in l?"file":"pasted";l.source==="other"&&l.key!==`${p}-${l.contentHash.slice(0,16)}`&&e.addIssue({code:u.ZodIssueCode.custom,message:"is not the key of its content hash",path:["requirements",A,"key"]});let h=my({source:l.source,key:l.key});n.has(h)&&e.addIssue({code:u.ZodIssueCode.custom,message:"names an item that the run already names",path:["requirements",A,"key"]}),n.add(h)});let r=t.trigger.kind,s=LY.includes(r);s!==(t.policy===null)&&e.addIssue({code:u.ZodIssueCode.custom,path:["policy"],message:s?`a ${r} run has no policy`:"names the policy revision"});let i=$Y(t);i&&e.addIssue({code:u.ZodIssueCode.custom,path:t.baseline?["baseline","sources"]:["baseline"],message:i}),PY.includes(r)&&t.sources.forEach((l,A)=>{l.reason!=="BASELINE"&&e.addIssue({code:u.ZodIssueCode.custom,path:["sources",A,"reason"],message:`a ${r} run selects only BASELINE sources`})}),t.deployedRevisions&&r!=="manual"&&e.addIssue({code:u.ZodIssueCode.custom,path:["deployedRevisions"],message:"only a manual run pins deployed revisions"});let a=new Set(t.sources.map(l=>fo(l.repository))),c=new Set;(t.deployedRevisions??[]).forEach((l,A)=>{let p=fo(l.repository);a.has(p)?c.has(p)&&e.addIssue({code:u.ZodIssueCode.custom,path:["deployedRevisions",A,"repository"],message:"repository appears twice"}):e.addIssue({code:u.ZodIssueCode.custom,path:["deployedRevisions",A,"repository"],message:"names a repository outside the snapshot"}),c.add(p)}),t.sources.forEach((l,A)=>{l.compareWith&&(l.reason!=="MANUAL_OVERRIDE"||l.change)&&e.addIssue({code:u.ZodIssueCode.custom,path:["sources",A,"compareWith"],message:"only a MANUAL_OVERRIDE source without a change names a revision to compare with"})})});var S0=(n=>(n.Person="person",n.Policy="policy",n))(S0||{}),jY=u.object({kind:u.nativeEnum(S0),name:u.string().min(1).max(256)}).strict(),qY=u.object({mcp:u.discriminatedUnion("source",[u.object({source:u.literal("npm"),version:u.string().regex(/^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/).nullable()}).strict(),u.object({source:u.literal("github"),ref:u.string().regex(/^[A-Za-z0-9._/-]{1,255}$/)}).strict()]),bedrock:u.object({region:u.string().regex(/^[a-z]{2}(-[a-z]+)+-[0-9]$/),roleArn:u.string().regex(/^arn:aws(-[a-z]+)*:iam::[0-9]{12}:role\/[\w+=,.@/-]{1,512}$/)}).strict().nullable()}).strict(),k5=u.object({schemaVersion:u.literal(1),attempt:u.object({id:Lt,number:u.number().int().positive(),deadlineAt:u.string().datetime()}).strict(),manifest:HY,manifestHash:Pt,entitlements:u.array(u.string()).optional(),runToken:u.string().min(1).optional(),requestedBy:jY.nullable().optional(),writeAllowed:u.boolean().optional(),claudeCodeVersion:u.string().regex(/^[0-9]+\.[0-9]+\.[0-9]+$/,"an exact version, such as 2.1.290").nullable().optional(),deployedRevisions:u.array(u.object({repository:tr,revision:br}).strict()).optional(),statedRevisions:u.array(u.object({repository:tr,revision:br}).strict()).optional(),runSettings:qY.optional()}).strict(),g0={providerRunAttempt:u.number().int().positive(),workflowRef:u.string().min(1)},YY=u.string().regex(/^[^/]+\/[^/]+\/[1-9][0-9]{0,15}\/[1-9][0-9]{0,15}$/),R5=u.object({schemaVersion:u.literal(1),runId:Lt,execution:u.discriminatedUnion("provider",[u.object({...g0,provider:u.literal("github"),repository:u.object(zd).strict(),providerRunId:er}).strict(),u.object({...g0,provider:u.literal("azure-devops"),repository:u.object(Kd).strict(),providerRunId:YY}).strict()]),requester:u.literal(!0).optional(),writeCheck:u.literal(!0).optional(),claudeCodePin:u.literal(!0).optional(),deployedPins:u.literal(!0).optional(),statedPins:u.literal(!0).optional(),runSettings:u.literal(!0).optional()}).strict(),m0=u.object({repository:tr,number:er,commitSha:br.optional()}).strict(),JY=u.discriminatedUnion("status",[u.object({status:u.literal("none")}).strict(),u.object({status:u.literal("delivered"),pullRequests:u.array(m0).min(1)}).strict(),u.object({status:u.literal("partial"),pullRequests:u.array(m0).min(1),failures:u.array(u.object({repository:tr,message:u.string()}).strict()).min(1)}).strict(),u.object({status:u.literal("failed"),message:u.string()}).strict()]),WY=u.object({blockedPreflight:u.object({file:u.string().min(1),repository:u.string().min(1).optional(),reason:u.string().min(1).max(300),evidence:u.string().min(1).max(400)}).strict().optional(),sufficiency:u.nativeEnum(zi),rationale:u.string().min(1),gaps:u.array(u.string().min(1)),acceptedEvidence:u.array(u.object({kind:u.nativeEnum(Ps),repository:u.string().min(1),revision:br,reference:u.string().min(1),summary:u.string().min(1)}).strict()),actionRequired:u.array(u.nativeEnum(xa))}).strict().superRefine((t,e)=>{t.sufficiency==="insufficient"!=t.gaps.length>0&&e.addIssue({code:u.ZodIssueCode.custom,path:["gaps"],message:"only insufficient evidence names gaps, and it names at least one"}),new Set(t.actionRequired).size!==t.actionRequired.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["actionRequired"],message:"a reason appears twice"})}),Gd=500,v0=2048,k0=1e3,zY=/[\\/:*?"<>|;#$*{},+=[\]%\p{Cc}\p{Cf}]/u,y0=t=>t.length>0&&t.length<=64&&t===t.trim()&&!zY.test(t)&&!/[^\S ]/u.test(t)&&!/^[._]/.test(t)&&!t.endsWith("."),KY=t=>{if(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/.test(t))return!0;let[e,n,r,...s]=t.split("/");return t.length<=201&&s.length===0&&r!==void 0&&/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,48}[A-Za-z0-9])?$/.test(e)&&y0(n)&&y0(r)},ZY=u.object({testResults:u.array(u.object({resultId:u.string().regex(/^[^\u0000-\u001f]{1,512}$/),repository:u.string().refine(KY,"Invalid"),testType:u.string(),endpoint:u.string(),status:u.enum(["Pass","Fail","Skipped"]),details:u.string(),fileName:u.string().optional(),testId:u.string().regex(/^[^\u0000-\u001f]{1,512}$/).optional(),failureCause:u.object({kind:u.nativeEnum(kd),family:u.nativeEnum(Rd).optional()}).strict().optional(),origin:u.nativeEnum(vd).optional()}).strict()),validation:WY,changes:u.array(u.object({id:u.string().min(1).max(512),text:u.string().max(16384),source:u.string().max(v0),testedBy:u.array(u.string().min(1).max(1024)).max(Gd),writtenBy:u.array(u.string().min(1).max(1024)).max(Gd),maintainedBy:u.array(u.string().min(1).max(1024)).max(Gd)}).strict()).max(k0).optional(),traceVersion:u.literal(1)}).passthrough().superRefine((t,e)=>{let n=new Set;t.testResults.forEach((r,s)=>{let i=r.failureCause;i&&r.status==="Pass"&&e.addIssue({code:u.ZodIssueCode.custom,path:["testResults",s,"failureCause"],message:"a passing result has no failure cause"}),i&&i.kind==="environment"!=(i.family!==void 0)&&e.addIssue({code:u.ZodIssueCode.custom,path:["testResults",s,"failureCause"],message:"an environment cause names its family, and no other cause does"});let a=["testResults",s,"resultId"],c=r.resultId.slice(`${r.repository}:${r.testType}:`.length);(!r.resultId.startsWith(`${r.repository}:${r.testType}:`)||c===""||c.startsWith("/")||c.startsWith("#"))&&e.addIssue({code:u.ZodIssueCode.custom,path:a,message:"is not repository:testType:path for this result"}),n.has(r.resultId)&&e.addIssue({code:u.ZodIssueCode.custom,path:a,message:"stable identity repeated"}),n.add(r.resultId)})});var R0=50,E0=u.string().regex(/^(?!.*\.\.)(?!\/)(?!.*\/$)[A-Za-z0-9._/-]{1,255}$/),x0=u.discriminatedUnion("kind",[u.object({kind:u.literal("branch_pushed"),repository:tr,branch:E0,commit:br}).strict(),u.object({kind:u.enum(["pull_request_opened","pull_request_edited"]),repository:tr,number:er,branch:E0}).strict()]),XY=u.object({schemaVersion:u.literal(1),run:u.object({runId:Lt,attemptNumber:u.number().int().positive(),manifestHash:Pt}).strict(),target:Hd,policy:Hd,provenance:u.object({sources:u.array(u.object({repository:tr,revision:br}).strict()),firstQualification:u.literal(!0).optional()}).strict(),delivery:u.object({generatedTests:JY}).strict(),producer:u.object({testbot:u.string().regex(/^[0-9A-Za-z.+-]{1,64}$/),mcp:u.string().regex(/^[0-9A-Za-z.+-]{1,64}$/)}).strict(),report:ZY,githubWrites:u.array(x0).max(R0).optional()}).strict(),x5=XY.pick({schemaVersion:!0,run:!0,target:!0,provenance:!0,producer:!0}).extend({recipe:Sy}).strict().superRefine(({recipe:t},e)=>{let n=(i,a)=>e.addIssue({code:u.ZodIssueCode.custom,path:["recipe",...i],message:a});t.status==="blocked"&&t.blockers.length===0&&n(["blockers"],"a blocked recipe names at least one blocker");let r=new Set,s=0;t.files.forEach((i,a)=>{Nu(i.path)||n(["files",a,"path"],"is not .skyramp/workspace.yml or a file under .skyramp/sut/"),r.has(i.path)&&n(["files",a,"path"],"file repeated"),r.add(i.path),Qy.test(i.content)&&n(["files",a,"content"],"is not text");let c=Buffer.byteLength(i.content,"utf8");s+=c,c>Tu&&n(["files",a,"content"],`larger than ${Tu} bytes`)}),s>Du&&n(["files"],`recipe text over ${Du} bytes in total`)}),T5=u.object({components:u.array(u.object({name:u.string().min(1),repository:u.string().regex(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/),observedRevision:u.string().regex(/^[0-9a-f]{7,64}$/).nullable(),source:u.nativeEnum(xd),evidence:u.string()}).strict().refine(t=>t.source!=="agent"||t.observedRevision===null,{path:["observedRevision"],message:"a component only an agent session can read names no revision"}))}).strict();var eJ=u.object({schemaVersion:u.literal(1),stage:u.nativeEnum(Ry),event:u.nativeEnum(xy),status:u.nativeEnum(Ty).optional()}).strict().refine(t=>t.status===void 0||t.event==="finished",{path:["status"],message:"only a finished stage has a status"}),qa=100,Fy=5e3,Fu=2e3,vy=100,My=/^[A-Za-z0-9_-]{1,64}$/,T0=20,D0=200,N0=100,F0=100,tJ=200,C0="[^/\\s](?:(?:[^/\\s]| )*[^/\\s])?",nJ=new RegExp(`^(?:[^/\\s]+/[^/\\s]+|[^/\\s]+/${C0}/${C0})$`),M0=500,_0=50,Pu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Nn=t=>u.string().max(t).refine(e=>e.trim().length>0&&!Pu.test(e),"blank, or not text"),cs={sequence:u.number().int().min(1).max(Fy),at:u.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?Z$/)},U0=u.discriminatedUnion("kind",[u.object({...cs,kind:u.literal("log"),phase:u.nativeEnum(Jd),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("component"),name:Nn(vy),repository:Nn(tJ).refine(t=>nJ.test(t)||t===Kt,"not owner/name"),file:Nn(M0).nullable(),status:u.nativeEnum(Lu),version:Nn(F0).optional()}).strict(),u.object({...cs,kind:u.literal("reply"),to:u.string().uuid(),accepted:u.boolean(),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("question"),id:u.string().regex(My),type:u.nativeEnum(Dy),text:Nn(Fu),component:Nn(vy).nullable(),choices:u.array(Nn(D0)).max(T0),placeholder:Nn(N0).optional()}).strict(),u.object({...cs,kind:u.literal("delivered"),ids:u.array(u.string().uuid()).max(qa)}).strict(),u.object({...cs,kind:u.literal("credentials"),names:u.array(u.string().regex($a)).min(1).max(_0)}).strict()]).superRefine((t,e)=>{t.kind==="credentials"&&new Set(t.names).size!==t.names.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["names"],message:"a name twice"}),t.kind==="question"&&(t.type==="free_text"!=(t.choices.length===0)&&e.addIssue({code:u.ZodIssueCode.custom,path:["choices"],message:"choices exactly when the question is not free_text"}),new Set(t.choices).size!==t.choices.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["choices"],message:"a choice twice"}))}),rJ=u.object({schemaVersion:u.literal(1),events:u.array(U0).max(qa)}).strict(),L0=u.discriminatedUnion("kind",[u.object({...cs,kind:u.literal("log"),stage:u.nativeEnum(Wd),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("reply"),to:u.string().uuid(),accepted:u.boolean(),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("delivered"),ids:u.array(u.string().uuid()).max(qa)}).strict()]),sJ=u.object({schemaVersion:u.literal(1),events:u.array(L0).max(qa)}).strict(),I0={id:u.string().uuid(),text:u.string(),by:u.string().nullable(),at:u.string(),replied:u.literal(!0).optional()},P0=u.discriminatedUnion("kind",[u.object({...I0,kind:u.literal("instruction"),question:u.null()}),u.object({...I0,kind:u.literal("answer"),question:u.string().regex(My)})]),O0=u.string().regex(/^[A-Za-z0-9+/]{43}=$/),iJ=u.object({id:u.string().uuid(),revision:u.string(),by:u.string().nullable(),at:u.string(),target:u.string(),own:u.object({source:u.enum(["policy","test_environment"]),text:u.string()}).nullable()}),oJ=u.object({schemaVersion:u.literal(1),leftOut:u.array(u.string()),messages:u.array(P0).optional(),stop:u.object({key:O0}).optional(),notes:iJ.optional()}),aJ=u.object({schemaVersion:u.literal(1),messages:u.array(P0).optional()});var $0=500*1024*1024,V0=u.object({id:er,name:u.string().regex(/^[A-Za-z0-9._-]{1,200}$/),providerRunId:er,expiresAt:u.string().datetime()}).strict(),cJ=u.object({schemaVersion:u.literal(1),artifact:V0,sessionId:Lt,contentHash:Pt,bytes:u.number().int().min(1).max($0)}).strict(),uJ=u.object({schemaVersion:u.literal(1),checkpoint:u.object({artifact:V0,repository:u.object({namespace:u.string().min(1),name:u.string().min(1)}).strict(),sessionId:Lt,contentHash:Pt,key:O0}).strict().nullable()}).strict(),lJ=200,Ha=100,_y=(r=>(r.Resume="resume",r.Retry="retry",r.Update="update",r))(_y||{}),AJ=u.object({kind:u.nativeEnum(_y),setup:u.object({runId:Lt,endedAt:u.string().nullable(),outcome:u.string().nullable()}).strict(),components:u.array(u.object({name:u.string().min(1),repository:u.string().min(1),status:u.nativeEnum(Lu)}).strict()).max(Ha),credentials:u.array(u.string().min(1)).max(Ha),answers:u.array(u.object({question:u.string(),answer:u.string().nullable()}).strict()).max(Ha),instructions:u.array(u.object({text:u.string(),reply:u.string().nullable()}).strict()).max(Ha),log:u.array(u.object({phase:u.nativeEnum(Jd),text:u.string()}).strict()).max(lJ),recipe:u.object({files:u.array(u.object({path:u.string().min(1),content:u.string()}).strict()).max(Ha),blockers:u.array(u.object({component:u.string(),problem:u.string(),evidence:u.string(),fix:u.string()}).strict()).max(Ha)}).strict().optional()}).strict(),dJ=u.object({schemaVersion:u.literal(1),context:AJ.nullable()}).strict(),pJ=u.object({schemaVersion:u.literal(1),configuration:u.object({captureId:Lt,revision:er.nullable(),hash:Pt}).strict(),capture:u.object({schemaVersion:u.literal(1),settings:u.object({target:u.object({environment:u.unknown()}).passthrough(),timeoutMinutes:u.number().int().positive(),answerWaitMinutes:u.number().int().positive().optional(),testEnvironment:u.object({name:u.string().min(1),address:u.string().min(1).optional(),readyWhen:u.string().min(1).optional()}).passthrough().optional()}).passthrough(),provenance:u.object({}).passthrough(),hash:Pt}).strict()}).strict(),hJ=Ga.extend({version:u.number().int().positive(),components:u.array(u.object({name:u.string().min(1),repository:u.string().min(1)}).strict()),contentHash:Pt.optional(),files:u.array(u.object({path:u.string().refine(t=>Nu(t)&&!Vd.includes(t),"not a file of a customer_deployed plan"),content:u.string()}).strict()).optional()}).strict(),fJ=u.object({schemaVersion:u.literal(1),testEnvironment:hJ.nullable().optional(),runtimePlan:u.object({version:u.number().int().positive(),contentHash:Pt,files:u.array(u.object({path:u.string().refine(Nu,"not a recipe file path"),content:u.string()}).strict()).min(1),recipe:u.record(u.unknown()).optional()}).strict().nullable()}).strict().refine(t=>!(t.runtimePlan&&t.testEnvironment),{message:"a run pins a recipe or a customer's Test Environment, never both",path:["testEnvironment"]}),gJ=u.object({schemaVersion:u.literal(1),state:u.nativeEnum(B0),ending:u.nativeEnum(qd).nullable(),cause:u.nativeEnum(Yd).nullable(),deadlineAt:u.string().datetime()}).strict();function G0(t){return t.reportUploaded?{schemaVersion:1,reason:"report_uploaded",cause:null}:t.recipeUploaded?{schemaVersion:1,reason:"recipe_uploaded",cause:null}:t.revisionsUploaded?{schemaVersion:1,reason:"revisions_uploaded",cause:null}:t.cancelled?{schemaVersion:1,reason:"cancelled",cause:null}:{schemaVersion:1,reason:"no_report",cause:mJ(t)}}function mJ(t){return t.runnerProviderNotReady?"runner_provider_not_ready":t.credentialMissing?"credential_missing":t.checkoutFailed?"checkout_failed":t.environmentUnverified?"environment_unverified":t.setupFailed?"setup_failed":t.timedOut?"timed_out":t.modelProviderDenied?"model_provider_denied":t.modelProviderUnavailable?"model_provider_unavailable":"agent_failed"}var H0=".skyramp/sut/deployed-revisions.sh",Uy=(n=>(n.Running="running",n.Requested="requested",n))(Uy||{});var U5=new Set(Object.values(Uy));var L5=`Fix ${H0} so it prints the full commit each component runs, then set it up again.`;var Xd="shared-environment";var z5=64*1024;var K5=new Set(["version_endpoint","api"]);function ep(t){return(t?.components??[]).filter(e=>!!e.repository&&!!e.expectedRevision)}function j0(t){return ep(t).length>0||(t?.dependencies.length??0)>0}function q0(t){let e=t.inputs?.sharedEnvironment;if(!j0(e))return;let n=Ut(t,`${Xd}.json`);if(n)return{components:CJ(e,n.components),dependencies:n.dependencies};let r="Not checked: the run ended before it checked the shared environment.";return{components:ep(e).map(s=>Y0(s,r)),dependencies:e.dependencies.map(s=>({name:s.name,url:s.url,version:null,evidence:r}))}}var Y0=(t,e)=>({name:t.name,repository:t.repository,url:t.url,expectedRevision:t.expectedRevision,observedRevision:null,status:"unverifiable",source:t.revisionUrl||t.revisionScript?"probe":"agent",evidence:e});function CJ(t,e){let n=new Set(e.map(s=>s.name.toLowerCase())),r=ep(t).filter(s=>s.touched&&!n.has(s.name.toLowerCase()));return[...e,...r.map(s=>Y0(s,"Not checked: the run recorded no read of it."))]}function Py(t){return(q0(t)?.components??[]).filter(e=>e.status!=="verified")}function Oy(t){return(t?.components??[]).filter(e=>!!e.repository&&!e.expectedRevision)}function $y(t){return Vy(t)&&Py(t).length===0&&Oy(t.inputs?.sharedEnvironment).length===0}function Vy(t){let e=bJ(t);if(!e&&t.state.stages.deploy?.status!=="passed")return!1;let n=Ut(t,"deploy.json");return n?n.outcome==="clean"||n.outcome==="recipe-drift":!e}function bJ(t){let e=t.state.stages.plan,n=t.state.stages.deploy;return!(t.inputs?.pipeline?t.inputs.pipeline==="two-step":!n)||e?.status!=="passed"?!1:!n||n.updatedAt<=e.updatedAt}var go=(a=>(a.Place="place",a.Update="update",a.Regenerate="regenerate",a.Delete="delete",a.Verify="verify",a.None="none",a))(go||{}),Mn=(r=>(r.Pass="pass",r.Fail="fail",r.Skip="skip",r))(Mn||{}),Fn=u.string().trim().min(1),z0=u.object({case:Fn.describe("a covers id \u2014 the recommend case this test realizes"),status:u.nativeEnum(Mn)}),K0=u.object({exit:u.number({invalid_type_error:"must be a number or null"}).nullable().describe("process exit of the re-run; null when no SUT was available"),details:u.string().optional().describe("what failed, or why a file was not run \u2014 required on any non-zero exit"),tests:u.array(z0).optional().describe("ONE ENTRY PER CASE the file covers; must agree with exit (0 \u2192 no fail; non-zero \u2192 at least one)")}),Z0=u.object({from:u.string().optional().describe("staged path \u2014 required for placements"),file:Fn.describe("final path relative to its repository, inside that checkout, with a source-file extension"),repository:Fn.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),action:u.nativeEnum(go),covers:u.array(u.string()).optional().describe("recommend ids a placed test covers"),repro:u.boolean().optional().describe("this test is MEANT to fail \u2014 it reproduces a reported bug"),finding:u.boolean().optional().describe("a non-repro test that failed on a REAL product bug"),placementBroken:u.boolean().optional().describe('placement/harness problem one repair could not fix \u2014 every reran.tests entry is then "skip"'),keptReason:Fn.optional().describe("why a planned delete/regenerate was declined and the file kept"),isolatedRun:Fn.optional().describe('only for a test marked "runs alone": the command, from its checkout root and without a shell, that runs only this file and writes its JUnit XML into $SKYRAMP_RESULTS_DIR (named by its path: no shell expands it) \u2014 the harness runs it, so leave reran.exit null'),reran:K0,assertionCount:u.number().int().nonnegative().optional().describe("[derived] assertions reachable from the file, counted at write time")}).refine(t=>t.action!=="place"||typeof t.from=="string"&&t.from.trim().length>0,{message:'is a place but has no "from" staged path',path:[]}),X0=(n=>(n.Junit="junit",n.Converter="converter",n))(X0||{}),SJ=Fn.optional().describe("the items[].file this test is in \u2014 needed only when two of this suite's files cover the same case id"),vJ=u.object({results:Fn.describe("the JUnit XML file this run wrote, a plain file name inside $SKYRAMP_RESULTS_DIR (e.g. backend.xml)"),source:u.nativeEnum(X0),run:Fn.describe("the command you ran that wrote it, exactly as you ran it (with any converter)"),files:u.array(Fn).min(1).describe("the items[].file paths this run covered"),cases:u.array(u.object({test:Fn.describe("the test's name as the runner reports it, qualified by its class or file (e.g. tests/test_a.py::test_x) when the bare name repeats"),case:Fn.describe("the covers id it realizes"),file:SJ})).describe("map each reported test name to the case it covers")}),kJ=u.object({suites:u.array(vJ).min(1)}),Gy=u.object({schemaVersion:u.literal(1),items:u.array(Z0),runnerResults:kJ.optional().describe("the JUnit XML your test runs wrote into $SKYRAMP_RESULTS_DIR, so the harness reads each test's result from the runner \u2014 omit only when no SUT is available"),ignored:u.array(u.string()).describe("existing tests assessed and deliberately left untouched"),summary:Fn.describe("one paragraph")});var FX=10*6e4;var mo=Re(require("fs"));function tT(t){let e=[];for(let n of FJ(t)){let r=n;r?.type==="tool_use"&&typeof r.name=="string"&&e.push(r.name)}return e}function nT(t){return tT(t).some(e=>/^mcp__skyramp__skyramp_(contract|integration)_test_generation$/.test(e))}function rT(t){return tT(t).some(e=>e==="mcp__skyramp__skyramp_ui_test_generation")}function NJ(t){if(!mo.existsSync(t))return{};for(let e of mo.readFileSync(t,"utf-8").split(`
116
+ `:""}return hy.dump=E,hy}var Ex;function Xj(){if(Ex)return bt;Ex=1;let t=Kj(),e=Zj();function n(r,s){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return bt.Type=_t(),bt.Schema=Cx(),bt.FAILSAFE_SCHEMA=Qx(),bt.JSON_SCHEMA=Rx(),bt.CORE_SCHEMA=xx(),bt.DEFAULT_SCHEMA=fy(),bt.load=t.load,bt.loadAll=t.loadAll,bt.dump=e.dump,bt.YAMLException=mu(),bt.types={binary:Nx(),float:kx(),map:wx(),null:bx(),pairs:Mx(),set:_x(),timestamp:Tx(),bool:Sx(),int:vx(),merge:Dx(),omap:Fx(),seq:Bx(),str:Ix()},bt.safeLoad=n("safeLoad","load"),bt.safeLoadAll=n("safeLoadAll","loadAll"),bt.safeDump=n("safeDump","dump"),bt}var eq=Xj(),tq=Wj(eq),{Type:U4,Schema:L4,FAILSAFE_SCHEMA:P4,JSON_SCHEMA:Ux,CORE_SCHEMA:O4,DEFAULT_SCHEMA:$4,load:yu,loadAll:nq,dump:V4,YAMLException:G4,types:H4,safeLoad:j4,safeLoadAll:q4,safeDump:Y4}=tq;var ns=t=>typeof t=="string"?t:void 0;function Px(t){let e={services:[]},n;try{let l=Lx.readFileSync(t,"utf8");n=yu(l,{schema:Ux})}catch(l){return Pe(`Lenient parse: failed to read/parse ${t}: ${l.message}`),e}if(!n||typeof n!="object"||Array.isArray(n))return Pe(`Lenient parse: ${t} did not contain a YAML object`),e;let r=n,s=r.metadata&&typeof r.metadata=="object"?r.metadata:void 0,i=s?{executorVersion:ns(s.executorVersion),mcpVersion:ns(s.mcpVersion)}:void 0,c=(Array.isArray(r.services)?r.services:[]).reduce((l,A,p)=>{if(!A||typeof A!="object"||Array.isArray(A))return Pe(`Lenient parse: services[${p}] is not an object \u2014 skipping`),l;let h=A,g=ns(h.serviceName);if(!g)return Pe(`Lenient parse: services[${p}] missing or non-string serviceName \u2014 skipping`),l;let C=h.api&&typeof h.api=="object"?h.api:void 0,S=h.runtimeDetails&&typeof h.runtimeDetails=="object"?h.runtimeDetails:void 0;return l.push({serviceName:g,language:ns(h.language),framework:ns(h.framework),testDirectory:ns(h.testDirectory),api:C?{baseUrl:ns(C.baseUrl)}:void 0,runtimeDetails:S?{serverStartCommand:ns(S.serverStartCommand),serverTeardownCommand:ns(S.serverTeardownCommand)}:void 0}),l},[]);return{metadata:i,services:c}}async function $x(t){let e=Ox.resolve(t.workingDirectory),n=new Bd(e),r=[],s=t.targetSetupCommand,i=t.targetTeardownCommand,a=t.skyrampExecutorVersion,c=t.skyrampMcpVersion;if(await n.exists()){Qn(`Found ${n.getConfigPath()}, loading workspace configuration...`);try{let A;try{A=await n.read()}catch(h){Pe(`${n.getConfigPath()} failed strict validation: ${h.message}. Re-reading with per-field lenient parse \u2014 invalid fields will fall back to action input defaults.`),A=Px(n.getConfigPath())}A.metadata&&(!a&&A.metadata.executorVersion&&(a=A.metadata.executorVersion),!c&&A.metadata.mcpVersion&&(c=A.metadata.mcpVersion));for(let h of A.services??[])r.push({serviceName:h.serviceName,language:h.language,framework:h.framework,baseUrl:h.api?.baseUrl,testDirectory:h.testDirectory});let p=(A.services??[])[0];if(p){!s&&p.runtimeDetails?.serverStartCommand&&(s=p.runtimeDetails.serverStartCommand);let h=p.runtimeDetails?.serverTeardownCommand;!i&&typeof h=="string"&&(i=h)}}catch(A){Pe(`Failed to parse ${n.getConfigPath()}: ${A.message} \u2014 falling back to action input defaults`)}}else cu("No .skyramp/workspace.yml found, using action input defaults");a||(a="v1.3.54"),c||(c="latest"),s||(s="docker compose up -d --build");let l={targetSetupCommand:s,authTokenCommand:t.authTokenCommand,targetTeardownCommand:i,skipTargetTeardown:t.skipTargetTeardown,skyrampExecutorVersion:a,skyrampMcpVersion:c,skyrampMcpSource:t.skyrampMcpSource,skyrampMcpGithubRef:t.skyrampMcpGithubRef,nodeVersion:t.nodeVersion,skipTargetSetup:t.skipTargetSetup,targetReadyCheckCommand:t.targetReadyCheckCommand,targetReadyCheckTimeout:t.targetReadyCheckTimeout,targetReadyCheckInterval:t.targetReadyCheckInterval,targetReadyCheckDiagnosticsCommand:t.targetReadyCheckDiagnosticsCommand,autoCommit:t.autoCommit,commitMessage:t.commitMessage,generatedTestsMode:t.generatedTestsMode,postPrComment:t.postPrComment,testExecutionTimeout:t.testExecutionTimeout,maxRecommendations:t.maxRecommendations,maxGenerate:t.maxGenerate,perTestMaxFixAttempts:t.perTestMaxFixAttempts,testbotMaxRetries:t.testbotMaxRetries,testbotRetryDelay:t.testbotRetryDelay,testbotTimeout:t.testbotTimeout,targetSetupRetries:t.targetSetupRetries,targetSetupRetryDelay:t.targetSetupRetryDelay,authTokenRetries:t.authTokenRetries,authTokenRetryDelay:t.authTokenRetryDelay,reportCollapsed:t.reportCollapsed,language:t.language,enableDebug:t.enableDebug,testRepoPath:t.testRepoPath,relatedRepoPaths:t.relatedRepoPaths,services:r};rd("Resolved configuration");for(let[A,p]of Object.entries(l))A==="authTokenCommand"?Qn(` ${A}: [REDACTED]`):A==="services"?Qn(` ${A}: ${JSON.stringify(p)}`):Qn(` ${A}: ${p}`);return sd(),l}Ft();Ft();cm();var Gx=Re(require("child_process")),gy=class extends Error{constructor(e){super(e),this.name="ExecTimeoutError"}},bd=class extends Error{constructor(e){super(e),this.name="ExecAbortedError"}};function Vx(t,e){if(!(!t||t.destroyed||t.writableEnded))try{t.write(e)}catch(n){Pe(`stream write failed: ${n instanceof Error?n.message:String(n)}`)}}async function Hx(t,e=[],n={}){let r="",s="",i={cwd:n.cwd,silent:n.silent??!1,ignoreReturnCode:n.ignoreReturnCode??!1,env:n.env?{...process.env,...n.env}:void 0,input:n.input,listeners:{stdout:c=>{r+=c.toString(),Vx(n.stdoutStream,c)},stderr:c=>{s+=c.toString()}}};if(n.timeout||n.signal){let c=n.signal;return c?.aborted?Promise.reject(new bd(`Command aborted before start: ${t}`)):new Promise((l,A)=>{let p=Gx.spawn(t,e,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:process.env,stdio:["pipe","pipe","pipe"],shell:!1});p.stdout?.on("data",k=>{r+=k.toString(),n.silent||process.stdout.write(k),Vx(n.stdoutStream,k)}),p.stderr?.on("data",k=>{s+=k.toString(),n.silent||process.stderr.write(k)}),n.input&&p.stdin?.end(n.input);let h=()=>{S&&clearTimeout(S),c?.removeEventListener("abort",C)},g=k=>{h();try{p.kill("SIGTERM")}catch{}A(k)},C=()=>g(new bd(`Command aborted: ${t}`)),S=n.timeout?setTimeout(()=>g(new gy(`Command timed out after ${Math.round(n.timeout/6e4)}m: ${t}`)),n.timeout):void 0;c?.addEventListener("abort",C,{once:!0}),p.on("close",k=>{h();let T=k??1;T!==0&&!n.ignoreReturnCode?A(new Error(`The process '${t}' failed with exit code ${T}`)):l({exitCode:T,stdout:r,stderr:s})}),p.on("error",k=>{h(),A(k)})})}return{exitCode:await wk(t,e,i),stdout:r,stderr:s}}async function jx(t,e){rd(t);try{return await e()}finally{sd()}}async function qx(t,e){await jx("Tearing down services",async()=>{if(t.skipTargetTeardown){cu("Skipping service teardown (skipTargetTeardown=true)");return}if(!t.targetTeardownCommand){Qn("No targetTeardownCommand configured, skipping teardown");return}Qn(`Running teardown command: ${t.targetTeardownCommand}`);try{await Hx("bash",["-c",t.targetTeardownCommand],{cwd:e}),cu("Services torn down successfully")}catch(n){let r=n instanceof Error?n.message:String(n);Pe(`Service teardown command failed (non-fatal): ${r}`)}})}Ft();Ft();var Wi=(i=>(i.NotFound="not_found",i.NoAccess="no_access",i.Unavailable="unavailable",i.AccessLost="access_lost",i.CannotOpen="cannot_open",i))(Wi||{});var my=t=>`${t.source}:${t.site??""}:${t.key}`;var Sd=/^pasted-[0-9a-f]{16}$/,Eu=/^file-[0-9a-f]{16}$/,Cu=(s=>(s.Pdf="application/pdf",s.Csv="text/csv",s.Docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.Xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s))(Cu||{});var vd=(r=>(r.New="new",r.Updated="updated",r.Existing="existing",r))(vd||{}),zi=(r=>(r.Sufficient="sufficient",r.Insufficient="insufficient",r.NoChange="no_change",r))(zi||{}),xa=(T=>(T.RelatedChangeConflict="related_change_conflict",T.ReferenceOutsideTarget="reference_outside_target",T.SourceAccessLost="source_access_lost",T.ConfigurationIncomplete="configuration_incomplete",T.CredentialUnavailable="credential_unavailable",T.WorkflowBindingUnverified="workflow_binding_unverified",T.WorkflowRefUnprotected="workflow_ref_unprotected",T.BedrockWorkflowRequired="bedrock_workflow_required",T.DeploymentReview="deployment_review",T.SutRevisionMismatch="sut_revision_mismatch",T.IsolationUnavailable="isolation_unavailable",T.EvidenceInsufficient="evidence_insufficient",T.ConfigurationUnresolved="configuration_unresolved",T.ModelProviderDenied="model_provider_denied",T.ModelProviderUnavailable="model_provider_unavailable",T.RunnerProviderNotReady="runner_provider_not_ready",T))(xa||{}),Ps=(i=>(i.CiCheck="ci_check",i.TestReport="test_report",i.StaticAnalysis="static_analysis",i.CodeReview="code_review",i.Other="other",i))(Ps||{}),kd=(r=>(r.Application="application",r.Environment="environment",r.TestDefect="test_defect",r))(kd||{}),Rd=(c=>(c.AuthToken="auth_token",c.Secret="secret",c.DataConnection="data_connection",c.AppNotStarted="app_not_started",c.Login="login",c.ExternalDependency="external_dependency",c.RecordingReplay="recording_replay",c))(Rd||{});var xd=(n=>(n.Probe="probe",n.Agent="agent",n))(xd||{}),Td=(r=>(r.Seed="seed",r.RuntimeMock="runtime_mock",r.EnvOverride="env_override",r))(Td||{}),Dd=(r=>(r.TestCode="test_code",r.SkyrampMocker="skyramp_mocker",r.RecipeOverride="recipe_override",r))(Dd||{});var sq=["generate-unit","native-run"],s8=["preflight","plan","write",...sq,"report","deliver"];var Nd=(r=>(r.Unit="unit",r.Integration="integration",r.E2e="e2e",r))(Nd||{});var Fd="\xABredacted\xBB";function rs(t,e){if(!t||e.length===0)return t;let n=t;for(let r of e)!r||!n.includes(r)||(n=n.split(r).join(Fd));return n}var A8=new TextDecoder("utf-8",{fatal:!0});function ot(t,e=[]){let n=t.trim();if(!n)return{error:"session produced no output"};let r=l=>{try{let A=JSON.parse(l);return typeof A=="object"&&A!==null&&!Array.isArray(A)?A:void 0}catch{return}},s=r(n);if(s!==void 0)return{value:s};let i;if(n.startsWith("{")&&n.endsWith("}"))try{JSON.parse(n)}catch(l){i=l instanceof Error?l.message:String(l)}let a=[...n.matchAll(/```(?:json)?\s*\n([\s\S]*?)```/g)];for(let l=a.length-1;l>=0;l--){let A=r(a[l][1].trim());if(A!==void 0)return{value:A}}let c;for(let l=n.indexOf("{");l!==-1;l=n.indexOf("{",l+1)){let A=0,p=!1,h=!1;for(let g=l;g<n.length;g++){let C=n[g];if(h){h=!1;continue}if(C==="\\"){h=p;continue}if(C==='"'){p=!p;continue}if(!p){if(C==="{")A++;else if(C==="}"&&(A--,A===0)){let S=r(n.slice(l,g+1));S!==void 0&&Object.keys(S).length>0&&(c=S,l=g);break}}}}return i&&(c===void 0||Object.keys(c).length<3)?{error:`final message is not valid JSON \u2014 ${i}. Most often an unescaped double quote inside a string (e.g. in "summary" or "evidence"): escape it as \\" or use single quotes in prose`}:c!==void 0?{value:c}:i?{error:`final message is not valid JSON \u2014 ${i}. Most often an unescaped double quote inside a string (e.g. in "summary" or "evidence"): escape it as \\" or use single quotes in prose`}:{error:`no parseable JSON object found in session output \u2014 the final message was: "${iq(rs(n,e))}"`}}var Yx=240;function iq(t){let e=t.replace(/\s+/g," ").trim();return e.length<=Yx?e:`\u2026${e.slice(-Yx)}`}var Bu=Re(require("fs")),wu=Re(require("path"));var oq=8;function yt(t,e,n={}){let r=e.slice(0,oq),s=e.length-r.length;return{name:t,passed:!1,details:r.join("; ")+(s>0?`; \u2026and ${s} more`:""),...n.fatal?{fatal:!0}:{}}}function Ta(t){if(Bu.existsSync(t))try{return JSON.parse(Bu.readFileSync(t,"utf-8"))}catch{return}}function Ut(t,e){return Ta(wu.join(t.outputsDir,e))}function kn(t,e){return{name:t,verify(n,r){let{errors:s}=e(n,r);return s.length===0?{name:this.name,passed:!0}:yt(this.name,s,{fatal:!0})}}}function Qu(t){return t.replace(/\s+/g," ").trim()}var Md=new RegExp("(^|/)("+["test_[^/]+\\.py","[^/]+_test\\.py","[^/]+\\.(spec|test)\\.[cm]?[jt]sx?","[^/]+\\.e2e-(spec|test)\\.[cm]?[jt]sx?","[^/]+_test\\.go","[^/]+Tests?\\.(java|kts?)","[^/]+_(test|spec)\\.rb","[^/]+\\.feature","[^/]+Tests?\\.cs","[^/]+_test\\.rs","tests/[^/]+\\.rs","[^/]+Test\\.php","[^/]+(Test|Spec|Suite)\\.scala","[^/]+Tests?\\.swift","[^/]+_test\\.exs","[^/]+_test\\.dart","[^/]+_test\\.(c|cc|cpp|cxx)","test_[^/]+\\.(c|cc|cpp|cxx)","[^/]+(Spec|Test)\\.groovy"].join("|")+")$","i");var u={};mp(u,{BRAND:()=>Dq,DIRTY:()=>Ki,EMPTY_PATH:()=>lq,INVALID:()=>ie,NEVER:()=>gY,OK:()=>St,ParseStatus:()=>Et,Schema:()=>Ce,ZodAny:()=>Vs,ZodArray:()=>as,ZodBigInt:()=>Xi,ZodBoolean:()=>eo,ZodBranded:()=>Su,ZodCatch:()=>Ao,ZodDate:()=>to,ZodDefault:()=>lo,ZodDiscriminatedUnion:()=>Ld,ZodEffects:()=>Tn,ZodEnum:()=>co,ZodError:()=>Wt,ZodFirstPartyTypeKind:()=>le,ZodFunction:()=>Od,ZodIntersection:()=>io,ZodIssueCode:()=>O,ZodLazy:()=>oo,ZodLiteral:()=>ao,ZodMap:()=>Ua,ZodNaN:()=>Pa,ZodNativeEnum:()=>uo,ZodNever:()=>Xn,ZodNull:()=>ro,ZodNullable:()=>wr,ZodNumber:()=>Zi,ZodObject:()=>zt,ZodOptional:()=>Rn,ZodParsedType:()=>z,ZodPipeline:()=>vu,ZodPromise:()=>Gs,ZodReadonly:()=>po,ZodRecord:()=>Pd,ZodSchema:()=>Ce,ZodSet:()=>La,ZodString:()=>$s,ZodSymbol:()=>Ma,ZodTransformer:()=>Tn,ZodTuple:()=>Br,ZodType:()=>Ce,ZodUndefined:()=>no,ZodUnion:()=>so,ZodUnknown:()=>os,ZodVoid:()=>_a,addIssueToContext:()=>J,any:()=>$q,array:()=>jq,bigint:()=>_q,boolean:()=>s0,coerce:()=>fY,custom:()=>t0,date:()=>Uq,datetimeRegex:()=>Xx,defaultErrorMap:()=>ss,discriminatedUnion:()=>Wq,effect:()=>aY,enum:()=>sY,function:()=>tY,getErrorMap:()=>Da,getParsedType:()=>Ir,instanceof:()=>Fq,intersection:()=>zq,isAborted:()=>_d,isAsync:()=>Na,isDirty:()=>Ud,isValid:()=>Os,late:()=>Nq,lazy:()=>nY,literal:()=>rY,makeIssue:()=>bu,map:()=>Xq,nan:()=>Mq,nativeEnum:()=>iY,never:()=>Gq,null:()=>Oq,nullable:()=>uY,number:()=>r0,object:()=>qq,objectUtil:()=>Ey,oboolean:()=>hY,onumber:()=>pY,optional:()=>cY,ostring:()=>dY,pipeline:()=>AY,preprocess:()=>lY,promise:()=>oY,quotelessJson:()=>aq,record:()=>Zq,set:()=>eY,setErrorMap:()=>uq,strictObject:()=>Yq,string:()=>n0,symbol:()=>Lq,transformer:()=>aY,tuple:()=>Kq,undefined:()=>Pq,union:()=>Jq,unknown:()=>Vq,util:()=>Qe,void:()=>Hq});var Qe;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{let i={};for(let a of s)i[a]=a;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),a={};for(let c of i)a[c]=s[c];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(let a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Qe||(Qe={}));var Ey;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ey||(Ey={}));var z=Qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ir=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}};var O=Qe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),aq=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Wt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,l=0;for(;l<a.path.length;){let A=a.path[l],p=l===a.path.length-1;if(A==="_errors"){p&&c._errors.push(n(a)),l++;continue}Object.prototype.hasOwnProperty.call(c,A)||(A==="__proto__"?Object.defineProperty(c,A,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):c[A]={_errors:[]}),c=c[A],p&&c._errors.push(n(a)),l++}}};return s(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Qe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n=Object.create(null),r=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Wt.create=t=>new Wt(t);var cq=(t,e)=>{let n;switch(t.code){case O.invalid_type:t.received===z.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case O.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Qe.jsonStringifyReplacer)}`;break;case O.unrecognized_keys:n=`Unrecognized key(s) in object: ${Qe.joinValues(t.keys,", ")}`;break;case O.invalid_union:n="Invalid input";break;case O.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Qe.joinValues(t.options)}`;break;case O.invalid_enum_value:n=`Invalid enum value. Expected ${Qe.joinValues(t.options)}, received '${t.received}'`;break;case O.invalid_arguments:n="Invalid function arguments";break;case O.invalid_return_type:n="Invalid function return type";break;case O.invalid_date:n="Invalid date";break;case O.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Qe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case O.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case O.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case O.custom:n="Invalid input";break;case O.invalid_intersection_types:n="Intersection results could not be merged";break;case O.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case O.not_finite:n="Number must be finite";break;default:n=e.defaultError,Qe.assertNever(t)}return{message:n}},ss=cq;var Jx=ss;function uq(t){Jx=t}function Da(){return Jx}var bu=t=>{let{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let c="",l=r.filter(A=>!!A).slice().reverse();for(let A of l)c=A(a,{data:e,defaultError:c}).message;return{...s,path:i,message:c}},lq=[];function J(t,e){let n=Da(),r=bu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ss?void 0:ss].filter(s=>!!s)});t.common.issues.push(r)}var Et=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let s of n){if(s.status==="aborted")return ie;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let s of n){let i=await s.key,a=await s.value;r.push({key:i,value:a})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let s of n){let{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return ie;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:e.value,value:r}}},ie=Object.freeze({status:"aborted"}),Ki=t=>({status:"dirty",value:t}),St=t=>({status:"valid",value:t}),_d=t=>t.status==="aborted",Ud=t=>t.status==="dirty",Os=t=>t.status==="valid",Na=t=>typeof Promise<"u"&&t instanceof Promise;var Z;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Z||(Z={}));var xn=class{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wx=(t,e)=>{if(Os(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Wt(t.common.issues);return this._error=n,this._error}}};function me(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(a,c)=>{let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??c.defaultError}:typeof c.data>"u"?{message:l??r??c.defaultError}:a.code!=="invalid_type"?{message:c.defaultError}:{message:l??n??c.defaultError}},description:s}}var Ce=class{get description(){return this._def.description}_getType(e){return Ir(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Ir(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Et,ctx:{common:e.parent.common,data:e.data,parsedType:Ir(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Na(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ir(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Wx(r,s)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ir(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return Os(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Os(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ir(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Na(s)?s:Promise.resolve(s));return Wx(r,i)}refine(e,n){let r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{let a=e(s),c=()=>i.addIssue({code:O.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Tn({schema:this,typeName:le.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Rn.create(this,this._def)}nullable(){return wr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return as.create(this)}promise(){return Gs.create(this,this._def)}or(e){return so.create([this,e],this._def)}and(e){return io.create(this,e,this._def)}transform(e){return new Tn({...me(this._def),schema:this,typeName:le.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new lo({...me(this._def),innerType:this,defaultValue:n,typeName:le.ZodDefault})}brand(){return new Su({typeName:le.ZodBranded,type:this,...me(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Ao({...me(this._def),innerType:this,catchValue:n,typeName:le.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return vu.create(this,e)}readonly(){return po.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Aq=/^c[^\s-]{8,}$/i,dq=/^[0-9a-z]+$/,pq=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hq=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fq=/^[a-z0-9_-]{21}$/i,gq=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,mq=/^[-+]?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)?)??$/,yq=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Eq="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Cy,Cq=/^(?:(?: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])$/,Iq=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Bq=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wq=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kx="((\\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])))",Sq=new RegExp(`^${Kx}$`);function Zx(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function vq(t){return new RegExp(`^${Zx(t)}$`)}function Xx(t){let e=`${Kx}T${Zx(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function kq(t,e){return!!((e==="v4"||!e)&&Cq.test(t)||(e==="v6"||!e)&&Bq.test(t))}function Rq(t,e){if(!gq.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function xq(t,e){return!!((e==="v4"||!e)&&Iq.test(t)||(e==="v6"||!e)&&wq.test(t))}var $s=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_type,expected:z.string,received:i.parsedType}),ie}let r=new Et,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,c=e.data.length<i.value;(a||c)&&(s=this._getOrReturnCtx(e,s),a?J(s,{code:O.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&J(s,{code:O.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"email",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Cy||(Cy=new RegExp(Eq,"u")),Cy.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"emoji",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")hq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"uuid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")fq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"nanoid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Aq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"cuid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")dq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"cuid2",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")pq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"ulid",code:O.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),J(s,{validation:"url",code:O.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"regex",code:O.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Xx(i).test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Sq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?vq(i).test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{code:O.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?mq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"duration",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?kq(e.data,i.version)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"ip",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Rq(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"jwt",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?xq(e.data,i.version)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"cidr",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Qq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"base64",code:O.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?bq.test(e.data)||(s=this._getOrReturnCtx(e,s),J(s,{validation:"base64url",code:O.invalid_string,message:i.message}),r.dirty()):Qe.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:O.invalid_string,...Z.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Z.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Z.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Z.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Z.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Z.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Z.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Z.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Z.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Z.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Z.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Z.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Z.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Z.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Z.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Z.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Z.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Z.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Z.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Z.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Z.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Z.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Z.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Z.errToObj(n)})}nonempty(e){return this.min(1,Z.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};$s.create=t=>new $s({checks:[],typeName:le.ZodString,coerce:t?.coerce??!1,...me(t)});function Tq(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return i%a/10**s}var Zi=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_type,expected:z.number,received:i.parsedType}),ie}let r,s=new Et;for(let i of this._def.checks)i.kind==="int"?Qe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),J(r,{code:O.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Tq(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),J(r,{code:O.not_finite,message:i.message}),s.dirty()):Qe.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Z.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Z.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Z.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Z.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Z.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Z.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Z.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Z.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Z.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Z.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Z.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Qe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};Zi.create=t=>new Zi({checks:[],typeName:le.ZodNumber,coerce:t?.coerce||!1,...me(t)});var Xi=class t extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==z.bigint)return this._getInvalidInput(e);let r,s=new Et;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),J(r,{code:O.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Qe.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return J(n,{code:O.invalid_type,expected:z.bigint,received:n.parsedType}),ie}gte(e,n){return this.setLimit("min",e,!0,Z.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Z.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Z.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Z.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Z.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Z.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Z.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Xi.create=t=>new Xi({checks:[],typeName:le.ZodBigInt,coerce:t?.coerce??!1,...me(t)});var eo=class extends Ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.boolean,received:r.parsedType}),ie}return St(e.data)}};eo.create=t=>new eo({typeName:le.ZodBoolean,coerce:t?.coerce||!1,...me(t)});var to=class t extends Ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_type,expected:z.date,received:i.parsedType}),ie}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return J(i,{code:O.invalid_date}),ie}let r=new Et,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),J(s,{code:O.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Qe.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Z.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Z.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};to.create=t=>new to({checks:[],coerce:t?.coerce||!1,typeName:le.ZodDate,...me(t)});var Ma=class extends Ce{_parse(e){if(this._getType(e)!==z.symbol){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.symbol,received:r.parsedType}),ie}return St(e.data)}};Ma.create=t=>new Ma({typeName:le.ZodSymbol,...me(t)});var no=class extends Ce{_parse(e){if(this._getType(e)!==z.undefined){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.undefined,received:r.parsedType}),ie}return St(e.data)}};no.create=t=>new no({typeName:le.ZodUndefined,...me(t)});var ro=class extends Ce{_parse(e){if(this._getType(e)!==z.null){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.null,received:r.parsedType}),ie}return St(e.data)}};ro.create=t=>new ro({typeName:le.ZodNull,...me(t)});var Vs=class extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return St(e.data)}};Vs.create=t=>new Vs({typeName:le.ZodAny,...me(t)});var os=class extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return St(e.data)}};os.create=t=>new os({typeName:le.ZodUnknown,...me(t)});var Xn=class extends Ce{_parse(e){let n=this._getOrReturnCtx(e);return J(n,{code:O.invalid_type,expected:z.never,received:n.parsedType}),ie}};Xn.create=t=>new Xn({typeName:le.ZodNever,...me(t)});var _a=class extends Ce{_parse(e){if(this._getType(e)!==z.undefined){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.void,received:r.parsedType}),ie}return St(e.data)}};_a.create=t=>new _a({typeName:le.ZodVoid,...me(t)});var as=class t extends Ce{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==z.array)return J(n,{code:O.invalid_type,expected:z.array,received:n.parsedType}),ie;if(s.exactLength!==null){let a=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(a||c)&&(J(n,{code:a?O.too_big:O.too_small,minimum:c?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(J(n,{code:O.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(J(n,{code:O.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>s.type._parseAsync(new xn(n,a,n.path,c)))).then(a=>Et.mergeArray(r,a));let i=[...n.data].map((a,c)=>s.type._parseSync(new xn(n,a,n.path,c)));return Et.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:Z.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:Z.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:Z.toString(n)}})}nonempty(e){return this.min(1,e)}};as.create=(t,e)=>new as({type:t,minLength:null,maxLength:null,exactLength:null,typeName:le.ZodArray,...me(e)});function Fa(t){if(t instanceof zt){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=Rn.create(Fa(r))}return new zt({...t._def,shape:()=>e})}else return t instanceof as?new as({...t._def,type:Fa(t.element)}):t instanceof Rn?Rn.create(Fa(t.unwrap())):t instanceof wr?wr.create(Fa(t.unwrap())):t instanceof Br?Br.create(t.items.map(e=>Fa(e))):t}var zt=class t extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=Qe.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==z.object){let A=this._getOrReturnCtx(e);return J(A,{code:O.invalid_type,expected:z.object,received:A.parsedType}),ie}let{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Xn&&this._def.unknownKeys==="strip"))for(let A in s.data)a.includes(A)||c.push(A);let l=[];for(let A of a){let p=i[A],h=s.data[A];l.push({key:{status:"valid",value:A},value:p._parse(new xn(s,h,s.path,A)),alwaysSet:A in s.data})}if(this._def.catchall instanceof Xn){let A=this._def.unknownKeys;if(A==="passthrough")for(let p of c)l.push({key:{status:"valid",value:p},value:{status:"valid",value:s.data[p]}});else if(A==="strict")c.length>0&&(J(s,{code:O.unrecognized_keys,keys:c}),r.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let A=this._def.catchall;for(let p of c){let h=s.data[p];l.push({key:{status:"valid",value:p},value:A._parse(new xn(s,h,s.path,p)),alwaysSet:p in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let A=[];for(let p of l){let h=await p.key,g=await p.value;A.push({key:h,value:g,alwaysSet:p.alwaysSet})}return A}).then(A=>Et.mergeObjectSync(r,A)):Et.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return Z.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Z.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:le.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of Qe.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of Qe.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Fa(this)}partial(e){let n={};for(let r of Qe.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of Qe.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Rn;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return e0(Qe.objectKeys(this.shape))}};zt.create=(t,e)=>new zt({shape:()=>t,unknownKeys:"strip",catchall:Xn.create(),typeName:le.ZodObject,...me(e)});zt.strictCreate=(t,e)=>new zt({shape:()=>t,unknownKeys:"strict",catchall:Xn.create(),typeName:le.ZodObject,...me(e)});zt.lazycreate=(t,e)=>new zt({shape:t,unknownKeys:"strip",catchall:Xn.create(),typeName:le.ZodObject,...me(e)});var so=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Wt(c.ctx.common.issues));return J(n,{code:O.invalid_union,unionErrors:a}),ie}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let i,a=[];for(let l of r){let A={...n,common:{...n.common,issues:[]},parent:null},p=l._parseSync({data:n.data,path:n.path,parent:A});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:A}),A.common.issues.length&&a.push(A.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(l=>new Wt(l));return J(n,{code:O.invalid_union,unionErrors:c}),ie}}get options(){return this._def.options}};so.create=(t,e)=>new so({options:t,typeName:le.ZodUnion,...me(e)});var is=t=>t instanceof oo?is(t.schema):t instanceof Tn?is(t.innerType()):t instanceof ao?[t.value]:t instanceof co?t.options:t instanceof uo?Qe.objectValues(t.enum):t instanceof lo?is(t._def.innerType):t instanceof no?[void 0]:t instanceof ro?[null]:t instanceof Rn?[void 0,...is(t.unwrap())]:t instanceof wr?[null,...is(t.unwrap())]:t instanceof Su||t instanceof po?is(t.unwrap()):t instanceof Ao?is(t._def.innerType):[],Ld=class t extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.object)return J(n,{code:O.invalid_type,expected:z.object,received:n.parsedType}),ie;let r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:O.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let s=new Map;for(let i of n){let a=is(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of a){if(s.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new t({typeName:le.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...me(r)})}};function Iy(t,e){let n=Ir(t),r=Ir(e);if(t===e)return{valid:!0,data:t};if(n===z.object&&r===z.object){let s=Qe.objectKeys(e),i=Qe.objectKeys(t).filter(c=>s.indexOf(c)!==-1),a={...t,...e};Object.prototype.hasOwnProperty.call(a,"__proto__")&&delete a.__proto__;for(let c of i){if(c==="__proto__")continue;let l=Iy(t[c],e[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}else if(n===z.array&&r===z.array){if(t.length!==e.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let a=t[i],c=e[i],l=Iy(a,c);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===z.date&&r===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var io=class extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=(i,a)=>{if(_d(i)||_d(a))return ie;let c=Iy(i.value,a.value);return c.valid?((Ud(i)||Ud(a))&&n.dirty(),{status:n.value,value:c.data}):(J(r,{code:O.invalid_intersection_types}),ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};io.create=(t,e,n)=>new io({left:t,right:e,typeName:le.ZodIntersection,...me(n)});var Br=class t extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.array)return J(r,{code:O.invalid_type,expected:z.array,received:r.parsedType}),ie;if(r.data.length<this._def.items.length)return J(r,{code:O.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:O.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new xn(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Et.mergeArray(n,a)):Et.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Br.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Br({items:t,typeName:le.ZodTuple,rest:null,...me(e)})};var Pd=class t extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.object)return J(r,{code:O.invalid_type,expected:z.object,received:r.parsedType}),ie;let s=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)s.push({key:i._parse(new xn(r,c,r.path,c)),value:a._parse(new xn(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?Et.mergeObjectAsync(n,s):Et.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ce?new t({keyType:e,valueType:n,typeName:le.ZodRecord,...me(r)}):new t({keyType:$s.create(),valueType:e,typeName:le.ZodRecord,...me(n)})}},Ua=class extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.map)return J(r,{code:O.invalid_type,expected:z.map,received:r.parsedType}),ie;let s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,l],A)=>({key:s._parse(new xn(r,c,r.path,[A,"key"])),value:i._parse(new xn(r,l,r.path,[A,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of a){let A=await l.key,p=await l.value;if(A.status==="aborted"||p.status==="aborted")return ie;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let l of a){let A=l.key,p=l.value;if(A.status==="aborted"||p.status==="aborted")return ie;(A.status==="dirty"||p.status==="dirty")&&n.dirty(),c.set(A.value,p.value)}return{status:n.value,value:c}}}};Ua.create=(t,e,n)=>new Ua({valueType:e,keyType:t,typeName:le.ZodMap,...me(n)});var La=class t extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.set)return J(r,{code:O.invalid_type,expected:z.set,received:r.parsedType}),ie;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(J(r,{code:O.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(J(r,{code:O.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());let i=this._def.valueType;function a(l){let A=new Set;for(let p of l){if(p.status==="aborted")return ie;p.status==="dirty"&&n.dirty(),A.add(p.value)}return{status:n.value,value:A}}let c=[...r.data.values()].map((l,A)=>i._parse(new xn(r,l,r.path,A)));return r.common.async?Promise.all(c).then(l=>a(l)):a(c)}min(e,n){return new t({...this._def,minSize:{value:e,message:Z.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:Z.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};La.create=(t,e)=>new La({valueType:t,minSize:null,maxSize:null,typeName:le.ZodSet,...me(e)});var Od=class t extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.function)return J(n,{code:O.invalid_type,expected:z.function,received:n.parsedType}),ie;function r(c,l){return bu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Da(),ss].filter(A=>!!A),issueData:{code:O.invalid_arguments,argumentsError:l}})}function s(c,l){return bu({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Da(),ss].filter(A=>!!A),issueData:{code:O.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Gs){let c=this;return St(async function(...l){let A=new Wt([]),p=await c._def.args.parseAsync(l,i).catch(C=>{throw A.addIssue(r(l,C)),A}),h=await Reflect.apply(a,this,p);return await c._def.returns._def.type.parseAsync(h,i).catch(C=>{throw A.addIssue(s(h,C)),A})})}else{let c=this;return St(function(...l){let A=c._def.args.safeParse(l,i);if(!A.success)throw new Wt([r(l,A.error)]);let p=Reflect.apply(a,this,A.data),h=c._def.returns.safeParse(p,i);if(!h.success)throw new Wt([s(p,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Br.create(e).rest(os.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||Br.create([]).rest(os.create()),returns:n||os.create(),typeName:le.ZodFunction,...me(r)})}},oo=class extends Ce{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};oo.create=(t,e)=>new oo({getter:t,typeName:le.ZodLazy,...me(e)});var ao=class extends Ce{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return J(n,{received:n.data,code:O.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:e.data}}get value(){return this._def.value}};ao.create=(t,e)=>new ao({value:t,typeName:le.ZodLiteral,...me(e)});function e0(t,e){return new co({values:t,typeName:le.ZodEnum,...me(e)})}var co=class t extends Ce{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return J(n,{expected:Qe.joinValues(r),received:n.parsedType,code:O.invalid_type}),ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return J(n,{received:n.data,code:O.invalid_enum_value,options:r}),ie}return St(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};co.create=e0;var uo=class extends Ce{_parse(e){let n=Qe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==z.string&&r.parsedType!==z.number){let s=Qe.objectValues(n);return J(r,{expected:Qe.joinValues(s),received:r.parsedType,code:O.invalid_type}),ie}if(this._cache||(this._cache=new Set(Qe.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=Qe.objectValues(n);return J(r,{received:r.data,code:O.invalid_enum_value,options:s}),ie}return St(e.data)}get enum(){return this._def.values}};uo.create=(t,e)=>new uo({values:t,typeName:le.ZodNativeEnum,...me(e)});var Gs=class extends Ce{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.promise&&n.common.async===!1)return J(n,{code:O.invalid_type,expected:z.promise,received:n.parsedType}),ie;let r=n.parsedType===z.promise?n.data:Promise.resolve(n.data);return St(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Gs.create=(t,e)=>new Gs({type:t,typeName:le.ZodPromise,...me(e)});var Tn=class extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:a=>{J(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async c=>{if(n.value==="aborted")return ie;let l=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return l.status==="aborted"?ie:l.status==="dirty"?Ki(l.value):n.value==="dirty"?Ki(l.value):l});{if(n.value==="aborted")return ie;let c=this._def.schema._parseSync({data:a,path:r.path,parent:r});return c.status==="aborted"?ie:c.status==="dirty"?Ki(c.value):n.value==="dirty"?Ki(c.value):c}}if(s.type==="refinement"){let a=c=>{let l=s.refinement(c,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?ie:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?ie:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Os(a))return ie;let c=s.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Os(a)?Promise.resolve(s.transform(a.value,i)).then(c=>({status:n.value,value:c})):ie);Qe.assertNever(s)}};Tn.create=(t,e,n)=>new Tn({schema:t,typeName:le.ZodEffects,effect:e,...me(n)});Tn.createWithPreprocess=(t,e,n)=>new Tn({schema:e,effect:{type:"preprocess",transform:t},typeName:le.ZodEffects,...me(n)});var Rn=class extends Ce{_parse(e){return this._getType(e)===z.undefined?St(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Rn.create=(t,e)=>new Rn({innerType:t,typeName:le.ZodOptional,...me(e)});var wr=class extends Ce{_parse(e){return this._getType(e)===z.null?St(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};wr.create=(t,e)=>new wr({innerType:t,typeName:le.ZodNullable,...me(e)});var lo=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===z.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};lo.create=(t,e)=>new lo({innerType:t,typeName:le.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...me(e)});var Ao=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Na(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Wt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Ao.create=(t,e)=>new Ao({innerType:t,typeName:le.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...me(e)});var Pa=class extends Ce{_parse(e){if(this._getType(e)!==z.nan){let r=this._getOrReturnCtx(e);return J(r,{code:O.invalid_type,expected:z.nan,received:r.parsedType}),ie}return{status:"valid",value:e.data}}};Pa.create=t=>new Pa({typeName:le.ZodNaN,...me(t)});var Dq=Symbol("zod_brand"),Su=class extends Ce{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},vu=class t extends Ce{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ie:i.status==="dirty"?(n.dirty(),Ki(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ie:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:le.ZodPipeline})}},po=class extends Ce{_parse(e){let n=this._def.innerType._parse(e),r=s=>(Os(s)&&(s.value=Object.freeze(s.value)),s);return Na(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:le.ZodReadonly,...me(e)});function zx(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function t0(t,e={},n){return t?Vs.create().superRefine((r,s)=>{let i=t(r);if(i instanceof Promise)return i.then(a=>{if(!a){let c=zx(e,r),l=c.fatal??n??!0;s.addIssue({code:"custom",...c,fatal:l})}});if(!i){let a=zx(e,r),c=a.fatal??n??!0;s.addIssue({code:"custom",...a,fatal:c})}}):Vs.create()}var Nq={object:zt.lazycreate},le;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(le||(le={}));var Fq=(t,e={message:`Input not instance of ${t.name}`})=>t0(n=>n instanceof t,e),n0=$s.create,r0=Zi.create,Mq=Pa.create,_q=Xi.create,s0=eo.create,Uq=to.create,Lq=Ma.create,Pq=no.create,Oq=ro.create,$q=Vs.create,Vq=os.create,Gq=Xn.create,Hq=_a.create,jq=as.create,qq=zt.create,Yq=zt.strictCreate,Jq=so.create,Wq=Ld.create,zq=io.create,Kq=Br.create,Zq=Pd.create,Xq=Ua.create,eY=La.create,tY=Od.create,nY=oo.create,rY=ao.create,sY=co.create,iY=uo.create,oY=Gs.create,aY=Tn.create,cY=Rn.create,uY=wr.create,lY=Tn.createWithPreprocess,AY=vu.create,dY=()=>n0().optional(),pY=()=>r0().optional(),hY=()=>s0().optional(),fY={string:(t=>$s.create({...t,coerce:!0})),number:(t=>Zi.create({...t,coerce:!0})),boolean:(t=>eo.create({...t,coerce:!0})),bigint:(t=>Xi.create({...t,coerce:!0})),date:(t=>to.create({...t,coerce:!0}))};var gY=ie;function mY(t){return t.issues.map(e=>{let n=e.path.map(s=>typeof s=="number"?`[${s}]`:`.${s}`).join("").replace(/^\./,""),r=n||"output";if(!/^(Expected |Required$|Invalid |String must|Array must|Number must)/.test(e.message))return`${r} ${e.message}`;switch(e.code){case"invalid_type":return n?e.expected==="object"?`${r} must be an object`:e.received==="undefined"?`${r} is required`:`${r} must be ${e.expected}, got ${e.received}`:"output is not a JSON object";case"invalid_enum_value":{let s=JSON.stringify(e.received),i=e.options.find(c=>typeof c=="string"&&typeof e.received=="string"&&e.received.startsWith(c)),a=i?` \u2014 you sent ${s}; the value must be exactly ${JSON.stringify(i)}, with any qualifier moved to a field that takes free text`:` \u2014 you sent ${s}`;return`${r} must be one of: ${e.options.join(", ")}${a}`}case"invalid_literal":return`${r} must be ${JSON.stringify(e.expected)}`;case"too_small":return e.type==="string"?`${r} must be a non-empty string`:`${r} must have at least ${e.minimum} item(s)`;case"unrecognized_keys":return`${r} has unknown key(s): ${e.keys.join(", ")}`;default:return`${r}: ${e.message}`}})}function gn(t,e){let n=t.safeParse(e);if(n.success)return{value:n.data,errors:[]};let r=(i,a)=>a.reduce((c,l)=>c&&typeof c=="object"?c[l]:void 0,i),s=n.error.issues.filter(i=>i.path.length&&r(e,i.path)===null);if(s.length===n.error.issues.length)try{let i=t.safeParse(s.reduce((a,{path:c})=>i0(a,c),e));if(i.success)return{value:i.data,errors:[]}}catch{}return{errors:mY(n.error)}}function i0(t,e){if(!e.length||!t||typeof t!="object")return t;let[n,...r]=e,s=Array.isArray(t)?t.slice():{...t};return r.length?s[n]=i0(s[n],r):delete s[n],s}var W8=new Set(Object.values(Ps));var z8=u.object({checks:u.array(u.object({repository:u.string().optional(),name:u.string().min(1),headSha:u.string().regex(/^[0-9a-f]{40}$|^[0-9a-f]{64}$/i),status:u.string().default("completed"),conclusion:u.string().nullable().optional(),url:u.string().optional(),summary:u.string().optional()}))});var ku=["-c","core.fsmonitor=false"],EY=new Set(["GH_TOKEN","GITHUB_TOKEN","GH_ENTERPRISE_TOKEN","GITHUB_ENTERPRISE_TOKEN","ACTIONS_RUNTIME_TOKEN","ACTIONS_ID_TOKEN_REQUEST_TOKEN","ACTIONS_ID_TOKEN_REQUEST_URL","SYSTEM_ACCESSTOKEN","SYSTEM_OIDCREQUESTURI","SKYRAMP_MCP_GITHUB_TOKEN","SSH_AUTH_SOCK","GIT_SSH","GIT_SSH_COMMAND","GITHUB_STEP_SUMMARY"]),CY=new Set(["ANTHROPIC_API_KEY","ANTHROPIC_AUTH_TOKEN","CLAUDE_CODE_OAUTH_TOKEN","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","AWS_BEARER_TOKEN_BEDROCK","AWS_PROFILE","AWS_WEB_IDENTITY_TOKEN_FILE","AWS_ROLE_ARN","AWS_ROLE_SESSION_NAME","AWS_CONTAINER_CREDENTIALS_FULL_URI","AWS_CONTAINER_CREDENTIALS_RELATIVE_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"]);function Dn(t=process.env,e,n="repo-command"){let r={};for(let[s,i]of Object.entries(t))n==="repo-command"&&CY.has(s)||(r[s]=i);Object.assign(r,e??{});for(let s of Object.keys(r))(EY.has(s)||s.startsWith("INPUT_"))&&delete r[s];return r}var Oa=Re(require("path"));var i5=Oa.join(".skyramp","workspace.yml");var IY={py:"python",go:"go",java:"java",kt:"kotlin",rb:"ruby",cs:"csharp",ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",kts:"kotlin",rs:"rust",php:"php",scala:"scala",swift:"swift",ex:"elixir",exs:"elixir",dart:"dart",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",hh:"cpp",groovy:"groovy"};var o5=new Set(Object.values(IY));var Qr=(s=>(s.Clean="clean",s.RecipeDrift="recipe-drift",s.ChangeBrokeBringup="change-broke-bringup",s.BringupFailed="bringup-failed",s))(Qr||{}),Hs=u.string().trim().min(1),wY=u.object({url:u.string().optional().describe("the URL probed, if the check is an HTTP request"),command:u.string().optional().describe("the command run, if the check is a script \u2014 preferred when auth is needed"),headers:u.record(u.string()).optional(),status:u.union([u.number(),u.string()]).optional().describe("expected HTTP status for a url check (default 200)"),output:Hs.describe("what the check returned, VERBATIM \u2014 the bytes, nothing appended; this gate RE-RUNS the check")}),By=u.array(u.object({component:Hs.describe("a shared component listed above"),url:Hs.describe("the URL on the component's own origin (scheme, host and port) that answers with its deployed commit"),output:Hs.describe("what the URL returned, VERBATIM; this gate FETCHES each url")})).describe("only when shared components are listed above: one check per component whose deployed commit you found"),a0=u.object({schemaVersion:u.literal(1),baseUrls:u.record(u.string()).optional().describe("service \u2192 base URL of the running app; omit on a failed bring-up, never invent one"),health:wY.optional(),teardown:Hs.describe("command that tears the SUT down"),dependencies:u.record(u.boolean()).optional().describe("EVERY backing service: true = really deployed, false = mocked; REQUIRED when the app came up"),outcome:u.nativeEnum(Qr).describe("clean | recipe-drift (you corrected the recipe) | change-broke-bringup (the PR broke it) | bringup-failed (environment, not the PR)"),recipeFixes:u.array(u.string()).optional().describe("required when outcome is recipe-drift: what was corrected"),bringupError:u.object({command:Hs,output:Hs}).optional().describe("required when bring-up failed: the exact failing command and what it printed"),suspectFiles:u.array(u.string()).optional().describe("required for change-broke-bringup: files THIS PR changed that the failure points at, relative to your working directory (a file in another checkout of the run: its absolute path)"),seeded:u.boolean(),startedAt:Hs.describe("ISO timestamp"),revisions:By.optional(),recipeRecorded:u.boolean().optional().describe("[derived] whether the checkout had a recorded recipe before bring-up")});var Ru=(n=>(n.Full="full",n.Static="static",n))(Ru||{}),js=(r=>(r.Contract="contract",r.Integration="integration",r.Ui="ui",r))(js||{}),xu=(i=>(i.OwnSurface="own_surface",i.StateReadBack="state_read_back",i.Referential="referential",i.Lifecycle="lifecycle",i.Boundaries="boundaries",i))(xu||{}),qs=(s=>(s.Update="update",s.Regenerate="regenerate",s.Delete="delete",s.Verify="verify",s))(qs||{}),$d=(A=>(A.Equals="equals",A.NotEquals="not_equals",A.GreaterThan="greater_than",A.LessThan="less_than",A.Contains="contains",A.NotContains="not_contains",A.Matches="matches",A.Absent="absent",A.Present="present",A))($d||{});var mn=u.string().trim().min(1),bY=u.object({subject:mn.describe('what the test READS: a response field path, the literal "status", or the on-screen text for a ui case \u2014 the FINAL read in a multi-step case'),comparator:u.nativeEnum($d),value:u.union([u.string(),u.number(),u.boolean(),u.null()]).optional().describe("the ONE value a broken build would not produce; OMIT for absent/present")}),SY=u.object({test:mn.describe("existing test path, relative to its repository"),repository:mn.optional().describe("owner/repo the test lives in, when the run has several checkouts; omit for the working checkout"),action:u.nativeEnum(qs),evidence:mn.describe("why \u2014 drift vs the diff, or a finding"),covers_behaviors:u.array(u.string()).optional().describe("analyze behavior ids this maintenance covers")});var vY=u.object({surface:mn.describe("a surface from the list, copied verbatim"),axis:u.nativeEnum(xu)}),kY=u.object({id:mn.describe("short-slug, unique across generate[]"),type:u.nativeEnum(js),target:mn.describe('"METHOD /path", or a business-flow name'),from_finding:u.string().optional().describe("analyze finding id this case catches"),from_behavior:u.string().optional().describe("analyze behavior id this case pins"),derived_from:vY.optional().describe("the surface \xD7 axis this case pins when no analyze behavior or finding names it \u2014 one of the three is required"),rationale:mn.describe("why this test matters"),expected_observable:mn.describe("one sentence for a human: what a catching test asserts, and what a broken build does instead"),expected:bY.describe("the same intent AS DATA \u2014 see the rules below"),seededPrecondition:mn.optional().describe("seeded non-initial state + how to reach it; only when a seeded-state transition applies"),verifiable:u.boolean().describe("true only when a live SUT could confirm this test (full mode)")}),RY=u.object({covered:u.array(u.string()).optional(),abstain:u.string().optional()}).superRefine((t,e)=>{let n=Array.isArray(t.covered),r=typeof t.abstain=="string";if(n===r)return void e.addIssue({code:u.ZodIssueCode.custom,message:"must have exactly one of covered[] or abstain"});n&&t.covered.length===0&&e.addIssue({code:u.ZodIssueCode.custom,path:["covered"],message:"must list at least one id (else abstain)"}),r&&!t.abstain.trim()&&e.addIssue({code:u.ZodIssueCode.custom,path:["abstain"],message:"must give a reason"})}).describe('{ "covered": [ids] } OR { "abstain": "reason" } \u2014 exactly one'),xY=u.object({surface:mn.describe("a surface from the list, copied verbatim"),axes:u.object(Object.fromEntries(Object.values(xu).map(t=>[t,RY])))}),c0=u.object({schemaVersion:u.literal(1),mode:u.nativeEnum(Ru),maintenance:u.array(SY),generate:u.array(kY),surfaces:u.array(xY).describe("one entry per changed surface in the list \u2014 none missing, none invented"),budget:u.object({total:u.number().describe("case count"),rationale:mn}),summary:mn.describe("one paragraph")});var ho=(n=>(n.Ready="ready",n.Blocked="blocked",n))(ho||{}),Je=u.string().trim().min(1),TY=u.object({action:u.enum(["start","run","wait"]),text:Je,source:u.enum(["file","notes","testbot"]).describe("file: a file in the repository; notes: the Target's notes; testbot: Testbot's own finding"),file:Je.nullable().describe("the file the step came from, relative to the component's repository; null unless source is file")}).strict().refine(t=>t.source==="file"==(t.file!==null),{path:["file"],message:"a file exactly when the step came from one"}),DY=/^[A-Za-z_][A-Za-z0-9_]*$/,$a=/^(?!GITHUB_)(?!SKYRAMP_RUNNER_)[A-Z][A-Z0-9_]{0,99}$/,Va=(a=>(a.VersionEndpoint="version_endpoint",a.DeployWorkflow="deploy_workflow",a.KubernetesLabels="kubernetes_labels",a.Command="command",a.Api="api",a.NotTracked="not_tracked",a))(Va||{}),Kt="shared",NY=Je.refine(t=>{try{let e=new URL(t);return["http:","https:"].includes(e.protocol)&&!e.username&&!e.password}catch{return!1}},"an http(s) URL with no login in it"),Ga=u.object({address:NY,readyWhen:Je.nullable(),credentials:u.array(u.string().regex($a)).max(50),revisionSources:u.array(u.object({method:u.nativeEnum(Va),detail:Je.describe("what Testbot reads, such as GET /version or the deploy workflow's name; for not_tracked, why nothing shows it"),components:u.array(Je).min(1).describe("the components it tells the revision of, by name")}).strict()).max(50)}).strict(),wy={steps:u.array(TY).max(20).optional().describe("how it starts, in order"),kind:u.enum(["web_app","service","database","external_service"]).optional(),from:u.object({file:Je,service:Je.nullable()}).strict().optional(),credentials:u.array(u.string().max(100).regex(DY)).max(50).optional().describe("the Target's credentials this component's recipe uses: a sign-in (a test user, password or token) or an API key, which the workflow supplies from a GitHub Actions secret as the environment variable of the credential's name; give each name exactly as the recipe reads it. Names only, never a value, and not a secret the recipe generates itself")},FY=u.object({name:Je,repository:Je.describe("owner/repo of the Target repository the component is built or started from, such as the one whose compose file starts its database"),healthy:u.boolean(),...wy,deployed:Je.nullable().optional().describe('only with "environment": the revision the component runs, as you read it from its revision source, or null when you could not tell')}),MY=u.object({component:Je,problem:Je,evidence:Je.describe("the exact command and output that shows it"),fix:Je.describe("what the user must provide, and where")}),_Y=u.object({framework:Je,file:Je.describe("the test file run, relative to its repository root"),result:u.enum(["pass","fail","error"])}),UY=u.object({input:Je.describe("the part of the user's SUT input, as given"),reason:Je}),u0=u.object({schemaVersion:u.literal(1),status:u.nativeEnum(ho).describe("ready only if every component came up healthy and the recipe is written"),components:u.array(FY),suites:u.array(_Y).default([]).describe("one run per test suite the Target's repositories have; empty when they have none"),inputsUsed:u.array(Je).default([]).describe("the parts of the user's SUT input the recipe used as given"),inputsUsedHow:u.array(u.object({input:Je.describe("exactly as written in inputsUsed; an entry that is not there is left out"),how:Je.describe("what the recipe did with it")})).optional(),inputsNotUsed:u.array(UY).default([]).describe("the parts it did not use, and why. A part that is wrong goes here, with what was wrong, even when the recipe does something like it instead: one that names a file, command, port, route or setting that does not exist or does not work"),blockers:u.array(MY).describe("required (non-empty) when status is blocked"),environment:Ga.optional().describe("only when the whole SUT is an existing deployment you tested where it runs, building and starting nothing: its address, what says it is ready, the credentials that reach it, and how to read what each component runs. Leave it out when any part was built or started on the runner, or reaching it needed something there (a tunnel, port-forward, proxy or client certificate)")});var Tu=64*1024,Du=512*1024,Qy=/[\u0000-\u0008\u000b\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;var l0=Re(require("path"));var vt=u.string().trim().min(1),by=(n=>(n.TestbotManaged="testbot_managed",n.CustomerDeployed="customer_deployed",n))(by||{}),Vd=[".skyramp/sut/setup.sh",".skyramp/sut/teardown.sh"],Sy=u.object({schemaVersion:u.literal(1),type:u.nativeEnum(by).optional(),status:u.enum(["ready","blocked"]),environment:Ga.optional(),components:u.array(u.object({name:vt,repository:vt.describe(`owner/repo, or "${Kt}" for a customer-deployed component no repository builds`),healthy:u.boolean(),url:u.string().min(1).nullable(),...wy,credentials:u.array(u.string().regex($a)).max(50).optional(),deployed:vt.nullable().optional().describe("customer_deployed only: the revision the component runs, as setup read it (WF-SETUP-22's Deployed now), or null when it could not tell")}).strict()),suites:u.array(u.object({framework:vt,file:vt,result:u.enum(["pass","fail","error"])}).strict()),inputsUsed:u.array(vt),inputsUsedHow:u.array(u.object({input:vt,how:vt}).strict()).optional(),inputsNotUsed:u.array(u.object({input:vt,reason:vt}).strict()),blockers:u.array(u.object({component:vt,problem:vt,evidence:vt,fix:vt}).strict()),replay:u.object({outcome:vt,durationSeconds:u.number().nonnegative().nullable()}).strict().nullable(),files:u.array(u.object({path:vt,content:u.string()}).strict())}).strict().superRefine((t,e)=>{t.inputsUsedHow?.forEach((s,i)=>{t.inputsUsed.includes(s.input)||e.addIssue({code:u.ZodIssueCode.custom,path:["inputsUsedHow",i,"input"],message:"not one of inputsUsed"})}),t.components.forEach((s,i)=>{s.credentials&&new Set(s.credentials).size!==s.credentials.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"credentials"],message:"names a credential twice"})});let n=t.type==="customer_deployed";n!==(t.environment!==void 0)&&e.addIssue({code:u.ZodIssueCode.custom,path:["environment"],message:"an environment exactly when the plan's type is customer_deployed"}),t.environment&&new Set(t.environment.credentials).size!==t.environment.credentials.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["environment","credentials"],message:"names a credential twice"});let r=new Set(t.components.map(s=>s.name));if(t.environment?.revisionSources.forEach((s,i)=>{s.components.forEach((a,c)=>{r.has(a)||e.addIssue({code:u.ZodIssueCode.custom,path:["environment","revisionSources",i,"components",c],message:"not one of components"})})}),t.components.forEach((s,i)=>{s.deployed!==void 0!==n&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"deployed"],message:"what a component runs exactly when the plan is customer_deployed"}),s.repository===Kt&&!n&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"repository"],message:`only a customer_deployed component is ${Kt}`})}),n&&(t.components.forEach((s,i)=>{t.components.findIndex(a=>a.name===s.name)!==i&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",i,"name"],message:"names a component twice"})}),t.replay!==null&&e.addIssue({code:u.ZodIssueCode.custom,path:["replay"],message:"a customer_deployed plan is never replayed"}),t.files.forEach((s,i)=>{Vd.includes(s.path)&&e.addIssue({code:u.ZodIssueCode.custom,path:["files",i,"path"],message:"a customer_deployed plan has no script that starts or stops the system"})})),n&&t.status==="ready"){let s=new Set(t.environment?.revisionSources.flatMap(i=>i.components));t.components.forEach((i,a)=>{i.repository!==Kt&&!s.has(i.name)&&e.addIssue({code:u.ZodIssueCode.custom,path:["components",a,"name"],message:"a ready customer_deployed plan reads what every component a repository builds runs"})})}});var I5=["clean","recipe-drift"];function Nu(t){let e=l0.posix.normalize(t);return e===t&&(e===".skyramp/workspace.yml"||e.startsWith(".skyramp/sut/")&&e.length>13)}var Mu=(n=>(n.GitHub="github",n.AzureDevOps="azure-devops",n))(Mu||{}),ky=(i=>(i.Trigger="TRIGGER",i.Baseline="BASELINE",i.AuthoritativeRelatedChange="AUTHORITATIVE_RELATED_CHANGE",i.ConfiguredSharedDependency="CONFIGURED_SHARED_DEPENDENCY",i.ManualOverride="MANUAL_OVERRIDE",i))(ky||{}),_u=(a=>(a.PullRequest="pull_request",a.ReadyForReview="ready_for_review",a.Schedule="schedule",a.Manual="manual",a.SutSetup="sut_setup",a.RevisionRead="revision_read",a))(_u||{}),LY=["sut_setup"],PY=["sut_setup","schedule","revision_read"];var jd=(e=>(e.PullRequest="pull_request",e))(jd||{}),Uu=(s=>(s.ModelProvider="model_provider",s.SutAccess="sut_access",s.Skyramp="skyramp",s.Other="other",s))(Uu||{});var qd=(i=>(i.ReportUploaded="report_uploaded",i.NoReport="no_report",i.Cancelled="cancelled",i.RecipeUploaded="recipe_uploaded",i.RevisionsUploaded="revisions_uploaded",i))(qd||{}),B0=(n=>(n.Running="running",n.Ended="ended",n))(B0||{}),Yd=(p=>(p.TimedOut="timed_out",p.AgentFailed="agent_failed",p.SetupFailed="setup_failed",p.CredentialMissing="credential_missing",p.RunnerLost="runner_lost",p.CheckoutFailed="checkout_failed",p.EnvironmentUnverified="environment_unverified",p.ModelProviderDenied="model_provider_denied",p.ModelProviderUnavailable="model_provider_unavailable",p.RunnerProviderNotReady="runner_provider_not_ready",p))(Yd||{}),Ry=(r=>(r.Onboard="onboard",r.Deploy="deploy",r.Recheck="recheck",r))(Ry||{}),xy=(n=>(n.Started="started",n.Finished="finished",n))(xy||{}),Ty=(r=>(r.Passed="passed",r.Failed="failed",r.Skipped="skipped",r))(Ty||{});var Dy=(r=>(r.ChooseCredential="choose_credential",r.FreeText="free_text",r.ChooseSource="choose_source",r))(Dy||{});var Jd=(r=>(r.Discover="discover",r.Start="start",r.Check="check",r))(Jd||{}),Wd=(s=>(s.ValidationPlan="validation_plan",s.TestEnvironment="test_environment",s.TestConditions="test_conditions",s.Tests="tests",s))(Wd||{}),Lu=(s=>(s.Found="found",s.Starting="starting",s.Up="up",s.OutOfScope="out_of_scope",s))(Lu||{}),er=u.string().regex(/^[1-9][0-9]{0,18}$/),br=u.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),ja=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,Lt=u.string().regex(ja),Pt=u.string().regex(/^[0-9a-f]{64}$/),Hd=u.object({id:Lt,revision:er}).strict(),zd={provider:u.literal("github"),providerAccountId:er,providerRepositoryId:er},Kd={provider:u.literal("azure-devops"),providerAccountId:Lt,providerRepositoryId:Lt},tr=u.discriminatedUnion("provider",[u.object(zd).strict(),u.object(Kd).strict()]),Ny=u.discriminatedUnion("provider",[u.object(zd).passthrough(),u.object(Kd).passthrough()]),fo=t=>`${t.provider}:${t.providerRepositoryId}`,A0={namespace:u.string().min(1),name:u.string().min(1)},w0=u.discriminatedUnion("provider",[u.object({...zd,...A0}).strict(),u.object({...Kd,...A0}).strict()]),d0=u.object({ref:u.string().min(1),revision:br}).strict(),OY=u.object({repository:w0,revision:br,ref:u.string().nullable(),reason:u.nativeEnum(ky),change:u.object({kind:u.nativeEnum(jd),number:er,base:d0.optional()}).strict().nullable(),compareWith:d0.optional()}).strict();function $Y(t){if(t.trigger.kind==="revision_read"!=!t.baseline)return t.baseline?"a revision_read run names no baseline":"names its baseline";if(!t.baseline)return null;let{confirmedRunId:e,initialBaselineId:n,sources:r}=t.baseline;if(e!==null&&n!==void 0)return"a run compares with one baseline";let s=t.trigger.kind==="schedule"&&e!==null||n!==void 0;if(!r)return s?"names every source of the snapshot, once":null;if(e===null&&n===void 0)return"a run with no Confirmed Baseline names no baseline sources";let i=new Set(t.sources.map(l=>fo(l.repository))),a=new Set(r.map(l=>fo(l.repository)));return a.size===r.length&&a.size===i.size&&[...a].every(l=>i.has(l))?null:"names every source of the snapshot, once"}var Q0=/^[A-Z][A-Z0-9_]+-[1-9][0-9]*$/,b0=/^[1-9][0-9]{0,18}$/,p0=new RegExp(`${Q0.source}|${b0.source}`),h0=/^https:\/\/[a-z0-9-]+(\.[a-z0-9-]+)+$/,VY=u.union([u.object({source:u.literal("jira"),site:u.string().regex(h0),key:u.string().regex(Q0),updated:u.string().datetime(),contentHash:Pt}).strict(),u.object({source:u.literal("confluence"),site:u.string().regex(h0),key:u.string().regex(b0),version:u.number().int().positive(),contentHash:Pt}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Sd),contentHash:Pt}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Eu),contentHash:Pt,fileName:u.string().min(1).max(255),mediaType:u.nativeEnum(Cu)}).strict()]),f0=u.union([u.literal("jira"),u.literal("confluence")]),GY=u.object({schemaVersion:u.literal(1),items:u.array(u.union([u.object({source:f0,site:u.string(),key:u.string().regex(p0),state:u.literal("read"),text:u.string(),version:u.string().min(1),contentMatches:u.boolean()}).strict(),u.object({source:f0,site:u.string(),key:u.string().regex(p0),state:u.literal("not_read"),reason:u.nativeEnum(Wi)}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Sd),state:u.literal("read"),text:u.string(),version:u.string().min(1),contentMatches:u.boolean()}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Sd),state:u.literal("not_read"),reason:u.nativeEnum(Wi)}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Eu),state:u.literal("read"),version:Pt,fileName:u.string().min(1).max(255),mediaType:u.nativeEnum(Cu)}).strict(),u.object({source:u.literal("other"),key:u.string().regex(Eu),state:u.literal("not_read"),reason:u.nativeEnum(Wi)}).strict()])),instructions:u.array(u.string()).optional()}).strict(),HY=u.object({schemaVersion:u.literal(1),runId:Lt,skyrampOrgId:Lt,target:Hd,policy:Hd.nullable(),trigger:u.object({kind:u.nativeEnum(_u),requestedAt:u.string().datetime()}).strict(),configuration:u.object({captureId:Lt,revision:er.nullable(),hash:Pt}).strict(),baseline:u.object({confirmedRunId:Lt.nullable(),initialBaselineId:Lt.optional(),sources:u.array(u.object({repository:tr,revision:br}).strict()).optional()}).strict().optional(),sources:u.array(OY).min(1),execution:u.object({provider:u.nativeEnum(Mu),repository:w0,workflowPath:u.string(),ref:u.string()}).strict(),credentials:u.array(u.object({name:u.string(),purpose:u.nativeEnum(Uu),required:u.boolean()}).strict()),requirements:u.array(VY).min(1).optional(),instructions:u.object({contentHash:Pt}).strict().optional(),deployedRevisions:u.array(u.object({repository:tr,revision:br}).strict()).min(1).optional()}).strict().superRefine((t,e)=>{let n=new Set;(t.requirements??[]).forEach((l,A)=>{let p="fileName"in l?"file":"pasted";l.source==="other"&&l.key!==`${p}-${l.contentHash.slice(0,16)}`&&e.addIssue({code:u.ZodIssueCode.custom,message:"is not the key of its content hash",path:["requirements",A,"key"]});let h=my({source:l.source,key:l.key});n.has(h)&&e.addIssue({code:u.ZodIssueCode.custom,message:"names an item that the run already names",path:["requirements",A,"key"]}),n.add(h)});let r=t.trigger.kind,s=LY.includes(r);s!==(t.policy===null)&&e.addIssue({code:u.ZodIssueCode.custom,path:["policy"],message:s?`a ${r} run has no policy`:"names the policy revision"});let i=$Y(t);i&&e.addIssue({code:u.ZodIssueCode.custom,path:t.baseline?["baseline","sources"]:["baseline"],message:i}),PY.includes(r)&&t.sources.forEach((l,A)=>{l.reason!=="BASELINE"&&e.addIssue({code:u.ZodIssueCode.custom,path:["sources",A,"reason"],message:`a ${r} run selects only BASELINE sources`})}),t.deployedRevisions&&r!=="manual"&&e.addIssue({code:u.ZodIssueCode.custom,path:["deployedRevisions"],message:"only a manual run pins deployed revisions"});let a=new Set(t.sources.map(l=>fo(l.repository))),c=new Set;(t.deployedRevisions??[]).forEach((l,A)=>{let p=fo(l.repository);a.has(p)?c.has(p)&&e.addIssue({code:u.ZodIssueCode.custom,path:["deployedRevisions",A,"repository"],message:"repository appears twice"}):e.addIssue({code:u.ZodIssueCode.custom,path:["deployedRevisions",A,"repository"],message:"names a repository outside the snapshot"}),c.add(p)}),t.sources.forEach((l,A)=>{l.compareWith&&(l.reason!=="MANUAL_OVERRIDE"||l.change)&&e.addIssue({code:u.ZodIssueCode.custom,path:["sources",A,"compareWith"],message:"only a MANUAL_OVERRIDE source without a change names a revision to compare with"})})});var S0=(n=>(n.Person="person",n.Policy="policy",n))(S0||{}),jY=u.object({kind:u.nativeEnum(S0),name:u.string().min(1).max(256)}).strict(),qY=u.object({mcp:u.discriminatedUnion("source",[u.object({source:u.literal("npm"),version:u.string().regex(/^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/).nullable()}).strict(),u.object({source:u.literal("github"),ref:u.string().regex(/^[A-Za-z0-9._/-]{1,255}$/)}).strict()]),bedrock:u.object({region:u.string().regex(/^[a-z]{2}(-[a-z]+)+-[0-9]$/),roleArn:u.string().regex(/^arn:aws(-[a-z]+)*:iam::[0-9]{12}:role\/[\w+=,.@/-]{1,512}$/)}).strict().nullable()}).strict(),k5=u.object({schemaVersion:u.literal(1),attempt:u.object({id:Lt,number:u.number().int().positive(),deadlineAt:u.string().datetime()}).strict(),manifest:HY,manifestHash:Pt,entitlements:u.array(u.string()).optional(),runToken:u.string().min(1).optional(),requestedBy:jY.nullable().optional(),writeAllowed:u.boolean().optional(),claudeCodeVersion:u.string().regex(/^[0-9]+\.[0-9]+\.[0-9]+$/,"an exact version, such as 2.1.290").nullable().optional(),deployedRevisions:u.array(u.object({repository:tr,revision:br}).strict()).optional(),statedRevisions:u.array(u.object({repository:tr,revision:br}).strict()).optional(),runSettings:qY.optional()}).strict(),g0={providerRunAttempt:u.number().int().positive(),workflowRef:u.string().min(1)},YY=u.string().regex(/^[^/]+\/[^/]+\/[1-9][0-9]{0,15}\/[1-9][0-9]{0,15}$/),R5=u.object({schemaVersion:u.literal(1),runId:Lt,execution:u.discriminatedUnion("provider",[u.object({...g0,provider:u.literal("github"),repository:u.object(zd).strict(),providerRunId:er}).strict(),u.object({...g0,provider:u.literal("azure-devops"),repository:u.object(Kd).strict(),providerRunId:YY}).strict()]),requester:u.literal(!0).optional(),writeCheck:u.literal(!0).optional(),claudeCodePin:u.literal(!0).optional(),deployedPins:u.literal(!0).optional(),statedPins:u.literal(!0).optional(),runSettings:u.literal(!0).optional()}).strict(),m0=u.object({repository:tr,number:er,commitSha:br.optional()}).strict(),JY=u.discriminatedUnion("status",[u.object({status:u.literal("none")}).strict(),u.object({status:u.literal("delivered"),pullRequests:u.array(m0).min(1)}).strict(),u.object({status:u.literal("partial"),pullRequests:u.array(m0).min(1),failures:u.array(u.object({repository:tr,message:u.string()}).strict()).min(1)}).strict(),u.object({status:u.literal("failed"),message:u.string()}).strict()]),WY=u.object({blockedPreflight:u.object({file:u.string().min(1),repository:u.string().min(1).optional(),reason:u.string().min(1).max(300),evidence:u.string().min(1).max(400)}).strict().optional(),sufficiency:u.nativeEnum(zi),rationale:u.string().min(1),gaps:u.array(u.string().min(1)),acceptedEvidence:u.array(u.object({kind:u.nativeEnum(Ps),repository:u.string().min(1),revision:br,reference:u.string().min(1),summary:u.string().min(1)}).strict()),actionRequired:u.array(u.nativeEnum(xa))}).strict().superRefine((t,e)=>{t.sufficiency==="insufficient"!=t.gaps.length>0&&e.addIssue({code:u.ZodIssueCode.custom,path:["gaps"],message:"only insufficient evidence names gaps, and it names at least one"}),new Set(t.actionRequired).size!==t.actionRequired.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["actionRequired"],message:"a reason appears twice"})}),Gd=500,v0=2048,k0=1e3,zY=/[\\/:*?"<>|;#$*{},+=[\]%\p{Cc}\p{Cf}]/u,y0=t=>t.length>0&&t.length<=64&&t===t.trim()&&!zY.test(t)&&!/[^\S ]/u.test(t)&&!/^[._]/.test(t)&&!t.endsWith("."),KY=t=>{if(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/.test(t))return!0;let[e,n,r,...s]=t.split("/");return t.length<=201&&s.length===0&&r!==void 0&&/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,48}[A-Za-z0-9])?$/.test(e)&&y0(n)&&y0(r)},ZY=u.object({testResults:u.array(u.object({resultId:u.string().regex(/^[^\u0000-\u001f]{1,512}$/),repository:u.string().refine(KY,"Invalid"),testType:u.string(),endpoint:u.string(),status:u.enum(["Pass","Fail","Skipped"]),details:u.string(),fileName:u.string().optional(),testId:u.string().regex(/^[^\u0000-\u001f]{1,512}$/).optional(),failureCause:u.object({kind:u.nativeEnum(kd),family:u.nativeEnum(Rd).optional()}).strict().optional(),origin:u.nativeEnum(vd).optional()}).strict()),validation:WY,changes:u.array(u.object({id:u.string().min(1).max(512),text:u.string().max(16384),source:u.string().max(v0),testedBy:u.array(u.string().min(1).max(1024)).max(Gd),writtenBy:u.array(u.string().min(1).max(1024)).max(Gd),maintainedBy:u.array(u.string().min(1).max(1024)).max(Gd)}).strict()).max(k0).optional(),traceVersion:u.literal(1)}).passthrough().superRefine((t,e)=>{let n=new Set;t.testResults.forEach((r,s)=>{let i=r.failureCause;i&&r.status==="Pass"&&e.addIssue({code:u.ZodIssueCode.custom,path:["testResults",s,"failureCause"],message:"a passing result has no failure cause"}),i&&i.kind==="environment"!=(i.family!==void 0)&&e.addIssue({code:u.ZodIssueCode.custom,path:["testResults",s,"failureCause"],message:"an environment cause names its family, and no other cause does"});let a=["testResults",s,"resultId"],c=r.resultId.slice(`${r.repository}:${r.testType}:`.length);(!r.resultId.startsWith(`${r.repository}:${r.testType}:`)||c===""||c.startsWith("/")||c.startsWith("#"))&&e.addIssue({code:u.ZodIssueCode.custom,path:a,message:"is not repository:testType:path for this result"}),n.has(r.resultId)&&e.addIssue({code:u.ZodIssueCode.custom,path:a,message:"stable identity repeated"}),n.add(r.resultId)})});var R0=50,E0=u.string().regex(/^(?!.*\.\.)(?!\/)(?!.*\/$)[A-Za-z0-9._/-]{1,255}$/),x0=u.discriminatedUnion("kind",[u.object({kind:u.literal("branch_pushed"),repository:tr,branch:E0,commit:br}).strict(),u.object({kind:u.enum(["pull_request_opened","pull_request_edited"]),repository:tr,number:er,branch:E0}).strict()]),XY=u.object({schemaVersion:u.literal(1),run:u.object({runId:Lt,attemptNumber:u.number().int().positive(),manifestHash:Pt}).strict(),target:Hd,policy:Hd,provenance:u.object({sources:u.array(u.object({repository:tr,revision:br}).strict()),firstQualification:u.literal(!0).optional()}).strict(),delivery:u.object({generatedTests:JY}).strict(),producer:u.object({testbot:u.string().regex(/^[0-9A-Za-z.+-]{1,64}$/),mcp:u.string().regex(/^[0-9A-Za-z.+-]{1,64}$/)}).strict(),report:ZY,githubWrites:u.array(x0).max(R0).optional()}).strict(),x5=XY.pick({schemaVersion:!0,run:!0,target:!0,provenance:!0,producer:!0}).extend({recipe:Sy}).strict().superRefine(({recipe:t},e)=>{let n=(i,a)=>e.addIssue({code:u.ZodIssueCode.custom,path:["recipe",...i],message:a});t.status==="blocked"&&t.blockers.length===0&&n(["blockers"],"a blocked recipe names at least one blocker");let r=new Set,s=0;t.files.forEach((i,a)=>{Nu(i.path)||n(["files",a,"path"],"is not .skyramp/workspace.yml or a file under .skyramp/sut/"),r.has(i.path)&&n(["files",a,"path"],"file repeated"),r.add(i.path),Qy.test(i.content)&&n(["files",a,"content"],"is not text");let c=Buffer.byteLength(i.content,"utf8");s+=c,c>Tu&&n(["files",a,"content"],`larger than ${Tu} bytes`)}),s>Du&&n(["files"],`recipe text over ${Du} bytes in total`)}),T5=u.object({components:u.array(u.object({name:u.string().min(1),repository:u.string().regex(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/),observedRevision:u.string().regex(/^[0-9a-f]{7,64}$/).nullable(),source:u.nativeEnum(xd),evidence:u.string()}).strict().refine(t=>t.source!=="agent"||t.observedRevision===null,{path:["observedRevision"],message:"a component only an agent session can read names no revision"}))}).strict();var eJ=u.object({schemaVersion:u.literal(1),stage:u.nativeEnum(Ry),event:u.nativeEnum(xy),status:u.nativeEnum(Ty).optional()}).strict().refine(t=>t.status===void 0||t.event==="finished",{path:["status"],message:"only a finished stage has a status"}),qa=100,Fy=5e3,Fu=2e3,vy=100,My=/^[A-Za-z0-9_-]{1,64}$/,T0=20,D0=200,N0=100,F0=100,tJ=200,C0="[^/\\s](?:(?:[^/\\s]| )*[^/\\s])?",nJ=new RegExp(`^(?:[^/\\s]+/[^/\\s]+|[^/\\s]+/${C0}/${C0})$`),M0=500,_0=50,Pu=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Nn=t=>u.string().max(t).refine(e=>e.trim().length>0&&!Pu.test(e),"blank, or not text"),cs={sequence:u.number().int().min(1).max(Fy),at:u.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?Z$/)},U0=u.discriminatedUnion("kind",[u.object({...cs,kind:u.literal("log"),phase:u.nativeEnum(Jd),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("component"),name:Nn(vy),repository:Nn(tJ).refine(t=>nJ.test(t)||t===Kt,"not owner/name"),file:Nn(M0).nullable(),status:u.nativeEnum(Lu),version:Nn(F0).optional()}).strict(),u.object({...cs,kind:u.literal("reply"),to:u.string().uuid(),accepted:u.boolean(),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("question"),id:u.string().regex(My),type:u.nativeEnum(Dy),text:Nn(Fu),component:Nn(vy).nullable(),choices:u.array(Nn(D0)).max(T0),placeholder:Nn(N0).optional()}).strict(),u.object({...cs,kind:u.literal("delivered"),ids:u.array(u.string().uuid()).max(qa)}).strict(),u.object({...cs,kind:u.literal("credentials"),names:u.array(u.string().regex($a)).min(1).max(_0)}).strict()]).superRefine((t,e)=>{t.kind==="credentials"&&new Set(t.names).size!==t.names.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["names"],message:"a name twice"}),t.kind==="question"&&(t.type==="free_text"!=(t.choices.length===0)&&e.addIssue({code:u.ZodIssueCode.custom,path:["choices"],message:"choices exactly when the question is not free_text"}),new Set(t.choices).size!==t.choices.length&&e.addIssue({code:u.ZodIssueCode.custom,path:["choices"],message:"a choice twice"}))}),rJ=u.object({schemaVersion:u.literal(1),events:u.array(U0).max(qa)}).strict(),L0=u.discriminatedUnion("kind",[u.object({...cs,kind:u.literal("log"),stage:u.nativeEnum(Wd),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("reply"),to:u.string().uuid(),accepted:u.boolean(),text:Nn(Fu)}).strict(),u.object({...cs,kind:u.literal("delivered"),ids:u.array(u.string().uuid()).max(qa)}).strict()]),sJ=u.object({schemaVersion:u.literal(1),events:u.array(L0).max(qa)}).strict(),I0={id:u.string().uuid(),text:u.string(),by:u.string().nullable(),at:u.string(),replied:u.literal(!0).optional()},P0=u.discriminatedUnion("kind",[u.object({...I0,kind:u.literal("instruction"),question:u.null()}),u.object({...I0,kind:u.literal("answer"),question:u.string().regex(My)})]),O0=u.string().regex(/^[A-Za-z0-9+/]{43}=$/),iJ=u.object({id:u.string().uuid(),revision:u.string(),by:u.string().nullable(),at:u.string(),target:u.string(),own:u.object({source:u.enum(["policy","test_environment"]),text:u.string()}).nullable()}),oJ=u.object({schemaVersion:u.literal(1),leftOut:u.array(u.string()),messages:u.array(P0).optional(),stop:u.object({key:O0}).optional(),notes:iJ.optional()}),aJ=u.object({schemaVersion:u.literal(1),messages:u.array(P0).optional()});var $0=500*1024*1024,V0=u.object({id:er,name:u.string().regex(/^[A-Za-z0-9._-]{1,200}$/),providerRunId:er,expiresAt:u.string().datetime()}).strict(),cJ=u.object({schemaVersion:u.literal(1),artifact:V0,sessionId:Lt,contentHash:Pt,bytes:u.number().int().min(1).max($0)}).strict(),uJ=u.object({schemaVersion:u.literal(1),checkpoint:u.object({artifact:V0,repository:u.object({namespace:u.string().min(1),name:u.string().min(1)}).strict(),sessionId:Lt,contentHash:Pt,key:O0}).strict().nullable()}).strict(),lJ=200,Ha=100,_y=(r=>(r.Resume="resume",r.Retry="retry",r.Update="update",r))(_y||{}),AJ=u.object({kind:u.nativeEnum(_y),setup:u.object({runId:Lt,endedAt:u.string().nullable(),outcome:u.string().nullable()}).strict(),components:u.array(u.object({name:u.string().min(1),repository:u.string().min(1),status:u.nativeEnum(Lu)}).strict()).max(Ha),credentials:u.array(u.string().min(1)).max(Ha),answers:u.array(u.object({question:u.string(),answer:u.string().nullable()}).strict()).max(Ha),instructions:u.array(u.object({text:u.string(),reply:u.string().nullable()}).strict()).max(Ha),log:u.array(u.object({phase:u.nativeEnum(Jd),text:u.string()}).strict()).max(lJ),recipe:u.object({files:u.array(u.object({path:u.string().min(1),content:u.string()}).strict()).max(Ha),blockers:u.array(u.object({component:u.string(),problem:u.string(),evidence:u.string(),fix:u.string()}).strict()).max(Ha)}).strict().optional()}).strict(),dJ=u.object({schemaVersion:u.literal(1),context:AJ.nullable()}).strict(),pJ=u.object({schemaVersion:u.literal(1),configuration:u.object({captureId:Lt,revision:er.nullable(),hash:Pt}).strict(),capture:u.object({schemaVersion:u.literal(1),settings:u.object({target:u.object({environment:u.unknown()}).passthrough(),timeoutMinutes:u.number().int().positive(),answerWaitMinutes:u.number().int().positive().optional(),testEnvironment:u.object({name:u.string().min(1),address:u.string().min(1).optional(),readyWhen:u.string().min(1).optional()}).passthrough().optional()}).passthrough(),provenance:u.object({}).passthrough(),hash:Pt}).strict()}).strict(),hJ=Ga.extend({version:u.number().int().positive(),components:u.array(u.object({name:u.string().min(1),repository:u.string().min(1)}).strict()),contentHash:Pt.optional(),files:u.array(u.object({path:u.string().refine(t=>Nu(t)&&!Vd.includes(t),"not a file of a customer_deployed plan"),content:u.string()}).strict()).optional()}).strict(),fJ=u.object({schemaVersion:u.literal(1),testEnvironment:hJ.nullable().optional(),runtimePlan:u.object({version:u.number().int().positive(),contentHash:Pt,files:u.array(u.object({path:u.string().refine(Nu,"not a recipe file path"),content:u.string()}).strict()).min(1),recipe:u.record(u.unknown()).optional()}).strict().nullable()}).strict().refine(t=>!(t.runtimePlan&&t.testEnvironment),{message:"a run pins a recipe or a customer's Test Environment, never both",path:["testEnvironment"]}),gJ=u.object({schemaVersion:u.literal(1),state:u.nativeEnum(B0),ending:u.nativeEnum(qd).nullable(),cause:u.nativeEnum(Yd).nullable(),deadlineAt:u.string().datetime()}).strict();function G0(t){return t.reportUploaded?{schemaVersion:1,reason:"report_uploaded",cause:null}:t.recipeUploaded?{schemaVersion:1,reason:"recipe_uploaded",cause:null}:t.revisionsUploaded?{schemaVersion:1,reason:"revisions_uploaded",cause:null}:t.cancelled?{schemaVersion:1,reason:"cancelled",cause:null}:{schemaVersion:1,reason:"no_report",cause:mJ(t)}}function mJ(t){return t.runnerProviderNotReady?"runner_provider_not_ready":t.credentialMissing?"credential_missing":t.checkoutFailed?"checkout_failed":t.environmentUnverified?"environment_unverified":t.setupFailed?"setup_failed":t.timedOut?"timed_out":t.modelProviderDenied?"model_provider_denied":t.modelProviderUnavailable?"model_provider_unavailable":"agent_failed"}var H0=".skyramp/sut/deployed-revisions.sh",Uy=(n=>(n.Running="running",n.Requested="requested",n))(Uy||{});var U5=new Set(Object.values(Uy));var L5=`Fix ${H0} so it prints the full commit each component runs, then set it up again.`;var Xd="shared-environment";var z5=64*1024;var K5=new Set(["version_endpoint","api"]);function ep(t){return(t?.components??[]).filter(e=>!!e.repository&&!!e.expectedRevision)}function j0(t){return ep(t).length>0||(t?.dependencies.length??0)>0}function q0(t){let e=t.inputs?.sharedEnvironment;if(!j0(e))return;let n=Ut(t,`${Xd}.json`);if(n)return{components:CJ(e,n.components),dependencies:n.dependencies};let r="Not checked: the run ended before it checked the shared environment.";return{components:ep(e).map(s=>Y0(s,r)),dependencies:e.dependencies.map(s=>({name:s.name,url:s.url,version:null,evidence:r}))}}var Y0=(t,e)=>({name:t.name,repository:t.repository,url:t.url,expectedRevision:t.expectedRevision,observedRevision:null,status:"unverifiable",source:t.revisionUrl||t.revisionScript?"probe":"agent",evidence:e});function CJ(t,e){let n=new Set(e.map(s=>s.name.toLowerCase())),r=ep(t).filter(s=>s.touched&&!n.has(s.name.toLowerCase()));return[...e,...r.map(s=>Y0(s,"Not checked: the run recorded no read of it."))]}function Py(t){return(q0(t)?.components??[]).filter(e=>e.status!=="verified")}function Oy(t){return(t?.components??[]).filter(e=>!!e.repository&&!e.expectedRevision)}function $y(t){return Vy(t)&&Py(t).length===0&&Oy(t.inputs?.sharedEnvironment).length===0}function Vy(t){let e=bJ(t);if(!e&&t.state.stages.deploy?.status!=="passed")return!1;let n=Ut(t,"deploy.json");return n?n.outcome==="clean"||n.outcome==="recipe-drift":!e}function bJ(t){let e=t.state.stages.plan,n=t.state.stages.deploy;return!(t.inputs?.pipeline?t.inputs.pipeline==="two-step":!n)||e?.status!=="passed"?!1:!n||n.updatedAt<=e.updatedAt}var go=(a=>(a.Place="place",a.Update="update",a.Regenerate="regenerate",a.Delete="delete",a.Verify="verify",a.None="none",a))(go||{}),Mn=(r=>(r.Pass="pass",r.Fail="fail",r.Skip="skip",r))(Mn||{}),Fn=u.string().trim().min(1),z0=u.object({case:Fn.describe("a covers id \u2014 the recommend case this test realizes"),status:u.nativeEnum(Mn)}),K0=u.object({exit:u.number({invalid_type_error:"must be a number or null"}).nullable().describe("process exit of the re-run; null when no SUT was available"),details:u.string().optional().describe("what failed, or why a file was not run \u2014 required on any non-zero exit"),tests:u.array(z0).optional().describe("ONE ENTRY PER CASE the file covers; must agree with exit (0 \u2192 no fail; non-zero \u2192 at least one)")}),Z0=u.object({from:u.string().optional().describe("staged path \u2014 required for placements"),file:Fn.describe("final path relative to its repository, inside that checkout, with a source-file extension"),repository:Fn.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),action:u.nativeEnum(go),covers:u.array(u.string()).optional().describe("recommend ids a placed test covers"),repro:u.boolean().optional().describe("this test is MEANT to fail \u2014 it reproduces a reported bug"),finding:u.boolean().optional().describe("a non-repro test that failed on a REAL product bug"),placementBroken:u.boolean().optional().describe('placement/harness problem one repair could not fix \u2014 every reran.tests entry is then "skip"'),keptReason:Fn.optional().describe("why a planned delete/regenerate was declined and the file kept"),isolatedRun:Fn.optional().describe('only for a test marked "runs alone": the command, from its checkout root and without a shell, that runs only this file and writes its JUnit XML into $SKYRAMP_RESULTS_DIR (named by its path: no shell expands it) \u2014 the harness runs it, so leave reran.exit null'),reran:K0,assertionCount:u.number().int().nonnegative().optional().describe("[derived] assertions reachable from the file, counted at write time")}).refine(t=>t.action!=="place"||typeof t.from=="string"&&t.from.trim().length>0,{message:'is a place but has no "from" staged path',path:[]}),X0=(n=>(n.Junit="junit",n.Converter="converter",n))(X0||{}),SJ=Fn.optional().describe("the items[].file this test is in \u2014 needed only when two of this suite's files cover the same case id"),vJ=u.object({results:Fn.describe("the JUnit XML file this run wrote, a plain file name inside $SKYRAMP_RESULTS_DIR (e.g. backend.xml)"),source:u.nativeEnum(X0),run:Fn.describe("the command you ran that wrote it, exactly as you ran it (with any converter)"),files:u.array(Fn).min(1).describe("the items[].file paths this run covered"),cases:u.array(u.object({test:Fn.describe("the test's name as the runner reports it, qualified by its class or file (e.g. tests/test_a.py::test_x) when the bare name repeats"),case:Fn.describe("the covers id it realizes"),file:SJ})).describe("map each reported test name to the case it covers")}),kJ=u.object({suites:u.array(vJ).min(1)}),Gy=u.object({schemaVersion:u.literal(1),items:u.array(Z0),runnerResults:kJ.optional().describe("the JUnit XML your test runs wrote into $SKYRAMP_RESULTS_DIR, so the harness reads each test's result from the runner \u2014 omit only when no SUT is available"),ignored:u.array(u.string()).describe("existing tests assessed and deliberately left untouched"),summary:Fn.describe("one paragraph")});var FX=10*6e4;var mo=Re(require("fs"));function tT(t){let e=[];for(let n of FJ(t)){let r=n;r?.type==="tool_use"&&typeof r.name=="string"&&e.push(r.name)}return e}function nT(t){return tT(t).some(e=>/^mcp__skyramp__skyramp_(contract|integration)_test_generation$/.test(e))}function rT(t){return tT(t).some(e=>e==="mcp__skyramp__skyramp_ui_test_generation")}function NJ(t){if(!mo.existsSync(t))return{};for(let e of mo.readFileSync(t,"utf-8").split(`
117
117
  `)){let n=e.trim();if(n)try{let r=JSON.parse(n);if(r.type==="system"&&r.subtype==="init"&&Array.isArray(r.mcp_servers))return Object.fromEntries(r.mcp_servers.filter(s=>typeof s.name=="string").map(s=>[s.name,typeof s.status=="string"?s.status:"unknown"]))}catch{}}return{}}function sT(t){let e=NJ(t).skyramp;return e===void 0||e==="connected"}function FJ(t){if(!mo.existsSync(t))return[];let e=[];for(let n of mo.readFileSync(t,"utf-8").split(`
118
118
  `)){let r=n.trim();if(!r)continue;let s;try{s=JSON.parse(r)}catch{continue}let i=s.message?.content;Array.isArray(i)&&e.push(...i)}return e}var jy=[".skyramp/sut",".skyramp/workspace.yml"];var $X=256*1024*1024;var VX=["--",":/",...jy.map(t=>`:(exclude)${t}`)];var rp=(s=>(s.RestApi="rest-api",s.Frontend="frontend",s.FullStack="full-stack",s.Other="other",s))(rp||{}),yo=(s=>(s.Critical="critical",s.High="high",s.Medium="medium",s.Low="low",s))(yo||{}),Ya=(r=>(r.Suspected="suspected",r.Latent="latent",r.Refuted="refuted",r))(Ya||{}),Yy=(r=>(r.Skyramp="skyramp",r.External="external",r.Unknown="unknown",r))(Yy||{}),Jy=(s=>(s.Cascade="cascade",s.Restrict="restrict",s.Orphan="orphan",s.Unknown="unknown",s))(Jy||{}),Ys=(s=>(s.RequirementReference="requirement-reference",s.Spec="spec",s.PrDescription="pr-description",s.CouldBreak="could-break",s))(Ys||{}),Fe=u.string().trim().min(1),Ja=Fe.describe("file:line"),iT=t=>Fe.refine(e=>e.length<=400,e=>({message:`is ${e.length} characters, over the 400 cap \u2014 ${t}`})),Ou=Fe.optional().describe('multi-repo only: the OTHER checkout this lives in \u2014 its "owner/repo" slug, or the directory name if the run discovered it; omit for the working checkout'),qy=u.object({method:Fe,path:Fe,service:u.string().optional(),evidence:Ja,repository:Ou}),MJ=u.object({id:Fe.describe("short-slug, e.g. R9"),statement:Fe.max(400,"exceeds 400 characters \u2014 state the requirement, do not paste the spec section").describe("a testable obligation, not a summary"),source:u.nativeEnum(Ys).describe("spec outranks pr-description when both state it"),evidence:Fe.describe("spec: file:line or a section locator. pr-description: the quoted phrase it comes from.")}),_J=u.object({id:Fe.describe("short-slug"),statement:Fe.max(400,"exceeds 400 characters \u2014 state the behaviour, do not paste the code").describe("what the change makes true"),surface:Fe.describe("METHOD /path, or a component/page name"),evidence:Fe.describe("file:line from the diff that introduces it"),repository:Ou,satisfies:u.array(Fe).optional().describe("requirement ids (from `requirements`) this behaviour correctly implements \u2014 a requirement met only in part is ALSO named by the finding that shows the rest (conflictsWith)")}),UJ=u.object({id:Fe.describe("short-slug"),file:Fe,line:u.number().optional(),claim:iT("shorten it to the one sentence that states the defect, and move the supporting detail into `evidence`"),severity:u.nativeEnum(yo),evidence:iT("cite the file:line and the one line that shows it, rather than reproducing the surrounding code").describe("quoted diff/code line"),status:u.nativeEnum(Ya),repository:Ou,conflictsWith:u.array(Fe).optional().describe("requirement ids (from `requirements`) this defect contradicts or leaves unimplemented \u2014 a lower-precedence source (the diff, or the PR description) lost")}),LJ=u.object({name:Fe,language:u.string().optional(),framework:u.string().optional(),evidence:Ja,repository:Ou}),PJ=u.object({dir:Fe,framework:u.string().optional(),kind:u.nativeEnum(Yy),evidence:Ja,repository:Ou}),OJ=u.object({from:Fe,to:Fe,onDelete:u.nativeEnum(Jy),evidence:Ja}),$J=u.object({entity:Fe,field:Fe,values:u.array(u.string()),evidence:Ja}),VJ=u.object({entities:u.array(u.object({name:Fe,evidence:Ja})),references:u.array(OJ).describe("INBOUND references \u2014 what still points at an entity when it is deleted"),stateFields:u.array($J)}),Wy=u.object({schemaVersion:u.literal(1),repository:u.object({path:Fe.describe("absolute repo path"),currentBranch:Fe,baseBranch:Fe}),project:u.object({type:u.nativeEnum(rp),primaryLanguage:Fe,languages:u.array(u.string()),frameworks:u.array(u.string())}),services:u.array(LJ),infrastructure:u.object({containerized:u.boolean(),hasDockerCompose:u.boolean(),composeFiles:u.array(u.string()),hasCiCd:u.boolean()}),diff:u.object({changedFiles:u.array(u.string()).describe("as git reports them; a file in another checkout may carry that repo's name"),nonApplicationOnly:u.boolean(),summary:Fe.describe("\u2264400 chars")}),endpoints:u.object({new:u.array(qy),modified:u.array(qy),removed:u.array(qy)}),existingTests:u.object({locations:u.array(PJ)}),entityMap:VJ,requirements:u.array(MJ).describe("from a spec (attached or linked) and/or the PR description; empty when neither states a testable obligation"),behaviors:u.array(_J),findings:u.array(UJ),unexamined:u.array(u.string()).describe("files or areas outside this change you did not open"),summary:Fe.describe("one paragraph on what this change does and its test-relevant risk")});var jJ=u.object({route:u.string().describe('the page this step happens on, e.g. "/products/:id"'),action:u.string().describe('what the user does there, through the UI, e.g. "clicks Add to cart"'),clauses:u.array(u.string()).optional().describe("the plan clause ids this step exercises"),check:u.string().optional().describe("what the user then sees that shows the step worked; the test asserts it")}),$u=(n=>(n.InProcess="in-process",n.Browser="browser",n))($u||{}),oT=(r=>(r.Spec="spec",r.PrDescription="pr-description",r.Inferred="inferred",r))(oT||{}),aT=u.object({id:u.string().describe('e.g. "J1"'),name:u.string().describe(`the flow in a user's words, e.g. "buy a product with a coupon"`),entry:u.string().describe("the route the user starts the flow on: the app's normal starting page for it, never a deep link into its middle"),steps:u.array(jJ).describe("every step, in order, from the entry page to the outcome: at least two"),outcome:u.string().describe("what the user sees at the end that shows the flow worked: every part of it"),finishes:u.string().optional().describe('the user action that completes the task, verb first, e.g. "places the order"; the journey walks on to it'),kind:u.nativeEnum($u).optional().describe("in-process when the repo's in-process tests (components, app routes) can walk the whole flow and check it; else browser"),source:u.nativeEnum(oT).optional().describe("spec or pr-description when one describes this flow (quote it under evidence), else inferred"),evidence:u.string().optional().describe("for spec or pr-description: its words that describe the flow"),testFile:u.string().describe("the browser test file it goes in, beside the repo's existing e2e tests")}),sp=u.object({journey:u.string().describe("the plan's journey id"),file:u.string().describe("the browser test file that walks it"),brokeAt:u.object({step:u.number().int().describe("the 1-based step whose check failed first"),expected:u.string(),actual:u.string().describe("what the app did instead, from the runner's output"),notReached:u.array(u.number().int()).optional().describe("later steps the test could not get to")}).optional().describe("only when the journey's test failed on a check: where"),test:u.string().describe("the title of the one test in that file that walks it end to end")});var e6=["stale_test","open_question"],t6=["low","medium","high","critical"];var ip=(n=>(n.Skyramp="skyramp",n.Llm="llm",n))(ip||{}),us=u.string().trim().min(1),qJ=u.object({case:us.describe("recommend id this assertion enforces"),evidence:us.describe("the exact assertion line from the file that checks that case's observable")}),zy=u.object({kind:u.nativeEnum(Td).describe("seed: data the test creates in the app; runtime_mock: a mock on a Skyramp worker, which other tests reach too; env_override: an env value the app runs with. A stub inside the test's own process, such as a browser page's route, is none of these"),target:us.describe("the dependency, endpoint or data it affects"),mechanism:u.nativeEnum(Dd).describe("test_code: the test applies and undoes it; skyramp_mocker: a mock the test applies on a Skyramp worker; recipe_override: the mocker cannot reach the dependency (its URL is fixed in the build)"),detail:us.describe("what it sets up"),worker:us.optional().describe("skyramp_mocker: host:port of the worker the test applies the mock to (default localhost:35142)"),cleanup:us.optional().describe("seed: a command, without a shell, that removes the data when the test does not")}),YJ=u.object({file:us.describe("staged path under .skyramp/staged/"),source:u.nativeEnum(ip),language:us,covers:u.array(u.string()).min(1,"must be a non-empty array of recommend ids").describe("recommend ids this test covers"),assertions:u.array(qJ).min(1,"must be a non-empty array").describe("one per case covered, citing the real line"),context:u.array(zy).optional().describe("what the test sets up against the running app, in order: data it seeds, Skyramp mocks it applies, env overrides; omit when none")}),Ky=u.object({schemaVersion:u.literal(1),tests:u.array(YJ),deferredUi:u.array(u.string()).describe("recommend ui ids left for the UI stage (generate) \u2014 [] for generate-ui"),summary:us.describe("one paragraph")});var ls=u.string().trim().min(1),Vu=72,JJ=u.object({repository:ls.optional().describe("owner/repo of the checkout this lint ran in, when the run has several; omit for the working checkout"),tool:u.string(),command:u.string().describe("the exact command you ran, scoped to the changed files"),clean:u.boolean(),fixed:u.array(u.string()).optional().describe("files you fixed"),uncovered:u.array(u.string()).describe("changed/new files this linter's own config does not match (wrong extension, wrong directory) \u2014 so `clean` never examined them, even though CI may still execute them. Empty array, not omitted, when every changed/new file IS covered.")}),l6=u.object({schemaVersion:u.literal(1),lint:u.array(JJ).min(1).describe("one entry per checkout this run wrote tests in, each run from that checkout"),fileConventions:u.object({ok:u.boolean(),notes:u.string().optional()}),ciReadiness:u.object({covered:u.boolean().describe("will the repo's CI run these tests?"),notes:u.string().optional()}),dependencies:u.object({added:u.array(u.object({package:u.string(),manifest:u.string(),repository:ls.optional().describe("owner/repo of the manifest's checkout; omit for the working checkout"),reason:ls.optional().describe("why the test must run inside the application's own test environment, so its manifest had to change \u2014 required for every entry")})).describe("every package added to an APPLICATION manifest (an exception, surfaced in the report); never the Testbot test package's own")}),support:u.array(u.object({file:ls,repository:ls.optional().describe("owner/repo of the file's checkout; omit for the working checkout")})).optional().describe("the files the tests need besides themselves (helper modules, page objects, fixtures, snapshots), delivered with them"),commit:u.object({message:ls.refine(t=>t.split(`
119
119
  `)[0].length<=Vu,{message:`subject line must be <= ${Vu} chars`})}),pr:u.object({title:ls.max(Vu,`must be <= ${Vu} chars`),body:ls}),ready:u.boolean().describe("a statement of fact: true only if the tests are fit to commit as they stand"),blockers:u.array(u.string()).describe("what blocks the commit \u2014 required non-empty when ready is false"),summary:ls.describe("one paragraph")});var Ws=Re(require("fs")),Ka=Re(require("path")),pT=require("child_process");var sr="{junit}",uT=(r=>(r.Junit="junit",r.Trx="trx",r.GoTestJson="go-test-json",r))(uT||{}),lT=(e=>(e.Minitest="minitest",e))(lT||{}),cT=u.string().trim().min(1),Wa=u.object({cwd:cT.describe('repo-relative directory the command starts in ("." for the root)'),argv:u.array(cT).min(1).describe(`the command as separate arguments, run without a shell; for a junit or trx report an argument or env value holds ${sr}, where the report is written (not for Maven or Gradle, whose build writes its own)`),env:u.record(u.string(),u.string()).optional().describe("plain test or reporter settings beyond the repository's CI test job (RAILS_ENV=test, PLAYWRIGHT_JUNIT_OUTPUT_FILE={junit}); never a credential, PATH, or a tool's install path"),report:u.object({format:u.nativeEnum(uT).describe(`junit (JUnit XML to ${sr}), trx (to ${sr}), or go-test-json (go test -json on the command's output)`),reporter:u.nativeEnum(lT).optional().describe("a reporter Testbot loads for a runner that writes no report: minitest")}).optional().describe("the report the command writes; junit when omitted")});var za="a framework other than pytest, jest, vitest and node --test (go test, rails test, mvn, dotnet test), or one the repository's test script runs through another command (ng test, nx test)",h6=`pytest, Jest, Vitest and node --test tests run as the run already knows them, unless the repository's test script runs them through another command (ng test, nx test), which may be the only one that compiles them. A test in any other framework, or one run that way, also gives "run": the repository's own command for only those tests, from the directory the repository runs it in, as separate arguments without a shell. Its "report" says what the runner writes: junit (JUnit XML to ${sr} in the reporter's argument or env setting), trx (a TRX file to ${sr}, which every dotnet test writes with its built-in logger), or go-test-json (go test -json, read from the command's output). A Maven or Gradle command names no ${sr}: its build writes JUnit XML to its own report directory, which the run reads. Use a reporter the repository already has, or one of those; a reporter or converter the command fetches is the version the repository pins, or else its latest release (an older one may not build with the repository's toolchain). For minitest, which writes none, give report.reporter "minitest" and the run fills ${sr} itself. A setting the tests or reporter read goes in "env" (RAILS_ENV=test, or PLAYWRIGHT_JUNIT_OUTPUT_FILE=${sr} with playwright test --reporter=junit): the run sets it, so never wrap the command in a shell to set one. The run replaces ${sr} in argv and env with its report path, executes the command, and reads that report.`;var Eo=(s=>(s.ExistingEvidenceSufficient="existing_evidence_sufficient",s.TargetedUnit="targeted_unit",s.RuntimeRequired="runtime_required",s.BlockedPreflight="blocked_preflight",s))(Eo||{}),Js=(i=>(i.ExistingEvidence="existing_evidence",i.Unaffected="unaffected",i.ExistingUnit="existing_unit",i.NewUnit="new_unit",i.Runtime="runtime",i))(Js||{}),Xy=(n=>(n.Repository="repository",n.Testbot="testbot",n))(Xy||{}),eE=(r=>(r.Identified="identified",r.Passed="passed",r.Failed="failed",r))(eE||{}),Zt=u.string().trim().min(1),WJ=u.string().regex(/^[a-z0-9][a-z0-9-]*$/,"must be a short lowercase slug").describe("short-slug");var zJ=u.object({id:WJ,source:u.nativeEnum(Xy),kind:u.nativeEnum(Ps),outcome:u.nativeEnum(eE),summary:Zt.max(400).describe("one line: what it shows"),tests:u.array(Zt).optional().describe("source repository: the existing tests, as repo-relative paths, optionally path::test-name"),repository:Zt.optional().describe("source repository: owner/repo the tests live in, when the run has several checkouts; omit for the working checkout"),command:Zt.optional().describe("source testbot: the exact command you ran, as you ran it"),run:Wa.optional().describe(`source repository, for tests in ${za}: how the run executes only these tests, all of them in one command, with the repository's own runner writing JUnit XML to {junit}. Name each test (path::test-name): a test is credited to a file only by its name or by a report that names the file`)}),KJ=u.object({behaviorId:Zt.describe("an id from analyze's behaviors"),mechanism:u.nativeEnum(Js),evidenceIds:u.array(Zt).default([]).describe("existing_evidence: the ci-<n> or evidence ids that establish it; existing_unit: the evidence id naming the tests to run"),covers:u.string().trim().optional().describe('new_unit / runtime: the missing evidence this obtains, e.g. "the boundary the change moved"; unaffected: why the change cannot reach it, citing path:line')}),ZJ=u.object({behaviorId:u.string().trim().optional().describe("an id from analyze's behaviors, when it is about one"),missing:Zt.max(600).describe("the evidence that is required and cannot be obtained in this run")}),XJ=u.object({file:Zt.describe("the changed file the failure is in"),repository:Zt.optional().describe("owner/repo the file is in, when the run has several checkouts; omit for the working checkout"),reason:Zt.max(300).describe("what prerequisite the change fails"),evidence:Zt.max(400).describe("the error line, quoted")}),eW=u.object({behaviorId:Zt.describe("an id from analyze's behaviors"),reason:Zt.max(600).describe("\u2264600 characters: why this change leaves the behavior's result as it was, citing the unchanged line that decides it (path:line)")}),Gu=u.object({schemaVersion:u.literal(1),decision:u.nativeEnum(Eo),evidence:u.array(zJ).describe("evidence this session found or produced; CI results are the ci-<n> items and are not restated here"),plan:u.array(KJ).describe("how each changed behavior's evidence is obtained"),gaps:u.array(ZJ),outOfScope:u.array(eW).optional().describe("behaviors analyze found that this change neither changes nor states"),blocked:XJ.optional().describe("only for blocked_preflight"),rationale:Zt.max(1200).describe("\u22641200 characters: why this evidence is enough, or what it still lacks \u2014 the scope you chose and why")});function op(t){let e=Ut(t,"recommend.json");if(!e||!Array.isArray(e.generate)||!Array.isArray(e.maintenance))return;let n=e;return{...n,maintenance:n.maintenance.map(({repository:r,...s})=>({...s,test:s.test.trim().replace(/^\.\//,""),...r?.trim()?{repository:r.trim()}:{}}))}}function sW(t){return gn(Ky,t).errors}function iW(t,e=[]){let{value:n,error:r}=ot(t,e);if(r)return{errors:[r]};let s=sW(n);return s.length>0?{errors:s}:{generate:n,errors:[]}}function ap(t,e=[]){return iW(t.stdout,e)}function oW(t){return t.generate.filter(e=>e.type!=="ui").map(e=>e.id)}function hT(t){return t.generate.filter(e=>e.type==="ui").map(e=>e.id)}var cp={backend:{stage:"generate",cases:oW,noRecommendCoverage:"recommend.json missing or malformed \u2014 cannot check coverage",noRecommendIntent:"recommend.json missing or malformed \u2014 cannot check intent",uncovered:t=>`recommend case "${t}" is not covered by any generated test`,unknownCovered:t=>`test covers unknown recommend id "${t}"`,unasserted:t=>`case "${t}" has no verified assertion enforcing its expected_observable`,usedCodegen:nT,codegenHint:"These tests were hand-written. Skyramp codegen (skyramp_contract_test_generation / skyramp_integration_test_generation) was available but not used \u2014 it computes valid sample data and response correlations. Prefer scaffolding with it and then refining, especially for the failures above."},ui:{stage:"generate-ui",cases:hT,noRecommendCoverage:"recommend.json not found \u2014 cannot check UI coverage",noRecommendIntent:"recommend.json not found \u2014 cannot check UI intent",uncovered:t=>`UI case "${t}" is not covered by any generated UI test`,unknownCovered:t=>`test covers "${t}" which is not a recommend UI case`,unasserted:t=>`UI case "${t}" has no verified assertion enforcing its expected_observable`,usedCodegen:rT,codegenHint:"This UI test was hand-authored. Skyramp UI codegen (skyramp_ui_test_generation) was available but not used. Prefer scaffolding with it and then refining, especially for the failures above."}},J6=kn("generate-schema",(t,e)=>ap(e,t.secretValues));function aW(t){let e=cp[t];return{name:`${e.stage}-coverage`,verify(n,r){let{generate:s,errors:i}=ap(r,n.secretValues);if(!s)return yt(this.name,i);let a=op(n);if(!a)return yt(this.name,[e.noRecommendCoverage]);let c=new Set(s.tests.flatMap(h=>h.covers)),l=[],A=e.cases(a);for(let h of A)c.has(h)||l.push(e.uncovered(h));let p=new Set(t==="ui"?A:a.generate.map(h=>h.id));for(let h of c)p.has(h)||l.push(e.unknownCovered(h));if(t==="backend"){let h=new Set(s.deferredUi),g=new Set(hT(a));for(let C of g)!h.has(C)&&!c.has(C)&&l.push(`UI case "${C}" is neither covered nor deferred to the UI stage`);for(let C of h)g.has(C)||l.push(`deferredUi lists "${C}" which is not a UI case`)}return l.length===0?{name:this.name,passed:!0}:yt(this.name,l)}}}function cW(t){let e=cp[t];return{name:`${e.stage}-intent`,verify(n,r){let{generate:s,errors:i}=ap(r,n.secretValues);if(!s)return yt(this.name,i);let a=op(n);if(!a)return yt(this.name,[e.noRecommendIntent]);let{asserted:c,errors:l,badFiles:A}=fW(s,n.inputs.repositoryPath),p=l.length;for(let g of e.cases(a))c.has(g)||l.push(e.unasserted(g));if(l.length===0)return{name:this.name,passed:!0};let h=yt(this.name,l);return p>0&&p===l.length&&A.size>0?{...h,droppable:[...A]}:h}}}function uW(t){let e=cp[t];return n=>{if(!n.inputs.skyrampMcp?.command||t==="backend"&&!$y(n))return;let r=Ka.join(n.outputsDir,`${e.stage}-stream.ndjson`);if(!(!Ws.existsSync(r)||e.usedCodegen(r)))return sT(r)?e.codegenHint:"Skyramp codegen tools were configured but the MCP server did not connect this session, so they were not available. Hand-authoring was the only option; this is an environment problem, not yours."}}var W6=aW("backend"),z6=cW("backend"),K6=uW("backend");var dT=t=>t.replace(/\s+/g,"");var tE={python:[/\bassert\s*[({\w"'`]/g,/\bpytest\.raises\s*\(/g,/\bself\.assert\w*\s*\(/g],typescript:[/\bexpect\s*\(/g,/\.should\b/g,/\bassert\s*[.(]/g],go:[/\bt\.(Error|Errorf|Fatal|Fatalf|Fail|FailNow)\s*\(/g,/\b(assert|require)\.\w+\s*\(/g],java:[/\bassert\w*\s*\(/g,/\bassertThat\s*\(/g],ruby:[/\bexpect\s*[({]/g,/\bassert\w*\b/g,/\.should\b/g]};for(let[t,e]of[["javascript","typescript"],["kotlin","java"]])tE[t]=tE[e];function lW(t,e){if(t.includes(Qu(e))||dT(t).includes(dT(e)))return!0;let n=e.split(/\r?\n/).map(r=>r.trim()).filter(r=>r&&!/^(\/\/|#|\*|\/\*)/.test(r));return n.length>0&&n.every(r=>t.includes(Qu(r)))?!0:hW(t,e)}var AW=/\bassert\w*\b|\bexpect\s*\(|\.should\b|\brequire\s*\(/i,dW=12,pW=/,\s*\(\s*#|,\s*f?["'`]|\s+#\s|\s+\/\/|\s*\((?:line|lines|at line)\b|\s*,\s*$/i;function hW(t,e){let n=e.split(/\s*;\s*|\s*\.\.\.\s*|\r?\n/),r=0;for(let s of n){let i=AW.exec(s);if(!i)continue;let a=s.slice(i.index),c=pW.exec(a);if(c&&(a=a.slice(0,c.index)),a=Qu(a).replace(/[,\s]+$/,""),a.length<dW||!t.includes(a))return!1;r++}return r>0}function fW(t,e){let n=new Set,r=[],s=new Set;for(let i of t.tests){let a=Ka.resolve(e,i.file);if(!Ws.existsSync(a))continue;let c=Qu(Ws.readFileSync(a,"utf-8"));for(let l of i.assertions??[]){if(!lW(c,l.evidence)){r.push(`assertion evidence for "${l.case}" not found in ${i.file} \u2014 cite the real assertion line`),s.add(i.file);continue}i.covers.includes(l.case)?n.add(l.case):(r.push(`assertion cites case "${l.case}" not in that test's covers[]`),s.add(i.file))}}return{asserted:n,errors:r,badFiles:s}}var gW=/\.(spec|test)\.[cm]?[jt]sx?$/i;function fT(t){let e;try{e=(0,pT.execFileSync)("git",[...ku,"status","--porcelain","--untracked-files=all"],{env:Dn(),cwd:t,encoding:"utf-8",stdio:["ignore","pipe","ignore"]})}catch{return}let n=s=>/_scaffold/i.test(s)||Md.test(s),r=[];for(let s of e.split(`