@skyramp/testbot-core 0.13.2-v3.539 → 0.13.2-v3.542

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 @@ ${c}`,this.dataLineCount++;return}if(xy(t,r,Jae)){Kae(t,i)&&(this.setEventFieldS
48
48
  Error Code : ${o.statusCode}
49
49
 
50
50
  Error Message: ${o.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(t){return bV(this,void 0,void 0,function*(){try{let n=e.getIDTokenUrl();if(t){let r=encodeURIComponent(t);n=`${n}&audience=${r}`}rR(`ID token url is ${n}`);let s=yield e.getCall(n);return Wi(s),s}catch(n){throw new Error(`Error message: ${n.message}`)}})}}});var CV,xf,sR,Jce,Wce,Yce,IV,iR,CTe,oR=qn(()=>{CV=require("os"),xf=require("fs"),sR=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})},{access:Jce,appendFile:Wce,writeFile:Yce}=xf.promises,IV="GITHUB_STEP_SUMMARY",iR=class{constructor(){this._buffer=""}filePath(){return sR(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let t=process.env[IV];if(!t)throw new Error(`Unable to find environment variable for $${IV}. Check if your runtime environment supports job summaries.`);try{yield Jce(t,xf.constants.R_OK|xf.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath})}wrap(t,n,s={}){let r=Object.entries(s).map(([i,o])=>` ${i}="${o}"`).join("");return n?`<${t}${r}>${n}</${t}>`:`<${t}${r}>`}write(t){return sR(this,void 0,void 0,function*(){let n=!!t?.overwrite,s=yield this.filePath();return yield(n?Yce:Wce)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return sR(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(t,n=!1){return this._buffer+=t,n?this.addEOL():this}addEOL(){return this.addRaw(CV.EOL)}addCodeBlock(t,n){let s=Object.assign({},n&&{lang:n}),r=this.wrap("pre",this.wrap("code",t),s);return this.addRaw(r).addEOL()}addList(t,n=!1){let s=n?"ol":"ul",r=t.map(o=>this.wrap("li",o)).join(""),i=this.wrap(s,r);return this.addRaw(i).addEOL()}addTable(t){let n=t.map(r=>{let i=r.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:c,colspan:u,rowspan:l}=o,p=a?"th":"td",h=Object.assign(Object.assign({},u&&{colspan:u}),l&&{rowspan:l});return this.wrap(p,c,h)}).join("");return this.wrap("tr",i)}).join(""),s=this.wrap("table",n);return this.addRaw(s).addEOL()}addDetails(t,n){let s=this.wrap("details",this.wrap("summary",t)+n);return this.addRaw(s).addEOL()}addImage(t,n,s){let{width:r,height:i}=s||{},o=Object.assign(Object.assign({},r&&{width:r}),i&&{height:i}),a=this.wrap("img",null,Object.assign({src:t,alt:n},o));return this.addRaw(a).addEOL()}addHeading(t,n){let s=`h${n}`,r=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1",i=this.wrap(r,t);return this.addRaw(i).addEOL()}addSeparator(){let t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){let t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,n){let s=Object.assign({},n&&{cite:n}),r=this.wrap("blockquote",t,s);return this.addRaw(r).addEOL()}addLink(t,n){let s=this.wrap("a",t,{href:n});return this.addRaw(s).addEOL()}},CTe=new iR});var SV=qn(()=>{});function aR(e){return RV(this,void 0,void 0,function*(){try{yield Py(e)}catch(t){if(t.code==="ENOENT")return!1;throw t}return!0})}function Uy(e){if(e=iue(e),!e)throw new Error('isRooted() parameter "p" cannot be empty');return gc?e.startsWith("\\")||/^[A-Z]:/i.test(e):e.startsWith("/")}function cR(e,t){return RV(this,void 0,void 0,function*(){let n;try{n=yield Py(e)}catch(r){r.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}if(n&&n.isFile()){if(gc){let r=Wo.extname(e).toUpperCase();if(t.some(i=>i.toUpperCase()===r))return e}else if(kV(n))return e}let s=e;for(let r of t){e=s+r,n=void 0;try{n=yield Py(e)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${i}`)}if(n&&n.isFile()){if(gc){try{let i=Wo.dirname(e),o=Wo.basename(e).toUpperCase();for(let a of yield BV(i))if(o===a.toUpperCase()){e=Wo.join(i,a);break}}catch(i){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${i}`)}return e}else if(kV(n))return e}}return""})}function iue(e){return e=e||"",gc?(e=e.replace(/\//g,"\\"),e.replace(/\\\\+/g,"\\")):e.replace(/\/\/+/g,"/")}function kV(e){return(e.mode&1)>0||(e.mode&8)>0&&process.getgid!==void 0&&e.gid===process.getgid()||(e.mode&64)>0&&process.getuid!==void 0&&e.uid===process.getuid()}var Oy,Wo,RV,Zce,Kce,Xce,eue,RTe,BV,tue,nue,BTe,Py,rue,sue,gc,xTe,uR=qn(()=>{Oy=G(require("fs"),1),Wo=G(require("path"),1),RV=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})},{chmod:Zce,copyFile:Kce,lstat:Xce,mkdir:eue,open:RTe,readdir:BV,rename:tue,rm:nue,rmdir:BTe,stat:Py,symlink:rue,unlink:sue}=Oy.promises,gc=process.platform==="win32",xTe=Oy.constants.O_RDONLY});function lR(e,t){return $V(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");if(t){let s=yield lR(e,!1);if(!s)throw gc?new Error(`Unable to locate executable file: ${e}. 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: ${e}. 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 s}let n=yield oue(e);return n&&n.length>0?n[0]:""})}function oue(e){return $V(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");let t=[];if(gc&&process.env.PATHEXT)for(let r of process.env.PATHEXT.split(pi.delimiter))r&&t.push(r);if(Uy(e)){let r=yield cR(e,t);return r?[r]:[]}if(e.includes(pi.sep))return[];let n=[];if(process.env.PATH)for(let r of process.env.PATH.split(pi.delimiter))r&&n.push(r);let s=[];for(let r of n){let i=yield cR(pi.join(r,e),t);i&&s.push(i)}return s})}var pi,$V,TV=qn(()=>{pi=G(require("path"),1);uR();$V=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})}});function PV(e){let t=[],n=!1,s=!1,r="";function i(o){s&&o!=='"'&&(r+="\\"),r+=o,s=!1}for(let o=0;o<e.length;o++){let a=e.charAt(o);if(a==='"'){s?i(a):n=!n;continue}if(a==="\\"&&s){i(a);continue}if(a==="\\"&&n){s=!0;continue}if(a===" "&&!n){r.length>0&&(t.push(r),r="");continue}i(a)}return r.length>0&&t.push(r.trim()),t}var $f,pR,_V,DV,NV,QV,Fy,My,dR,OV=qn(()=>{$f=G(require("os"),1),pR=G(require("events"),1),_V=G(require("child_process"),1),DV=G(require("path"),1);TV();uR();NV=require("timers"),QV=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})},Fy=process.platform==="win32",My=class extends pR.EventEmitter{constructor(t,n,s){if(super(),!t)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=t,this.args=n||[],this.options=s||{}}_debug(t){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(t)}_getCommandString(t,n){let s=this._getSpawnFileName(),r=this._getSpawnArgs(t),i=n?"":"[command]";if(Fy)if(this._isCmdFile()){i+=s;for(let o of r)i+=` ${o}`}else if(t.windowsVerbatimArguments){i+=`"${s}"`;for(let o of r)i+=` ${o}`}else{i+=this._windowsQuoteCmdArg(s);for(let o of r)i+=` ${this._windowsQuoteCmdArg(o)}`}else{i+=s;for(let o of r)i+=` ${o}`}return i}_processLineBuffer(t,n,s){try{let r=n+t.toString(),i=r.indexOf($f.EOL);for(;i>-1;){let o=r.substring(0,i);s(o),r=r.substring(i+$f.EOL.length),i=r.indexOf($f.EOL)}return r}catch(r){return this._debug(`error processing line. Failed with error ${r}`),""}}_getSpawnFileName(){return Fy&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(t){if(Fy&&this._isCmdFile()){let n=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let s of this.args)n+=" ",n+=t.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s);return n+='"',[n]}return this.args}_endsWith(t,n){return t.endsWith(n)}_isCmdFile(){let t=this.toolPath.toUpperCase();return this._endsWith(t,".CMD")||this._endsWith(t,".BAT")}_windowsQuoteCmdArg(t){if(!this._isCmdFile())return this._uvQuoteCmdArg(t);if(!t)return'""';let n=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],s=!1;for(let o of t)if(n.some(a=>a===o)){s=!0;break}if(!s)return t;let r='"',i=!0;for(let o=t.length;o>0;o--)r+=t[o-1],i&&t[o-1]==="\\"?r+="\\":t[o-1]==='"'?(i=!0,r+='"'):i=!1;return r+='"',r.split("").reverse().join("")}_uvQuoteCmdArg(t){if(!t)return'""';if(!t.includes(" ")&&!t.includes(" ")&&!t.includes('"'))return t;if(!t.includes('"')&&!t.includes("\\"))return`"${t}"`;let n='"',s=!0;for(let r=t.length;r>0;r--)n+=t[r-1],s&&t[r-1]==="\\"?n+="\\":t[r-1]==='"'?(s=!0,n+="\\"):s=!1;return n+='"',n.split("").reverse().join("")}_cloneExecOptions(t){t=t||{};let n={cwd:t.cwd||process.cwd(),env:t.env||process.env,silent:t.silent||!1,windowsVerbatimArguments:t.windowsVerbatimArguments||!1,failOnStdErr:t.failOnStdErr||!1,ignoreReturnCode:t.ignoreReturnCode||!1,delay:t.delay||1e4};return n.outStream=t.outStream||process.stdout,n.errStream=t.errStream||process.stderr,n}_getSpawnOptions(t,n){t=t||{};let s={};return s.cwd=t.cwd,s.env=t.env,s.windowsVerbatimArguments=t.windowsVerbatimArguments||this._isCmdFile(),t.windowsVerbatimArguments&&(s.argv0=`"${n}"`),s}exec(){return QV(this,void 0,void 0,function*(){return!Uy(this.toolPath)&&(this.toolPath.includes("/")||Fy&&this.toolPath.includes("\\"))&&(this.toolPath=DV.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield lR(this.toolPath,!0),new Promise((t,n)=>QV(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let u of this.args)this._debug(` ${u}`);let s=this._cloneExecOptions(this.options);!s.silent&&s.outStream&&s.outStream.write(this._getCommandString(s)+$f.EOL);let r=new dR(s,this.toolPath);if(r.on("debug",u=>{this._debug(u)}),this.options.cwd&&!(yield aR(this.options.cwd)))return n(new Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),o=_V.spawn(i,this._getSpawnArgs(s),this._getSpawnOptions(this.options,i)),a="";o.stdout&&o.stdout.on("data",u=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(u),!s.silent&&s.outStream&&s.outStream.write(u),a=this._processLineBuffer(u,a,l=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(l)})});let c="";if(o.stderr&&o.stderr.on("data",u=>{r.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(u),!s.silent&&s.errStream&&s.outStream&&(s.failOnStdErr?s.errStream:s.outStream).write(u),c=this._processLineBuffer(u,c,l=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(l)})}),o.on("error",u=>{r.processError=u.message,r.processExited=!0,r.processClosed=!0,r.CheckComplete()}),o.on("exit",u=>{r.processExitCode=u,r.processExited=!0,this._debug(`Exit code ${u} received from tool '${this.toolPath}'`),r.CheckComplete()}),o.on("close",u=>{r.processExitCode=u,r.processExited=!0,r.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),r.CheckComplete()}),r.on("done",(u,l)=>{a.length>0&&this.emit("stdline",a),c.length>0&&this.emit("errline",c),o.removeAllListeners(),u?n(u):t(l)}),this.options.input){if(!o.stdin)throw new Error("child process missing stdin");o.stdin.end(this.options.input)}}))})}};dR=class e extends pR.EventEmitter{constructor(t,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=t,this.toolPath=n,t.delay&&(this.delay=t.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=(0,NV.setTimeout)(e.HandleTimeout,this.delay,this)))}_debug(t){this.emit("debug",t)}_setResult(){let t;this.processExited&&(this.processError?t=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?t=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(t=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",t,this.processExitCode)}static HandleTimeout(t){if(!t.done){if(!t.processClosed&&t.processExited){let n=`The STDIO streams did not close within ${t.delay/1e3} seconds of the exit event from process '${t.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;t._debug(n)}t._setResult()}}}});function UV(e,t,n){return uue(this,void 0,void 0,function*(){let s=PV(e);if(s.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let r=s[0];return t=s.slice(1).concat(t||[]),new My(r,t,n).exec()})}var uue,fR=qn(()=>{OV();uue=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})}});var hR,_Te,DTe,MV=qn(()=>{hR=G(require("os"),1);fR();_Te=hR.default.platform(),DTe=hR.default.arch()});function Wi(e){Ma("add-mask",{},e)}function je(e,t){let n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n)throw new Error(`Input required and not supplied: ${e}`);return t&&t.trimWhitespace===!1?n:n.trim()}function Yo(e,t){let n=["true","True","TRUE"],s=["false","False","FALSE"],r=je(e,t);if(n.includes(r))return!0;if(s.includes(r))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}
51
- Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function jV(e){process.exitCode=gR.Failure,VV(e)}function rR(e){Ma("debug",{},e)}function VV(e,t={}){Ma("error",Dm(t),e instanceof Error?e.toString():e)}function Dt(e,t={}){Ma("warning",Dm(t),e instanceof Error?e.toString():e)}function mR(e,t={}){Ma("notice",Dm(t),e instanceof Error?e.toString():e)}function ls(e){process.stdout.write(e+LV.EOL)}function Ly(e){CI("group",e)}function jy(){CI("endgroup")}function Us(e){return process.env[`STATE_${e}`]||""}function GV(e){return due(this,void 0,void 0,function*(){return yield Ny.getIDToken(e)})}var LV,due,gR,On=qn(()=>{UN();FN();Nm();LV=G(require("os"),1);wV();oR();oR();SV();MV();due=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})};(function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure"})(gR||(gR={}))});var ud=T((MDe,l2)=>{"use strict";var Ofe="2.0.0",Ufe=Number.MAX_SAFE_INTEGER||9007199254740991,Ffe=16,Mfe=250,Lfe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];l2.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Ffe,MAX_SAFE_BUILD_LENGTH:Mfe,MAX_SAFE_INTEGER:Ufe,RELEASE_TYPES:Lfe,SEMVER_SPEC_VERSION:Ofe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var _h=T((LDe,d2)=>{"use strict";var jfe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};d2.exports=jfe});var ld=T((Ri,p2)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:YB,MAX_SAFE_BUILD_LENGTH:Vfe,MAX_LENGTH:Gfe}=ud(),zfe=_h();Ri=p2.exports={};var qfe=Ri.re=[],Hfe=Ri.safeRe=[],ae=Ri.src=[],Jfe=Ri.safeSrc=[],ce=Ri.t={},Wfe=0,ZB="[a-zA-Z0-9-]",Yfe=[["\\s",1],["\\d",Gfe],[ZB,Vfe]],Zfe=e=>{for(let[t,n]of Yfe)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},Ve=(e,t,n)=>{let s=Zfe(t),r=Wfe++;zfe(e,r,t),ce[e]=r,ae[r]=t,Jfe[r]=s,qfe[r]=new RegExp(t,n?"g":void 0),Hfe[r]=new RegExp(s,n?"g":void 0)};Ve("NUMERICIDENTIFIER","0|[1-9]\\d*");Ve("NUMERICIDENTIFIERLOOSE","\\d+");Ve("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ZB}*`);Ve("MAINVERSION",`(${ae[ce.NUMERICIDENTIFIER]})\\.(${ae[ce.NUMERICIDENTIFIER]})\\.(${ae[ce.NUMERICIDENTIFIER]})`);Ve("MAINVERSIONLOOSE",`(${ae[ce.NUMERICIDENTIFIERLOOSE]})\\.(${ae[ce.NUMERICIDENTIFIERLOOSE]})\\.(${ae[ce.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASEIDENTIFIER",`(?:${ae[ce.NONNUMERICIDENTIFIER]}|${ae[ce.NUMERICIDENTIFIER]})`);Ve("PRERELEASEIDENTIFIERLOOSE",`(?:${ae[ce.NONNUMERICIDENTIFIER]}|${ae[ce.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASE",`(?:-(${ae[ce.PRERELEASEIDENTIFIER]}(?:\\.${ae[ce.PRERELEASEIDENTIFIER]})*))`);Ve("PRERELEASELOOSE",`(?:-?(${ae[ce.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ae[ce.PRERELEASEIDENTIFIERLOOSE]})*))`);Ve("BUILDIDENTIFIER",`${ZB}+`);Ve("BUILD",`(?:\\+(${ae[ce.BUILDIDENTIFIER]}(?:\\.${ae[ce.BUILDIDENTIFIER]})*))`);Ve("FULLPLAIN",`v?${ae[ce.MAINVERSION]}${ae[ce.PRERELEASE]}?${ae[ce.BUILD]}?`);Ve("FULL",`^${ae[ce.FULLPLAIN]}$`);Ve("LOOSEPLAIN",`[v=\\s]*${ae[ce.MAINVERSIONLOOSE]}${ae[ce.PRERELEASELOOSE]}?${ae[ce.BUILD]}?`);Ve("LOOSE",`^${ae[ce.LOOSEPLAIN]}$`);Ve("GTLT","((?:<|>)?=?)");Ve("XRANGEIDENTIFIERLOOSE",`${ae[ce.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ve("XRANGEIDENTIFIER",`${ae[ce.NUMERICIDENTIFIER]}|x|X|\\*`);Ve("XRANGEPLAIN",`[v=\\s]*(${ae[ce.XRANGEIDENTIFIER]})(?:\\.(${ae[ce.XRANGEIDENTIFIER]})(?:\\.(${ae[ce.XRANGEIDENTIFIER]})(?:${ae[ce.PRERELEASE]})?${ae[ce.BUILD]}?)?)?`);Ve("XRANGEPLAINLOOSE",`[v=\\s]*(${ae[ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ae[ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ae[ce.XRANGEIDENTIFIERLOOSE]})(?:${ae[ce.PRERELEASELOOSE]})?${ae[ce.BUILD]}?)?)?`);Ve("XRANGE",`^${ae[ce.GTLT]}\\s*${ae[ce.XRANGEPLAIN]}$`);Ve("XRANGELOOSE",`^${ae[ce.GTLT]}\\s*${ae[ce.XRANGEPLAINLOOSE]}$`);Ve("COERCEPLAIN",`(^|[^\\d])(\\d{1,${YB}})(?:\\.(\\d{1,${YB}}))?(?:\\.(\\d{1,${YB}}))?`);Ve("COERCE",`${ae[ce.COERCEPLAIN]}(?:$|[^\\d])`);Ve("COERCEFULL",ae[ce.COERCEPLAIN]+`(?:${ae[ce.PRERELEASE]})?(?:${ae[ce.BUILD]})?(?:$|[^\\d])`);Ve("COERCERTL",ae[ce.COERCE],!0);Ve("COERCERTLFULL",ae[ce.COERCEFULL],!0);Ve("LONETILDE","(?:~>?)");Ve("TILDETRIM",`(\\s*)${ae[ce.LONETILDE]}\\s+`,!0);Ri.tildeTrimReplace="$1~";Ve("TILDE",`^${ae[ce.LONETILDE]}${ae[ce.XRANGEPLAIN]}$`);Ve("TILDELOOSE",`^${ae[ce.LONETILDE]}${ae[ce.XRANGEPLAINLOOSE]}$`);Ve("LONECARET","(?:\\^)");Ve("CARETTRIM",`(\\s*)${ae[ce.LONECARET]}\\s+`,!0);Ri.caretTrimReplace="$1^";Ve("CARET",`^${ae[ce.LONECARET]}${ae[ce.XRANGEPLAIN]}$`);Ve("CARETLOOSE",`^${ae[ce.LONECARET]}${ae[ce.XRANGEPLAINLOOSE]}$`);Ve("COMPARATORLOOSE",`^${ae[ce.GTLT]}\\s*(${ae[ce.LOOSEPLAIN]})$|^$`);Ve("COMPARATOR",`^${ae[ce.GTLT]}\\s*(${ae[ce.FULLPLAIN]})$|^$`);Ve("COMPARATORTRIM",`(\\s*)${ae[ce.GTLT]}\\s*(${ae[ce.LOOSEPLAIN]}|${ae[ce.XRANGEPLAIN]})`,!0);Ri.comparatorTrimReplace="$1$2$3";Ve("HYPHENRANGE",`^\\s*(${ae[ce.XRANGEPLAIN]})\\s+-\\s+(${ae[ce.XRANGEPLAIN]})\\s*$`);Ve("HYPHENRANGELOOSE",`^\\s*(${ae[ce.XRANGEPLAINLOOSE]})\\s+-\\s+(${ae[ce.XRANGEPLAINLOOSE]})\\s*$`);Ve("STAR","(<|>)?=?\\s*\\*");Ve("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ve("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var WE=T((jDe,f2)=>{"use strict";var Kfe=Object.freeze({loose:!0}),Xfe=Object.freeze({}),ehe=e=>e?typeof e!="object"?Kfe:e:Xfe;f2.exports=ehe});var KB=T((VDe,m2)=>{"use strict";var h2=/^[0-9]+$/,g2=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let n=h2.test(e),s=h2.test(t);return n&&s&&(e=+e,t=+t),e===t?0:n&&!s?-1:s&&!n?1:e<t?-1:1},the=(e,t)=>g2(t,e);m2.exports={compareIdentifiers:g2,rcompareIdentifiers:the}});var Bn=T((GDe,y2)=>{"use strict";var YE=_h(),{MAX_LENGTH:A2,MAX_SAFE_INTEGER:ZE}=ud(),{safeRe:KE,t:XE}=ld(),nhe=WE(),{compareIdentifiers:XB}=KB(),rhe=(e,t)=>{let n=t.split(".");if(n.length>e.length)return!1;for(let s=0;s<n.length;s++)if(XB(e[s],n[s])!==0)return!1;return!0},ex=class e{constructor(t,n){if(n=nhe(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>A2)throw new TypeError(`version is longer than ${A2} characters`);YE("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let s=t.trim().match(n.loose?KE[XE.LOOSE]:KE[XE.FULL]);if(!s)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ZE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ZE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ZE||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let i=+r;if(i>=0&&i<ZE)return i}return r}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(YE("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let s=this.prerelease[n],r=t.prerelease[n];if(YE("prerelease compare",n,s,r),s===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(s===void 0)return-1;if(s===r)continue;return XB(s,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let s=this.build[n],r=t.build[n];if(YE("build compare",n,s,r),s===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(s===void 0)return-1;if(s===r)continue;return XB(s,r)}while(++n)}inc(t,n,s){if(t.startsWith("pre")){if(!n&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let r=`-${n}`.match(this.options.loose?KE[XE.PRERELEASELOOSE]:KE[XE.PRERELEASE]);if(!r||r[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,s),this.inc("pre",n,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,s),this.inc("pre",n,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let i=[n,r];if(s===!1&&(i=[n]),rhe(this.prerelease,n)){let o=this.prerelease[n.split(".").length];isNaN(o)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};y2.exports=ex});var ga=T((zDe,v2)=>{"use strict";var E2=Bn(),she=(e,t,n=!1)=>{if(e instanceof E2)return e;try{return new E2(e,t)}catch(s){if(!n)return null;throw s}};v2.exports=she});var w2=T((qDe,b2)=>{"use strict";var ihe=ga(),ohe=(e,t)=>{let n=ihe(e,t);return n?n.version:null};b2.exports=ohe});var C2=T((HDe,I2)=>{"use strict";var ahe=ga(),che=(e,t)=>{let n=ahe(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};I2.exports=che});var R2=T((JDe,k2)=>{"use strict";var S2=Bn(),uhe=(e,t,n,s,r)=>{typeof n=="string"&&(r=s,s=n,n=void 0);try{return new S2(e instanceof S2?e.version:e,n).inc(t,s,r).version}catch{return null}};k2.exports=uhe});var $2=T((WDe,x2)=>{"use strict";var B2=ga(),lhe=(e,t)=>{let n=B2(e,null,!0),s=B2(t,null,!0),r=n.compare(s);if(r===0)return null;let i=r>0,o=i?n:s,a=i?s:n,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return n.major!==s.major?l+"major":n.minor!==s.minor?l+"minor":n.patch!==s.patch?l+"patch":"prerelease"};x2.exports=lhe});var Q2=T((YDe,T2)=>{"use strict";var dhe=Bn(),phe=(e,t)=>new dhe(e,t).major;T2.exports=phe});var D2=T((ZDe,_2)=>{"use strict";var fhe=Bn(),hhe=(e,t)=>new fhe(e,t).minor;_2.exports=hhe});var P2=T((KDe,N2)=>{"use strict";var ghe=Bn(),mhe=(e,t)=>new ghe(e,t).patch;N2.exports=mhe});var U2=T((XDe,O2)=>{"use strict";var Ahe=ga(),yhe=(e,t)=>{let n=Ahe(e,t);return n&&n.prerelease.length?n.prerelease:null};O2.exports=yhe});var vs=T((eNe,M2)=>{"use strict";var F2=Bn(),Ehe=(e,t,n)=>new F2(e,n).compare(new F2(t,n));M2.exports=Ehe});var j2=T((tNe,L2)=>{"use strict";var vhe=vs(),bhe=(e,t,n)=>vhe(t,e,n);L2.exports=bhe});var G2=T((nNe,V2)=>{"use strict";var whe=vs(),Ihe=(e,t)=>whe(e,t,!0);V2.exports=Ihe});var ev=T((rNe,q2)=>{"use strict";var z2=Bn(),Che=(e,t,n)=>{let s=new z2(e,n),r=new z2(t,n);return s.compare(r)||s.compareBuild(r)};q2.exports=Che});var J2=T((sNe,H2)=>{"use strict";var She=ev(),khe=(e,t)=>e.sort((n,s)=>She(n,s,t));H2.exports=khe});var Y2=T((iNe,W2)=>{"use strict";var Rhe=ev(),Bhe=(e,t)=>e.sort((n,s)=>Rhe(s,n,t));W2.exports=Bhe});var Dh=T((oNe,Z2)=>{"use strict";var xhe=vs(),$he=(e,t,n)=>xhe(e,t,n)>0;Z2.exports=$he});var tv=T((aNe,K2)=>{"use strict";var The=vs(),Qhe=(e,t,n)=>The(e,t,n)<0;K2.exports=Qhe});var tx=T((cNe,X2)=>{"use strict";var _he=vs(),Dhe=(e,t,n)=>_he(e,t,n)===0;X2.exports=Dhe});var nx=T((uNe,eH)=>{"use strict";var Nhe=vs(),Phe=(e,t,n)=>Nhe(e,t,n)!==0;eH.exports=Phe});var nv=T((lNe,tH)=>{"use strict";var Ohe=vs(),Uhe=(e,t,n)=>Ohe(e,t,n)>=0;tH.exports=Uhe});var rv=T((dNe,nH)=>{"use strict";var Fhe=vs(),Mhe=(e,t,n)=>Fhe(e,t,n)<=0;nH.exports=Mhe});var rx=T((pNe,rH)=>{"use strict";var Lhe=tx(),jhe=nx(),Vhe=Dh(),Ghe=nv(),zhe=tv(),qhe=rv(),Hhe=(e,t,n,s)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return Lhe(e,n,s);case"!=":return jhe(e,n,s);case">":return Vhe(e,n,s);case">=":return Ghe(e,n,s);case"<":return zhe(e,n,s);case"<=":return qhe(e,n,s);default:throw new TypeError(`Invalid operator: ${t}`)}};rH.exports=Hhe});var iH=T((fNe,sH)=>{"use strict";var Jhe=Bn(),Whe=ga(),{safeRe:sv,t:iv}=ld(),Yhe=(e,t)=>{if(e instanceof Jhe)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?sv[iv.COERCEFULL]:sv[iv.COERCE]);else{let c=t.includePrerelease?sv[iv.COERCERTLFULL]:sv[iv.COERCERTL],u;for(;(u=c.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(n===null)return null;let s=n[2],r=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Whe(`${s}.${r}.${i}${o}${a}`,t)};sH.exports=Yhe});var aH=T((hNe,oH)=>{"use strict";var Zhe=ga(),Khe=ud(),Xhe=Bn(),ege=(e,t,n)=>{if(!Khe.RELEASE_TYPES.includes(t))return null;let s=tge(e,n);return s&&nge(s,t)},tge=(e,t)=>{let n=e instanceof Xhe?e.version:e;return Zhe(n,t)},nge=(e,t)=>{if(rge(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},rge=e=>e.startsWith("pre");oH.exports=ege});var uH=T((gNe,cH)=>{"use strict";var sx=class{constructor(){this.max=1e3,this.map=new Map}get(t){let n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(t,n)}return this}};cH.exports=sx});var bs=T((mNe,fH)=>{"use strict";var sge=/\s+/g,ix=class e{constructor(t,n){if(n=oge(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof ox)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(sge," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(r=>!dH(r[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&gge(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let n=this.set[t];for(let s=0;s<n.length;s++)s>0&&(this.formatted+=" "),this.formatted+=n[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(hge,"");let s=((this.options.includePrerelease&&pge)|(this.options.loose&&fge))+":"+t,r=lH.get(s);if(r)return r;let i=this.options.loose,o=i?rr[xn.HYPHENRANGELOOSE]:rr[xn.HYPHENRANGE];t=t.replace(o,kge(this.options.includePrerelease)),Nt("hyphen replace",t),t=t.replace(rr[xn.COMPARATORTRIM],uge),Nt("comparator trim",t),t=t.replace(rr[xn.TILDETRIM],lge),Nt("tilde trim",t),t=t.replace(rr[xn.CARETTRIM],dge),Nt("caret trim",t);let a=t.split(" ").map(p=>mge(p,this.options)).join(" ").split(/\s+/).map(p=>Sge(p,this.options));i&&(a=a.filter(p=>(Nt("loose invalid filter",p,this.options),!!p.match(rr[xn.COMPARATORLOOSE])))),Nt("range list",a);let c=new Map,u=a.map(p=>new ox(p,this.options));for(let p of u){if(dH(p))return[p];c.set(p.value,p)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return lH.set(s,l),l}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(s=>pH(s,n)&&t.set.some(r=>pH(r,n)&&s.every(i=>r.every(o=>i.intersects(o,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new age(t,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Rge(this.set[n],t,this.options))return!0;return!1}};fH.exports=ix;var ige=uH(),lH=new ige,oge=WE(),ox=Nh(),Nt=_h(),age=Bn(),{safeRe:rr,src:cge,t:xn,comparatorTrimReplace:uge,tildeTrimReplace:lge,caretTrimReplace:dge}=ld(),{FLAG_INCLUDE_PRERELEASE:pge,FLAG_LOOSE:fge}=ud(),hge=new RegExp(cge[xn.BUILD],"g"),dH=e=>e.value==="<0.0.0-0",gge=e=>e.value==="",pH=(e,t)=>{let n=!0,s=e.slice(),r=s.pop();for(;n&&s.length;)n=s.every(i=>r.intersects(i,t)),r=s.pop();return n},mge=(e,t)=>(e=e.replace(rr[xn.BUILD],""),Nt("comp",e,t),e=vge(e,t),Nt("caret",e),e=yge(e,t),Nt("tildes",e),e=wge(e,t),Nt("xrange",e),e=Cge(e,t),Nt("stars",e),e),un=e=>!e||e.toLowerCase()==="x"||e==="*",Age=(e,t,n)=>un(e)&&!un(t)||un(t)&&n&&!un(n),yge=(e,t)=>e.trim().split(/\s+/).map(n=>Ege(n,t)).join(" "),Ege=(e,t)=>{let n=t.loose?rr[xn.TILDELOOSE]:rr[xn.TILDE],s=t.includePrerelease?"-0":"";return e.replace(n,(r,i,o,a,c)=>{Nt("tilde",e,r,i,o,a,c);let u;return un(i)?u="":un(o)?u=`>=${i}.0.0${s} <${+i+1}.0.0-0`:un(a)?u=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:c?(Nt("replaceTilde pr",c),u=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`):u=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`,Nt("tilde return",u),u})},vge=(e,t)=>e.trim().split(/\s+/).map(n=>bge(n,t)).join(" "),bge=(e,t)=>{Nt("caret",e,t);let n=t.loose?rr[xn.CARETLOOSE]:rr[xn.CARET],s=t.includePrerelease?"-0":"";return e.replace(n,(r,i,o,a,c)=>{Nt("caret",e,r,i,o,a,c);let u;return un(i)?u="":un(o)?u=`>=${i}.0.0${s} <${+i+1}.0.0-0`:un(a)?i==="0"?u=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:u=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:c?(Nt("replaceCaret pr",c),i==="0"?o==="0"?u=`>=${i}.${o}.${a}-${c} <${i}.${o}.${+a+1}-0`:u=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`:u=`>=${i}.${o}.${a}-${c} <${+i+1}.0.0-0`):(Nt("no pr"),i==="0"?o==="0"?u=`>=${i}.${o}.${a} <${i}.${o}.${+a+1}-0`:u=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`:u=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),Nt("caret return",u),u})},wge=(e,t)=>(Nt("replaceXRanges",e,t),e.split(/\s+/).map(n=>Ige(n,t)).join(" ")),Ige=(e,t)=>{e=e.trim();let n=t.loose?rr[xn.XRANGELOOSE]:rr[xn.XRANGE];return e.replace(n,(s,r,i,o,a,c)=>{if(Nt("xRange",e,s,r,i,o,a,c),Age(i,o,a))return e;let u=un(i),l=u||un(o),p=l||un(a),h=p;return r==="="&&h&&(r=""),c=t.includePrerelease?"-0":"",u?r===">"||r==="<"?s="<0.0.0-0":s="*":r&&h?(l&&(o=0),a=0,r===">"?(r=">=",l?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):r==="<="&&(r="<",l?i=+i+1:o=+o+1),r==="<"&&(c="-0"),s=`${r+i}.${o}.${a}${c}`):l?s=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(s=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),Nt("xRange return",s),s})},Cge=(e,t)=>(Nt("replaceStars",e,t),e.trim().replace(rr[xn.STAR],"")),Sge=(e,t)=>(Nt("replaceGTE0",e,t),e.trim().replace(rr[t.includePrerelease?xn.GTE0PRE:xn.GTE0],"")),kge=e=>(t,n,s,r,i,o,a,c,u,l,p,h)=>(un(s)?n="":un(r)?n=`>=${s}.0.0${e?"-0":""}`:un(i)?n=`>=${s}.${r}.0${e?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${e?"-0":""}`,un(u)?c="":un(l)?c=`<${+u+1}.0.0-0`:un(p)?c=`<${u}.${+l+1}.0-0`:h?c=`<=${u}.${l}.${p}-${h}`:e?c=`<${u}.${l}.${+p+1}-0`:c=`<=${c}`,`${n} ${c}`.trim()),Rge=(e,t,n)=>{for(let s=0;s<e.length;s++)if(!e[s].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let s=0;s<e.length;s++)if(Nt(e[s].semver),e[s].semver!==ox.ANY&&e[s].semver.prerelease.length>0){let r=e[s].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}});var Nh=T((ANe,EH)=>{"use strict";var Ph=Symbol("SemVer ANY"),ux=class e{static get ANY(){return Ph}constructor(t,n){if(n=hH(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),cx("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===Ph?this.value="":this.value=this.operator+this.semver.version,cx("comp",this)}parse(t){let n=this.options.loose?gH[mH.COMPARATORLOOSE]:gH[mH.COMPARATOR],s=t.match(n);if(!s)throw new TypeError(`Invalid comparator: ${t}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new AH(s[2],this.options.loose):this.semver=Ph}toString(){return this.value}test(t){if(cx("Comparator.test",t,this.options.loose),this.semver===Ph||t===Ph)return!0;if(typeof t=="string")try{t=new AH(t,this.options)}catch{return!1}return ax(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new yH(t.value,n).test(this.value):t.operator===""?t.value===""?!0:new yH(this.value,n).test(t.semver):(n=hH(n),n.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||ax(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||ax(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};EH.exports=ux;var hH=WE(),{safeRe:gH,t:mH}=ld(),ax=rx(),cx=_h(),AH=Bn(),yH=bs()});var Oh=T((yNe,vH)=>{"use strict";var Bge=bs(),xge=(e,t,n)=>{try{t=new Bge(t,n)}catch{return!1}return t.test(e)};vH.exports=xge});var wH=T((ENe,bH)=>{"use strict";var $ge=bs(),Tge=(e,t)=>new $ge(e,t).set.map(n=>n.map(s=>s.value).join(" ").trim().split(" "));bH.exports=Tge});var CH=T((vNe,IH)=>{"use strict";var Qge=Bn(),_ge=bs(),Dge=(e,t,n)=>{let s=null,r=null,i=null;try{i=new _ge(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!s||r.compare(o)===-1)&&(s=o,r=new Qge(s,n))}),s};IH.exports=Dge});var kH=T((bNe,SH)=>{"use strict";var Nge=Bn(),Pge=bs(),Oge=(e,t,n)=>{let s=null,r=null,i=null;try{i=new Pge(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!s||r.compare(o)===1)&&(s=o,r=new Nge(s,n))}),s};SH.exports=Oge});var xH=T((wNe,BH)=>{"use strict";var lx=Bn(),Uge=bs(),RH=Dh(),Fge=(e,t)=>{e=new Uge(e,t);let n=new lx("0.0.0");if(e.test(n)||(n=new lx("0.0.0-0"),e.test(n)))return n;n=null;for(let s=0;s<e.set.length;++s){let r=e.set[s],i=null;r.forEach(o=>{let a=new lx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||RH(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||RH(n,i))&&(n=i)}return n&&e.test(n)?n:null};BH.exports=Fge});var TH=T((INe,$H)=>{"use strict";var Mge=bs(),Lge=(e,t)=>{try{return new Mge(e,t).range||"*"}catch{return null}};$H.exports=Lge});var ov=T((CNe,NH)=>{"use strict";var jge=Bn(),DH=Nh(),{ANY:Vge}=DH,Gge=bs(),zge=Oh(),QH=Dh(),_H=tv(),qge=rv(),Hge=nv(),Jge=(e,t,n,s)=>{e=new jge(e,s),t=new Gge(t,s);let r,i,o,a,c;switch(n){case">":r=QH,i=qge,o=_H,a=">",c=">=";break;case"<":r=_H,i=Hge,o=QH,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(zge(e,t,s))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],p=null,h=null;if(l.forEach(g=>{g.semver===Vge&&(g=new DH(">=0.0.0")),p=p||g,h=h||g,r(g.semver,p.semver,s)?p=g:o(g.semver,h.semver,s)&&(h=g)}),p.operator===a||p.operator===c||(!h.operator||h.operator===a)&&i(e,h.semver))return!1;if(h.operator===c&&o(e,h.semver))return!1}return!0};NH.exports=Jge});var OH=T((SNe,PH)=>{"use strict";var Wge=ov(),Yge=(e,t,n)=>Wge(e,t,">",n);PH.exports=Yge});var FH=T((kNe,UH)=>{"use strict";var Zge=ov(),Kge=(e,t,n)=>Zge(e,t,"<",n);UH.exports=Kge});var jH=T((RNe,LH)=>{"use strict";var MH=bs(),Xge=(e,t,n)=>(e=new MH(e,n),t=new MH(t,n),e.intersects(t,n));LH.exports=Xge});var GH=T((BNe,VH)=>{"use strict";var eme=Oh(),tme=vs();VH.exports=(e,t,n)=>{let s=[],r=null,i=null,o=e.sort((l,p)=>tme(l,p,n));for(let l of o)eme(l,t,n)?(i=l,r||(r=l)):(i&&s.push([r,i]),i=null,r=null);r&&s.push([r,null]);let a=[];for(let[l,p]of s)l===p?a.push(l):!p&&l===o[0]?a.push("*"):p?l===o[0]?a.push(`<=${p}`):a.push(`${l} - ${p}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var YH=T((xNe,WH)=>{"use strict";var zH=bs(),fx=Nh(),{ANY:dx}=fx,px=Oh(),hx=vs(),nme=(e,t,n={})=>{if(e===t)return!0;e=new zH(e,n),t=new zH(t,n);let s=!1;e:for(let r of e.set){for(let i of t.set){let o=sme(r,i,n);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},rme=[new fx(">=0.0.0-0")],qH=[new fx(">=0.0.0")],sme=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===dx){if(t.length===1&&t[0].semver===dx)return!0;n.includePrerelease?e=rme:e=qH}if(t.length===1&&t[0].semver===dx){if(n.includePrerelease)return!0;t=qH}let s=new Set,r,i;for(let g of e)g.operator===">"||g.operator===">="?r=HH(r,g,n):g.operator==="<"||g.operator==="<="?i=JH(i,g,n):s.add(g.semver);if(s.size>1)return null;let o;if(r&&i){if(o=hx(r.semver,i.semver,n),o>0)return null;if(o===0&&(r.operator!==">="||i.operator!=="<="))return null}for(let g of s){if(r&&!px(g,String(r),n)||i&&!px(g,String(i),n))return null;for(let m of t)if(!px(g,String(m),n))return!1;return!0}let a,c,u,l,p=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,h=r&&!n.includePrerelease&&r.semver.prerelease.length?r.semver:!1;p&&p.prerelease.length===1&&i.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let g of t){if(l=l||g.operator===">"||g.operator===">=",u=u||g.operator==="<"||g.operator==="<=",r){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator===">"||g.operator===">="){if(a=HH(r,g,n),a===g&&a!==r)return!1}else if(r.operator===">="&&!g.test(r.semver))return!1}if(i){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator==="<"||g.operator==="<="){if(c=JH(i,g,n),c===g&&c!==i)return!1}else if(i.operator==="<="&&!g.test(i.semver))return!1}if(!g.operator&&(i||r)&&o!==0)return!1}return!(r&&u&&!i&&o!==0||i&&l&&!r&&o!==0||h||p)},HH=(e,t,n)=>{if(!e)return t;let s=hx(e.semver,t.semver,n);return s>0?e:s<0||t.operator===">"&&e.operator===">="?t:e},JH=(e,t,n)=>{if(!e)return t;let s=hx(e.semver,t.semver,n);return s<0?e:s>0||t.operator==="<"&&e.operator==="<="?t:e};WH.exports=nme});var mx=T(($Ne,XH)=>{"use strict";var gx=ld(),ZH=ud(),ime=Bn(),KH=KB(),ome=ga(),ame=w2(),cme=C2(),ume=R2(),lme=$2(),dme=Q2(),pme=D2(),fme=P2(),hme=U2(),gme=vs(),mme=j2(),Ame=G2(),yme=ev(),Eme=J2(),vme=Y2(),bme=Dh(),wme=tv(),Ime=tx(),Cme=nx(),Sme=nv(),kme=rv(),Rme=rx(),Bme=iH(),xme=aH(),$me=Nh(),Tme=bs(),Qme=Oh(),_me=wH(),Dme=CH(),Nme=kH(),Pme=xH(),Ome=TH(),Ume=ov(),Fme=OH(),Mme=FH(),Lme=jH(),jme=GH(),Vme=YH();XH.exports={parse:ome,valid:ame,clean:cme,inc:ume,diff:lme,major:dme,minor:pme,patch:fme,prerelease:hme,compare:gme,rcompare:mme,compareLoose:Ame,compareBuild:yme,sort:Eme,rsort:vme,gt:bme,lt:wme,eq:Ime,neq:Cme,gte:Sme,lte:kme,cmp:Rme,coerce:Bme,truncate:xme,Comparator:$me,Range:Tme,satisfies:Qme,toComparators:_me,maxSatisfying:Dme,minSatisfying:Nme,minVersion:Pme,validRange:Ome,outside:Ume,gtr:Fme,ltr:Mme,intersects:Lme,simplifyRange:jme,subset:Vme,SemVer:ime,re:gx.re,src:gx.src,tokens:gx.t,SEMVER_SPEC_VERSION:ZH.SEMVER_SPEC_VERSION,RELEASE_TYPES:ZH.RELEASE_TYPES,compareIdentifiers:KH.compareIdentifiers,rcompareIdentifiers:KH.rcompareIdentifiers}});var fxe={};rs(fxe,{post:()=>r3});module.exports=u3(fxe);On();var n3=G(require("path"));On();On();var AR;(function(e){e.Pass="Pass",e.Fail="Fail",e.Error="Error",e.Skipped="Skipped",e.Unknown="Unknown"})(AR||(AR={}));var zV;(function(e){e.High="high",e.Medium="medium",e.Low="low"})(zV||(zV={}));var qV;(function(e){e.Skyramp="skyramp",e.External="external"})(qV||(qV={}));var yR;(function(e){e.Update="UPDATE",e.Regenerate="REGENERATE",e.Delete="DELETE",e.Verify="VERIFY",e.Ignore="IGNORE"})(yR||(yR={}));var HV;(function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"})(HV||(HV={}));var Ce={};rs(Ce,{BRAND:()=>Oue,DIRTY:()=>mc,EMPTY_PATH:()=>gue,INVALID:()=>Be,NEVER:()=>ble,OK:()=>Un,ParseStatus:()=>Sn,Schema:()=>Ke,ZodAny:()=>Xo,ZodArray:()=>Xi,ZodBigInt:()=>yc,ZodBoolean:()=>Ec,ZodBranded:()=>Qf,ZodCatch:()=>$c,ZodDate:()=>vc,ZodDefault:()=>xc,ZodDiscriminatedUnion:()=>zy,ZodEffects:()=>fs,ZodEnum:()=>Rc,ZodError:()=>Ar,ZodFirstPartyTypeKind:()=>De,ZodFunction:()=>Hy,ZodIntersection:()=>Cc,ZodIssueCode:()=>j,ZodLazy:()=>Sc,ZodLiteral:()=>kc,ZodMap:()=>Fl,ZodNaN:()=>Ll,ZodNativeEnum:()=>Bc,ZodNever:()=>Fs,ZodNull:()=>wc,ZodNullable:()=>gi,ZodNumber:()=>Ac,ZodObject:()=>yr,ZodOptional:()=>ds,ZodParsedType:()=>ie,ZodPipeline:()=>_f,ZodPromise:()=>ea,ZodReadonly:()=>Tc,ZodRecord:()=>qy,ZodSchema:()=>Ke,ZodSet:()=>Ml,ZodString:()=>Ko,ZodSymbol:()=>Ol,ZodTransformer:()=>fs,ZodTuple:()=>hi,ZodType:()=>Ke,ZodUndefined:()=>bc,ZodUnion:()=>Ic,ZodUnknown:()=>Ki,ZodVoid:()=>Ul,addIssueToContext:()=>ee,any:()=>que,array:()=>Yue,bigint:()=>Lue,boolean:()=>sG,coerce:()=>vle,custom:()=>tG,date:()=>jue,datetimeRegex:()=>XV,defaultErrorMap:()=>Yi,discriminatedUnion:()=>ele,effect:()=>ple,enum:()=>ule,function:()=>ole,getErrorMap:()=>Dl,getParsedType:()=>fi,instanceof:()=>Fue,intersection:()=>tle,isAborted:()=>Vy,isAsync:()=>Nl,isDirty:()=>Gy,isValid:()=>Zo,late:()=>Uue,lazy:()=>ale,literal:()=>cle,makeIssue:()=>Tf,map:()=>sle,nan:()=>Mue,nativeEnum:()=>lle,never:()=>Jue,null:()=>zue,nullable:()=>hle,number:()=>rG,object:()=>Zue,objectUtil:()=>ER,oboolean:()=>Ele,onumber:()=>yle,optional:()=>fle,ostring:()=>Ale,pipeline:()=>mle,preprocess:()=>gle,promise:()=>dle,quotelessJson:()=>pue,record:()=>rle,set:()=>ile,setErrorMap:()=>hue,strictObject:()=>Kue,string:()=>nG,symbol:()=>Vue,transformer:()=>ple,tuple:()=>nle,undefined:()=>Gue,union:()=>Xue,unknown:()=>Hue,util:()=>st,void:()=>Wue});var st;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let i={};for(let o of r)i[o]=o;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),o={};for(let a of i)o[a]=r[a];return e.objectValues(o)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},e.find=(r,i)=>{for(let o of r)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=s,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var ER;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ER||(ER={}));var ie=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return Number.isNaN(e)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(e)?ie.array:e===null?ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ie.promise:typeof Map<"u"&&e instanceof Map?ie.map:typeof Set<"u"&&e instanceof Set?ie.set:typeof Date<"u"&&e instanceof Date?ie.date:ie.object;default:return ie.unknown}};var j=st.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"]),pue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ar=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},s={_errors:[]},r=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(n(o));else{let a=s,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return r(this),s}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},s=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else s.push(t(r));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}};Ar.create=e=>new Ar(e);var fue=(e,t)=>{let n;switch(e.code){case j.invalid_type:e.received===ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case j.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case j.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case j.invalid_union:n="Invalid input";break;case j.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case j.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case j.invalid_arguments:n="Invalid function arguments";break;case j.invalid_return_type:n="Invalid function return type";break;case j.invalid_date:n="Invalid date";break;case j.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case j.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case j.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case j.custom:n="Invalid input";break;case j.invalid_intersection_types:n="Intersection results could not be merged";break;case j.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case j.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}},Yi=fue;var JV=Yi;function hue(e){JV=e}function Dl(){return JV}var Tf=e=>{let{data:t,path:n,errorMaps:s,issueData:r}=e,i=[...n,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let a="",c=s.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...r,path:i,message:a}},gue=[];function ee(e,t){let n=Dl(),s=Tf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Yi?void 0:Yi].filter(r=>!!r)});e.common.issues.push(s)}var Sn=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let s=[];for(let r of n){if(r.status==="aborted")return Be;r.status==="dirty"&&t.dirty(),s.push(r.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,n){let s=[];for(let r of n){let i=await r.key,o=await r.value;s.push({key:i,value:o})}return e.mergeObjectSync(t,s)}static mergeObjectSync(t,n){let s={};for(let r of n){let{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(s[i.value]=o.value)}return{status:t.value,value:s}}},Be=Object.freeze({status:"aborted"}),mc=e=>({status:"dirty",value:e}),Un=e=>({status:"valid",value:e}),Vy=e=>e.status==="aborted",Gy=e=>e.status==="dirty",Zo=e=>e.status==="valid",Nl=e=>typeof Promise<"u"&&e instanceof Promise;var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(fe||(fe={}));var ps=class{constructor(t,n,s,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=s,this._key=r}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}},WV=(e,t)=>{if(Zo(t))return{success:!0,data:t.value};if(!e.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 Ar(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:s,description:r}=e;if(t&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??s??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:r}}var Ke=class{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Sn,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Nl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let s=this.safeParse(t,n);if(s.success)return s.data;throw s.error}safeParse(t,n){let s={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parseSync({data:t,path:s.path,parent:s});return WV(s,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)};if(!this["~standard"].async)try{let s=this._parseSync({data:t,path:[],parent:n});return Zo(s)?{value:s.value}:{issues:n.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>Zo(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){let s=await this.safeParseAsync(t,n);if(s.success)return s.data;throw s.error}async safeParseAsync(t,n){let s={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parse({data:t,path:s.path,parent:s}),i=await(Nl(r)?r:Promise.resolve(r));return WV(s,i)}refine(t,n){let s=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{let o=t(r),a=()=>i.addIssue({code:j.custom,...s(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((s,r)=>t(s)?!0:(r.addIssue(typeof n=="function"?n(s,r):n),!1))}_refinement(t){return new fs({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 ds.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xi.create(this)}promise(){return ea.create(this,this._def)}or(t){return Ic.create([this,t],this._def)}and(t){return Cc.create(this,t,this._def)}transform(t){return new fs({...ze(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new xc({...ze(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new Qf({typeName:De.ZodBranded,type:this,...ze(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new $c({...ze(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _f.create(this,t)}readonly(){return Tc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mue=/^c[^\s-]{8,}$/i,Aue=/^[0-9a-z]+$/,yue=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Eue=/^[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,vue=/^[a-z0-9_-]{21}$/i,bue=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wue=/^[-+]?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)?)??$/,Iue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",vR,Sue=/^(?:(?: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])$/,kue=/^(?:(?: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])$/,Rue=/^(([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]))$/,Bue=/^(([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])$/,xue=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$ue=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ZV="((\\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])))",Tue=new RegExp(`^${ZV}$`);function KV(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Que(e){return new RegExp(`^${KV(e)}$`)}function XV(e){let t=`${ZV}T${KV(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _ue(e,t){return!!((t==="v4"||!t)&&Sue.test(e)||(t==="v6"||!t)&&Rue.test(e))}function Due(e,t){if(!bue.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let s=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(s));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function Nue(e,t){return!!((t==="v4"||!t)&&kue.test(e)||(t==="v6"||!t)&&Bue.test(e))}var Ko=class e extends Ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ie.string){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_type,expected:ie.string,received:i.parsedType}),Be}let s=new Sn,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(r=this._getOrReturnCtx(t,r),o?ee(r,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ee(r,{code:j.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),s.dirty())}else if(i.kind==="email")Iue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"email",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="emoji")vR||(vR=new RegExp(Cue,"u")),vR.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"emoji",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="uuid")Eue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"uuid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="nanoid")vue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"nanoid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid")mue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"cuid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid2")Aue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"cuid2",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="ulid")yue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"ulid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),ee(r,{validation:"url",code:j.invalid_string,message:i.message}),s.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"regex",code:j.invalid_string,message:i.message}),s.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):i.kind==="datetime"?XV(i).test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:"datetime",message:i.message}),s.dirty()):i.kind==="date"?Tue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:"date",message:i.message}),s.dirty()):i.kind==="time"?Que(i).test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:"time",message:i.message}),s.dirty()):i.kind==="duration"?wue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"duration",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="ip"?_ue(t.data,i.version)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"ip",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="jwt"?Due(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"jwt",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="cidr"?Nue(t.data,i.version)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"cidr",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="base64"?xue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"base64",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="base64url"?$ue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"base64url",code:j.invalid_string,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}_regex(t,n,s){return this.refinement(r=>t.test(r),{validation:n,code:j.invalid_string,...fe.errToObj(s)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...fe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...fe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...fe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...fe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Ko.create=e=>new Ko({checks:[],typeName:De.ZodString,coerce:e?.coerce??!1,...ze(e)});function Pue(e,t){let n=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=n>s?n:s,i=Number.parseInt(e.toFixed(r).replace(".","")),o=Number.parseInt(t.toFixed(r).replace(".",""));return i%o/10**r}var Ac=class e extends Ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ie.number){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_type,expected:ie.number,received:i.parsedType}),Be}let s,r=new Sn;for(let i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),ee(s,{code:j.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?Pue(t.data,i.value)!==0&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),ee(s,{code:j.not_finite,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,s,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:s,message:fe.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Ac.create=e=>new Ac({checks:[],typeName:De.ZodNumber,coerce:e?.coerce||!1,...ze(e)});var yc=class e extends Ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ie.bigint)return this._getInvalidInput(t);let s,r=new Sn;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return ee(n,{code:j.invalid_type,expected:ie.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,s,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:s,message:fe.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};yc.create=e=>new yc({checks:[],typeName:De.ZodBigInt,coerce:e?.coerce??!1,...ze(e)});var Ec=class extends Ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ie.boolean){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.boolean,received:s.parsedType}),Be}return Un(t.data)}};Ec.create=e=>new Ec({typeName:De.ZodBoolean,coerce:e?.coerce||!1,...ze(e)});var vc=class e extends Ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ie.date){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_type,expected:ie.date,received:i.parsedType}),Be}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_date}),Be}let s=new Sn,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),s.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),s.dirty()):st.assertNever(i);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};vc.create=e=>new vc({checks:[],coerce:e?.coerce||!1,typeName:De.ZodDate,...ze(e)});var Ol=class extends Ke{_parse(t){if(this._getType(t)!==ie.symbol){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.symbol,received:s.parsedType}),Be}return Un(t.data)}};Ol.create=e=>new Ol({typeName:De.ZodSymbol,...ze(e)});var bc=class extends Ke{_parse(t){if(this._getType(t)!==ie.undefined){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.undefined,received:s.parsedType}),Be}return Un(t.data)}};bc.create=e=>new bc({typeName:De.ZodUndefined,...ze(e)});var wc=class extends Ke{_parse(t){if(this._getType(t)!==ie.null){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.null,received:s.parsedType}),Be}return Un(t.data)}};wc.create=e=>new wc({typeName:De.ZodNull,...ze(e)});var Xo=class extends Ke{constructor(){super(...arguments),this._any=!0}_parse(t){return Un(t.data)}};Xo.create=e=>new Xo({typeName:De.ZodAny,...ze(e)});var Ki=class extends Ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Un(t.data)}};Ki.create=e=>new Ki({typeName:De.ZodUnknown,...ze(e)});var Fs=class extends Ke{_parse(t){let n=this._getOrReturnCtx(t);return ee(n,{code:j.invalid_type,expected:ie.never,received:n.parsedType}),Be}};Fs.create=e=>new Fs({typeName:De.ZodNever,...ze(e)});var Ul=class extends Ke{_parse(t){if(this._getType(t)!==ie.undefined){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.void,received:s.parsedType}),Be}return Un(t.data)}};Ul.create=e=>new Ul({typeName:De.ZodVoid,...ze(e)});var Xi=class e extends Ke{_parse(t){let{ctx:n,status:s}=this._processInputParams(t),r=this._def;if(n.parsedType!==ie.array)return ee(n,{code:j.invalid_type,expected:ie.array,received:n.parsedType}),Be;if(r.exactLength!==null){let o=n.data.length>r.exactLength.value,a=n.data.length<r.exactLength.value;(o||a)&&(ee(n,{code:o?j.too_big:j.too_small,minimum:a?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),s.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(ee(n,{code:j.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),s.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(ee(n,{code:j.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>r.type._parseAsync(new ps(n,o,n.path,a)))).then(o=>Sn.mergeArray(s,o));let i=[...n.data].map((o,a)=>r.type._parseSync(new ps(n,o,n.path,a)));return Sn.mergeArray(s,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}};Xi.create=(e,t)=>new Xi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...ze(t)});function Pl(e){if(e instanceof yr){let t={};for(let n in e.shape){let s=e.shape[n];t[n]=ds.create(Pl(s))}return new yr({...e._def,shape:()=>t})}else return e instanceof Xi?new Xi({...e._def,type:Pl(e.element)}):e instanceof ds?ds.create(Pl(e.unwrap())):e instanceof gi?gi.create(Pl(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>Pl(t))):e}var yr=class e extends Ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ie.object){let u=this._getOrReturnCtx(t);return ee(u,{code:j.invalid_type,expected:ie.object,received:u.parsedType}),Be}let{status:s,ctx:r}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Fs&&this._def.unknownKeys==="strip"))for(let u in r.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],p=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new ps(r,p,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Fs){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(u==="strict")a.length>0&&(ee(r,{code:j.unrecognized_keys,keys:a}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let p=r.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new ps(r,p,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let p=await l.key,h=await l.value;u.push({key:p,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>Sn.mergeObjectSync(s,u)):Sn.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,s)=>{let r=this._def.errorMap?.(n,s).message??s.defaultError;return n.code==="unrecognized_keys"?{message:fe.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let s of st.objectKeys(t))t[s]&&this.shape[s]&&(n[s]=this.shape[s]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let s of st.objectKeys(this.shape))t[s]||(n[s]=this.shape[s]);return new e({...this._def,shape:()=>n})}deepPartial(){return Pl(this)}partial(t){let n={};for(let s of st.objectKeys(this.shape)){let r=this.shape[s];t&&!t[s]?n[s]=r:n[s]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let s of st.objectKeys(this.shape))if(t&&!t[s])n[s]=this.shape[s];else{let i=this.shape[s];for(;i instanceof ds;)i=i._def.innerType;n[s]=i}return new e({...this._def,shape:()=>n})}keyof(){return eG(st.objectKeys(this.shape))}};yr.create=(e,t)=>new yr({shape:()=>e,unknownKeys:"strip",catchall:Fs.create(),typeName:De.ZodObject,...ze(t)});yr.strictCreate=(e,t)=>new yr({shape:()=>e,unknownKeys:"strict",catchall:Fs.create(),typeName:De.ZodObject,...ze(t)});yr.lazycreate=(e,t)=>new yr({shape:e,unknownKeys:"strip",catchall:Fs.create(),typeName:De.ZodObject,...ze(t)});var Ic=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s=this._def.options;function r(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Ar(a.ctx.common.issues));return ee(n,{code:j.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(s.map(async i=>{let o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(r);{let i,o=[];for(let c of s){let u={...n,common:{...n.common,issues:[]},parent:null},l=c._parseSync({data:n.data,path:n.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Ar(c));return ee(n,{code:j.invalid_union,unionErrors:a}),Be}}get options(){return this._def.options}};Ic.create=(e,t)=>new Ic({options:e,typeName:De.ZodUnion,...ze(t)});var Zi=e=>e instanceof Sc?Zi(e.schema):e instanceof fs?Zi(e.innerType()):e instanceof kc?[e.value]:e instanceof Rc?e.options:e instanceof Bc?st.objectValues(e.enum):e instanceof xc?Zi(e._def.innerType):e instanceof bc?[void 0]:e instanceof wc?[null]:e instanceof ds?[void 0,...Zi(e.unwrap())]:e instanceof gi?[null,...Zi(e.unwrap())]:e instanceof Qf||e instanceof Tc?Zi(e.unwrap()):e instanceof $c?Zi(e._def.innerType):[],zy=class e extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.object)return ee(n,{code:j.invalid_type,expected:ie.object,received:n.parsedType}),Be;let s=this.discriminator,r=n.data[s],i=this.optionsMap.get(r);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}):(ee(n,{code:j.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,s){let r=new Map;for(let i of n){let o=Zi(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(r.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);r.set(a,i)}}return new e({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...ze(s)})}};function bR(e,t){let n=fi(e),s=fi(t);if(e===t)return{valid:!0,data:e};if(n===ie.object&&s===ie.object){let r=st.objectKeys(t),i=st.objectKeys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=bR(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===ie.array&&s===ie.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=bR(o,a);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===ie.date&&s===ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Cc=class extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t),r=(i,o)=>{if(Vy(i)||Vy(o))return Be;let a=bR(i.value,o.value);return a.valid?((Gy(i)||Gy(o))&&n.dirty(),{status:n.value,value:a.data}):(ee(s,{code:j.invalid_intersection_types}),Be)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};Cc.create=(e,t,n)=>new Cc({left:e,right:t,typeName:De.ZodIntersection,...ze(n)});var hi=class e extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.array)return ee(s,{code:j.invalid_type,expected:ie.array,received:s.parsedType}),Be;if(s.data.length<this._def.items.length)return ee(s,{code:j.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&s.data.length>this._def.items.length&&(ee(s,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...s.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ps(s,o,s.path,a)):null}).filter(o=>!!o);return s.common.async?Promise.all(i).then(o=>Sn.mergeArray(n,o)):Sn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:De.ZodTuple,rest:null,...ze(t)})};var qy=class e extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.object)return ee(s,{code:j.invalid_type,expected:ie.object,received:s.parsedType}),Be;let r=[],i=this._def.keyType,o=this._def.valueType;for(let a in s.data)r.push({key:i._parse(new ps(s,a,s.path,a)),value:o._parse(new ps(s,s.data[a],s.path,a)),alwaysSet:a in s.data});return s.common.async?Sn.mergeObjectAsync(n,r):Sn.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,s){return n instanceof Ke?new e({keyType:t,valueType:n,typeName:De.ZodRecord,...ze(s)}):new e({keyType:Ko.create(),valueType:t,typeName:De.ZodRecord,...ze(n)})}},Fl=class extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.map)return ee(s,{code:j.invalid_type,expected:ie.map,received:s.parsedType}),Be;let r=this._def.keyType,i=this._def.valueType,o=[...s.data.entries()].map(([a,c],u)=>({key:r._parse(new ps(s,a,s.path,[u,"key"])),value:i._parse(new ps(s,c,s.path,[u,"value"]))}));if(s.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Be;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),a.set(u.value,l.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return Be;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),a.set(u.value,l.value)}return{status:n.value,value:a}}}};Fl.create=(e,t,n)=>new Fl({valueType:t,keyType:e,typeName:De.ZodMap,...ze(n)});var Ml=class e extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.set)return ee(s,{code:j.invalid_type,expected:ie.set,received:s.parsedType}),Be;let r=this._def;r.minSize!==null&&s.data.size<r.minSize.value&&(ee(s,{code:j.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&s.data.size>r.maxSize.value&&(ee(s,{code:j.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Be;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}let a=[...s.data.values()].map((c,u)=>i._parse(new ps(s,c,s.path,u)));return s.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Ml.create=(e,t)=>new Ml({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...ze(t)});var Hy=class e extends Ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.function)return ee(n,{code:j.invalid_type,expected:ie.function,received:n.parsedType}),Be;function s(a,c){return Tf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dl(),Yi].filter(u=>!!u),issueData:{code:j.invalid_arguments,argumentsError:c}})}function r(a,c){return Tf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dl(),Yi].filter(u=>!!u),issueData:{code:j.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ea){let a=this;return Un(async function(...c){let u=new Ar([]),l=await a._def.args.parseAsync(c,i).catch(g=>{throw u.addIssue(s(c,g)),u}),p=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(p,i).catch(g=>{throw u.addIssue(r(p,g)),u})})}else{let a=this;return Un(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Ar([s(c,u.error)]);let l=Reflect.apply(o,this,u.data),p=a._def.returns.safeParse(l,i);if(!p.success)throw new Ar([r(l,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:hi.create(t).rest(Ki.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,s){return new e({args:t||hi.create([]).rest(Ki.create()),returns:n||Ki.create(),typeName:De.ZodFunction,...ze(s)})}},Sc=class extends Ke{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Sc.create=(e,t)=>new Sc({getter:e,typeName:De.ZodLazy,...ze(t)});var kc=class extends Ke{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:j.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}};kc.create=(e,t)=>new kc({value:e,typeName:De.ZodLiteral,...ze(t)});function eG(e,t){return new Rc({values:e,typeName:De.ZodEnum,...ze(t)})}var Rc=class e extends Ke{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),s=this._def.values;return ee(n,{expected:st.joinValues(s),received:n.parsedType,code:j.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),s=this._def.values;return ee(n,{received:n.data,code:j.invalid_enum_value,options:s}),Be}return Un(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(s=>!t.includes(s)),{...this._def,...n})}};Rc.create=eG;var Bc=class extends Ke{_parse(t){let n=st.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==ie.string&&s.parsedType!==ie.number){let r=st.objectValues(n);return ee(s,{expected:st.joinValues(r),received:s.parsedType,code:j.invalid_type}),Be}if(this._cache||(this._cache=new Set(st.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=st.objectValues(n);return ee(s,{received:s.data,code:j.invalid_enum_value,options:r}),Be}return Un(t.data)}get enum(){return this._def.values}};Bc.create=(e,t)=>new Bc({values:e,typeName:De.ZodNativeEnum,...ze(t)});var ea=class extends Ke{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.promise&&n.common.async===!1)return ee(n,{code:j.invalid_type,expected:ie.promise,received:n.parsedType}),Be;let s=n.parsedType===ie.promise?n.data:Promise.resolve(n.data);return Un(s.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ea.create=(e,t)=>new ea({type:e,typeName:De.ZodPromise,...ze(t)});var fs=class extends Ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:s}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:o=>{ee(s,o),o.fatal?n.abort():n.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let o=r.transform(s.data,i);if(s.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return Be;let c=await this._def.schema._parseAsync({data:a,path:s.path,parent:s});return c.status==="aborted"?Be:c.status==="dirty"?mc(c.value):n.value==="dirty"?mc(c.value):c});{if(n.value==="aborted")return Be;let a=this._def.schema._parseSync({data:o,path:s.path,parent:s});return a.status==="aborted"?Be:a.status==="dirty"?mc(a.value):n.value==="dirty"?mc(a.value):a}}if(r.type==="refinement"){let o=a=>{let c=r.refinement(a,i);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(s.common.async===!1){let a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Be:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(a=>a.status==="aborted"?Be:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(r.type==="transform")if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Zo(o))return Be;let a=r.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>Zo(o)?Promise.resolve(r.transform(o.value,i)).then(a=>({status:n.value,value:a})):Be);st.assertNever(r)}};fs.create=(e,t,n)=>new fs({schema:e,typeName:De.ZodEffects,effect:t,...ze(n)});fs.createWithPreprocess=(e,t,n)=>new fs({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...ze(n)});var ds=class extends Ke{_parse(t){return this._getType(t)===ie.undefined?Un(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ds.create=(e,t)=>new ds({innerType:e,typeName:De.ZodOptional,...ze(t)});var gi=class extends Ke{_parse(t){return this._getType(t)===ie.null?Un(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};gi.create=(e,t)=>new gi({innerType:e,typeName:De.ZodNullable,...ze(t)});var xc=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s=n.data;return n.parsedType===ie.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};xc.create=(e,t)=>new xc({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});var $c=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Nl(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ar(s.common.issues)},input:s.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ar(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};$c.create=(e,t)=>new $c({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});var Ll=class extends Ke{_parse(t){if(this._getType(t)!==ie.nan){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.nan,received:s.parsedType}),Be}return{status:"valid",value:t.data}}};Ll.create=e=>new Ll({typeName:De.ZodNaN,...ze(e)});var Oue=Symbol("zod_brand"),Qf=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}},_f=class e extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?Be:i.status==="dirty"?(n.dirty(),mc(i.value)):this._def.out._parseAsync({data:i.value,path:s.path,parent:s})})();{let r=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return r.status==="aborted"?Be:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:s.path,parent:s})}}static create(t,n){return new e({in:t,out:n,typeName:De.ZodPipeline})}},Tc=class extends Ke{_parse(t){let n=this._def.innerType._parse(t),s=r=>(Zo(r)&&(r.value=Object.freeze(r.value)),r);return Nl(n)?n.then(r=>s(r)):s(n)}unwrap(){return this._def.innerType}};Tc.create=(e,t)=>new Tc({innerType:e,typeName:De.ZodReadonly,...ze(t)});function YV(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function tG(e,t={},n){return e?Xo.create().superRefine((s,r)=>{let i=e(s);if(i instanceof Promise)return i.then(o=>{if(!o){let a=YV(t,s),c=a.fatal??n??!0;r.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=YV(t,s),a=o.fatal??n??!0;r.addIssue({code:"custom",...o,fatal:a})}}):Xo.create()}var Uue={object:yr.lazycreate},De;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(De||(De={}));var Fue=(e,t={message:`Input not instance of ${e.name}`})=>tG(n=>n instanceof e,t),nG=Ko.create,rG=Ac.create,Mue=Ll.create,Lue=yc.create,sG=Ec.create,jue=vc.create,Vue=Ol.create,Gue=bc.create,zue=wc.create,que=Xo.create,Hue=Ki.create,Jue=Fs.create,Wue=Ul.create,Yue=Xi.create,Zue=yr.create,Kue=yr.strictCreate,Xue=Ic.create,ele=zy.create,tle=Cc.create,nle=hi.create,rle=qy.create,sle=Fl.create,ile=Ml.create,ole=Hy.create,ale=Sc.create,cle=kc.create,ule=Rc.create,lle=Bc.create,dle=ea.create,ple=fs.create,fle=ds.create,hle=gi.create,gle=fs.createWithPreprocess,mle=_f.create,Ale=()=>nG().optional(),yle=()=>rG().optional(),Ele=()=>sG().optional(),vle={string:(e=>Ko.create({...e,coerce:!0})),number:(e=>Ac.create({...e,coerce:!0})),boolean:(e=>Ec.create({...e,coerce:!0})),bigint:(e=>yc.create({...e,coerce:!0})),date:(e=>vc.create({...e,coerce:!0}))};var ble=Be;var iG=["playwright","pytest","robot","junit","vitest","jest","mocha","go","rspec","jasmine"];var oG="skyramp_session_storage.json";var wR;(function(e){e.PYTHON="python",e.TYPESCRIPT="typescript",e.JAVASCRIPT="javascript",e.JAVA="java"})(wR||(wR={}));var mi;(function(e){e.SMOKE="smoke",e.FUZZ="fuzz",e.CONTRACT="contract",e.LOAD="load",e.INTEGRATION="integration",e.E2E="e2e",e.UI="ui",e.UNIT="unit",e.UNKNOWN="unknown"})(mi||(mi={}));var kQe=[mi.CONTRACT,mi.INTEGRATION,mi.E2E,mi.UI];var aG;(function(e){e.Rest="rest",e.Grpc="grpc",e.Kafka="kafka"})(aG||(aG={}));var Jy;(function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.HEAD="HEAD",e.OPTIONS="OPTIONS"})(Jy||(Jy={}));var Df;(function(e){e.LOCAL="local",e.DOCKER="docker",e.KUBERNETES="k8s"})(Df||(Df={}));var wle=Ce.nativeEnum(Df),Ile=Ce.preprocess(e=>e==="kubernetes"?Df.KUBERNETES:e,wle);var Cle=Ce.object({language:Ce.nativeEnum(wR).describe("Programming language for the generated test (default: python). Must be one of: python, typescript, javascript, java"),framework:Ce.string().describe(`Testing framework to use. Supported: ${iG.join(", ")} (e.g. pytest for python, playwright/vitest/jest for js/ts, junit for java).`)}),cG=Ce.object({...Cle.shape,deployDashboard:Ce.boolean().default(!1).describe("Whether to deploy the Skyramp dashboard for test monitoring"),runtime:Ile.default(Df.LOCAL).describe("Runtime environment (local, docker, or k8s; accepts kubernetes as an alias)"),dockerNetwork:Ce.string().default("").describe("Docker network name to use for containerized testing"),dockerWorkerPort:Ce.number().int().min(0).max(65535).default(0).describe("Port number for the Docker worker service"),k8sNamespace:Ce.string().default("").describe("Kubernetes namespace for deployment"),k8sConfig:Ce.string().default("").describe("Path to Kubernetes configuration file"),k8sContext:Ce.string().default("").describe("Kubernetes context to use"),authHeader:Ce.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:Ce.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:Ce.boolean().default(!1).describe("Whether to allow insecure SSL connections for HTTPS endpoints"),output:Ce.string().optional().refine(e=>!e||e===""?!0:[".py",".ts",".js",".java"].some(n=>e.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:Ce.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:Ce.boolean().default(!0).describe("Whether to overwrite existing files in the output directory"),mockPort:Ce.number().int().min(0).max(65535).default(0).describe("Port number for the mock server"),optionalFields:Ce.boolean().default(!1).describe("Whether to include optional fields in the generated test/mock"),prompt:Ce.string().describe("The prompt user provided to generate the test")}),RQe=Ce.object({playwrightInput:Ce.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:Ce.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:Ce.string().optional().describe(`Path to SAVE Playwright session storage after trace collection. Omit this argument to use the default \u2014 \`${oG}\` resolved against the active outputDir, which produces an absolute path like '/abs/outputDir/${oG}'. 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:Ce.union([Ce.enum(["","hd","full-hd","2k"]),Ce.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:Ce.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:Ce.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.")}),BQe=Ce.object({trace:Ce.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:Ce.array(Ce.string()).default([]).describe("List of endpoints or patterns to include in test generation."),exclude:Ce.array(Ce.string()).default([]).describe("List of endpoints or patterns to exclude from test generation."),...cG.shape}),xQe={endpointURL:Ce.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:Ce.union([Ce.nativeEnum(Jy),Ce.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:Ce.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:Ce.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:Ce.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:Ce.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for form data parameters"),requestData:Ce.string().default("").refine(e=>{if(!e||e===""||e.startsWith("@"))return!0;try{return JSON.parse(e),!0}catch{}let t=e.trim();return!!(t.startsWith("---")||/^\w[\w\s]*:/.test(t)||t.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:Ce.string().default("").refine(e=>!e||/^[1-5]\d{2}$/.test(e),{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"),...cG.shape},$Qe=Ce.object({codeReuse:Ce.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:Ce.boolean().default(!1).describe("Whether to modularize the code")}),TQe=[mi.INTEGRATION,mi.CONTRACT,mi.UI];var Wy;(function(e){e.Bug="bug",e.Lint="lint",e.Type="type",e.Config="config"})(Wy||(Wy={}));var Yy;(function(e){e.NotMapped="not-mapped",e.DemotedByVerify="demoted-by-verify"})(Yy||(Yy={}));var Zy;(function(e){e.Passed="passed",e.Failed="failed",e.SkippedNoPom="skipped-no-pom"})(Zy||(Zy={}));var IR;(function(e){e.Passed="passed",e.Failed="failed",e.NoUtilsFile="no-utils-file"})(IR||(IR={}));On();var Ky=e=>`${e} POM call${e===1?"":"s"}`,uG=(e,t)=>e===1?`1 ${t} test`:`${e} ${t} tests`,Xy={listSeparator:", ",testRecommendationsImplementedHeader:(e,t)=>`\u{1F4A1} Test Recommendations Implemented (${e} test${e===1?"":"s"}${t>e?`, ${t} cases`:""})`,testTypeCellLabels:{},statusLabels:{},severityLabels:{},reuse:{label:"POM reuse",noPomLayer:"skipped \u2014 no page-object layer detected for this test",reusedAndVerified:e=>`${Ky(e)} reused and verified`,reusedThenVerified:(e,t)=>`${Ky(e)} reused, ${t} of them verified`,reused:e=>`${Ky(e)} reused`,verified:e=>`${Ky(e)} verified`,unresolved:e=>`${e} not resolvable to POM source (informational, not declines)`,candidates:e=>`${e} candidate POM file${e===1?"":"s"} detected`,verificationPassed:"verification passed",verificationFailed:"\u26A0\uFE0F verification did not pass",keptInline:e=>`kept inline: ${e}`,gate:{"not-mapped":"not mapped","demoted-by-verify":"demoted by verification"}},testMaintenanceHeader:e=>`\u2705 Test Maintenance (${e})`,maintenanceTableHeader:"| Test Type | Endpoint | File | Change | Before | After |",testResultsHeader:e=>`\u{1F9EA} Test Results (${e})`,columnVideo:"Video",videoDownloadLink:e=>`[\u{1F4F9} download](${e})`,videosArtifactFallback:e=>`\u{1F4F9} Recorded UI test videos: [download from run artifacts](${e})`,issuesFoundHeader:e=>`\u26A0\uFE0F Issues Found (${e})`,configErrorsHeader:"\u2699\uFE0F Configuration Errors",nextStepsHeader:"### \u{1F4A1} Next Steps",caveatsHeader:"### \u26A0\uFE0F What this run could not prove",rows:{passed:e=>e?"passed against the running app":"passed",notRun:e=>e?"not run against a live app this run":"not run this run",failedBug:e=>e?"failed against the running app":"failed",failedTest:e=>`failed \u2014 the test is at fault, not the app (${e})`,executedOf:(e,t)=>t?` and executed ${e} of them against the running app.`:` and executed ${e} of them.`,noneExecuted:e=>e?"; none were executed against a live app this run.":"; none were executed this run.",staleResult:"From a run before this file's last change, not of the delivered test:"},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.",missingSecret:e=>`The app could not be started this run: it needs ${e}, which this run had no value for. 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.",findingsNotVerified:e=>`No test result confirms or refutes the suspected defects at ${e}.`,failedAlone:e=>`These tests passed in the session but failed when Testbot ran them alone, so their results are not final: ${e}.`,missingCaseResults:(e,t)=>{let n=t?` Latest run: ${t}`:"";return`No final result was recorded for written cases: ${e}.${n}`},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:e=>`${e} was mocked rather than really deployed \u2014 a green run against it is not proof.`,finalizeNotReady:e=>`The tests are not ready to merge as they stand${e?`: ${e}`:"."}`,ciNotCovered:"No CI workflow runs these tests, so they will not execute on future pull requests.",ciNotCoveredBecause:e=>`The repo's CI will not run some of these tests on future pull requests: ${e}`,guardedEntryCi:(e,t)=>`${e} is Testbot's guarded entry for the Test Environment: CI runs it with \`node --test ${e}\` from a package that declares @skyramp/testbot-core ${t}. It makes no request to Testbot, so its CI job needs no \`id-token: write\` permission and no TESTBOT_POLICY_ORIGIN.`,ciUnconfirmed:e=>`Testbot could not confirm that the repo's CI collects ${e}: check that CI runs them.`,ciUnconfirmedAbsent:e=>`Testbot could not confirm that the repo's CI leaves out ${e}, which need services it does not start: check that CI does not run them.`,ciNotIntegrated:e=>`Not yet CI-integrated: ${e} need services the repo's CI does not start, so Testbot put them where CI does not run them. The CI notes say what to change to run them in CI.`,ciUnprovisioned:e=>`The repo's CI runs ${e} without starting what they need, so CI will fail on them until it starts those services.`,ciWithheld:e=>`Not in the tests PR: the repo's CI would run ${e} without starting what they need, which would fail CI. The CI notes say what to change to run them.`,ciResultsUnread:e=>`Testbot could not read the CI results of ${e}, so no CI result there counted as evidence.`,browserSuiteReadOnly:(e,t)=>`${e} has a browser suite, but this run could not write there, so its ui tests are in ${t}.`,sutNotRequired:"No app was started: validation triage found no deployed behavior this change needs validated.",lintNotCovered:e=>`The repo's linter does not check ${e} \u2014 a style or type issue there would not be caught automatically.`,lintNotRun:e=>`The repo's linter did not check the test files, so they were delivered unlinted: ${e}.`,analysisUnverified:e=>`Part of the change analysis could not be verified (${e} unresolved check${e===1?"":"s"}); the tests were planned treating those claims as unconfirmed.`,unitTestsNotRun:e=>`Testbot could not run the unit tests it selected, so no unit result here is its own re-run: ${e}`,componentsNotTested:e=>`Not tested: changed parts of the code the plan did not test. ${e}`,componentsWithoutReason:e=>`The plan gave no reason for leaving out: ${e}.`,targetNotesDeviation:e=>`Tests were not put where the Target notes say tests go: ${e}`,appRestarted:e=>`The app stopped answering during the run, and Testbot started it again with its recorded setup before running tests alone: ${e}`,testSettingsDiffer:e=>`Verified under other settings than the repository's own test command uses, so the repository's build may treat these tests differently: ${e}.`,stageSalvaged:(e,t)=>t.length===1?`The ${e} step kept what it had produced although its ${t[0]} check still failed after a repair, so treat that output as unconfirmed by it.`:`The ${e} step kept what it had produced although ${t.length} of its checks (${t.join(", ")}) still failed after a repair, so treat that output as unconfirmed by them.`,downstreamNotChecked:e=>`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. ${e}`,browserBuildNotDeclared:(e,t,n)=>`Another browser build stood in for ${t}, the build the Playwright in ${e} declares (it links to another build), so its browser tests' results here may not match its CI. Its CI needs \`${n}\` there.`,resultsNotOfDeliveredTests:e=>`These test files were changed after their last run, so their results here are from an earlier version, not the delivered tests: ${e}.`,videoMissing:e=>`No video was recorded for these browser tests, so their results here have no video to watch: ${e}.`,testsCouldNotRunHere:(e,t)=>`${e} ${e===1?"test exists":"tests exist"} in this change, but this environment could not run ${e===1?"it":"them"}, so ${e===1?"it has":"they have"} no result here (not skipped): ${t}`,modelProviderDenied:(e,t=!1)=>t?`${e}, the model provider, refused a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${e}, 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.`,stageInterruptedByProvider:(e,t)=>`${t}, the model provider, interrupted the ${e} step. Testbot kept what that step had produced.`,planInterruptedByProvider:(e,t)=>`${e}, the model provider, interrupted planning. Testbot kept the plan it had and reports the test results it obtained.`+(t?" Please try again later.":""),modelProviderUnavailable:(e,t=!1)=>t?`${e}, the model provider, was unavailable for a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${e}, 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.`,dataSafetyBrowserClean:"This run used a shared environment. Testbot's browser ran under a data-safety guard, which let it change only the records it created and deleted them afterwards.",dataSafetyNoBrowser:"This run used a shared environment. Testbot did not use its browser.",dataSafetyInvalidConfig:"The shared environment's data-safety configuration is invalid: see the gaps.",dataSafetyGuardCheckFailed:"Testbot could not verify the browser data-safety guard: see the gaps.",dataSafetyGuardUnconfirmed:"This run used a shared environment. Testbot used its browser, but the data-safety guard could not be confirmed active: see the gaps.",dataSafetyBrowserLeftovers:"This run used a shared environment. Testbot's browser ran under a data-safety guard, which let it change only the records it created, but not every record it created was deleted: see the gaps.",dataSafetyBrowserWithheld:"This run used a shared environment. Testbot did not use its browser: the Skyramp MCP server has no data-safety guard.",dataSafetyGuardUnavailable:"No data-safety guard could be loaded, so Testbot's proxy refused every request to the shared environment from probes, tests and other commands, and Testbot ran no test against it.",dataSafetyPlanOnly:"This run produced a plan for a shared environment. No runtime probes or tests were requested.",dataSafetyOffLimitsRulesOnly:"Off-limits requests from probes and executed tests are restricted by instruction only. Testbot does not enforce those requests.",dataSafetyAuthCreates:e=>`The agent's browser sent sign-in or sign-up requests: ${e}. The data-safety guard lets these through and does not delete what they create, for example a new account.`,dataSafetyProxyOffLimitsRulesOnly:"Off-limits requests from the unguarded clients listed above are restricted by instruction only. Testbot does not enforce those requests.",dataSafetyRulesOnly:"For probes and tests outside the guarded browser, cleanup is required by instruction only.",dataSafetyProxy:(e,t)=>`The ${e} went through Testbot's data-safety proxy. Not guarded, and held to deleting what they create by instruction only: ${t}.`,dataSafetyIsolationEnforced:()=>"Probe and test commands could reach the shared environment only through Testbot's data-safety guard.",playwrightNotRouted:(e,t)=>`Testbot sends Playwright's API request client (the request fixture, page.request and request.newContext) through its data-safety guard only for Playwright ${t}. This checkout has Playwright ${e}, so those requests could not reach the shared environment.`,dataSafetyIsolationRefused:"Some checks could not run with the shared-environment protection in place. Testbot did not run them without it.",dataSafetyProxyAuthCreates:e=>`The plan probes or the tests sent sign-in or sign-up requests: ${e}. The data-safety proxy lets these through and does not track what they create, for example a new account.`,dataSafetyNoClientCertificate:(e,t)=>`${e} refused a request through Testbot's data-safety proxy with a Cloudflare challenge or at the TLS handshake. The proxy may be the cause, not the certificate: it ends TLS itself, it sent no client certificate to that host, and it sends one only when ${t} names the host.`,dataSafetyGuardedProbes:"plan probes",dataSafetyGuardedTests:"test runs",dataSafetyAnd:" and ",dataSafetyCleanupConfirmed:"Testbot ran each test's declared cleanup, and each succeeded.",dataSafetyLeftRecords:e=>`These tests declare records they cannot delete from the shared environment: ${e}.`,dataSafetyCleanupFailed:e=>`The cleanup of ${e} failed: what they created may still be in the shared environment.`,dataSafetyCleanupUnknown:e=>`The cleanup of ${e} is not known: Testbot did not check their cleanup.`,dataSafetyKeptRecords:(e,t)=>`The tests kept these records in the shared environment under the permission to keep test data (environment ${e}, policy revision ${t})`},isolationReport:{rationale:"Testbot could not run this validation inside the shared-environment isolation it requires, so it did not validate the change.",gap:e=>`Shared-environment isolation unavailable: ${e}`,nextStep:"Fix what the gap names, then run the validation again.",nextStepPackageSource:"Run the validation again later, when the Ubuntu package source is available again. Nothing on this host or in the repository needs a change."},nextSteps:{componentMismatch:(e,t,n,s)=>`${e} (${t}) in the Test Environment runs ${n}, which does not contain ${s}, the commit this run validates.`,componentUnverified:(e,t,n,s)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${s}, the commit this run validates: it reports ${n}.`,componentUnread:(e,t,n)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${n}, the commit this run validates: it has no record of which commit that component runs.`,deployCommit:(e,t)=>`Deploy ${t} of ${e} to the Test Environment and run Testbot again: until it runs that commit, tests there do not validate this change.`,addSecret:(e,t)=>`Add ${t?"a secret":"secrets"} named ${e} on the workflow host, as a GitHub Actions secret or, on Azure DevOps, a secret variable in the host repository's skyramp-testbot variable group under Pipelines \u203A Library. Then add ${t?"it":"them"} under Credentials on the Target's Setup page, and run Testbot again: a run's workflow passes Testbot only the Target's credentials, each from the workflow host's secret it is mapped to, and the app cannot start without ${t?"it":"them"}. Testbot does not make up a value.`},providerOutageHeadline:(e,t)=>`Testbot could not reach ${e} \u2014 it tried ${t} times without success.`,providerOutageActionStatusPage:e=>`Check ${e}. Once the service is healthy, re-run this workflow from its run page in the Actions tab.`,providerRateLimitHeadline:e=>`Testbot was rate-limited by ${e} (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:e=>`The account behind ${e} 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:e=>`The credential Testbot uses to reach ${e} 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:e=>`Testbot ran past its ${e}-minute time limit and was stopped.`,providerTimeoutAction:"Raise the `testbotTimeout` input on the workflow if runs on this repository legitimately need longer.",staged:{testsSourcePullRequest:e=>`Tests for source pull request ${e}`,validatedTogether:e=>`Pull requests validated together: ${e}`,requestedByPerson:e=>`Requested by ${e}`,requestedByPolicy:e=>`Started by the Validation Policy ${e}`,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:e=>`> \u26A0\uFE0F **No live app (SUT) was available this run** \u2014 the ${e} 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:(e,t,n)=>`**${e}**: ${t} unit test${t===1?"":"s"}${n?` for ${n}`:""}`,addedToExistingFile:"added to an existing test file",testPackagesHeader:"### \u{1F4E6} Running these tests",testPackageLine:(e,t,n="")=>`\`${e}/\` is a self-contained test package Skyramp Testbot owns and maintains, with its own manifest, lockfile and runner config.${n?` This run added it, with ${n}, installed in that package only.`:""} Run it with \`${t}\` while the app is running; to run it on every pull request, add that command to a CI job that has the app running.`,appManifestsUntouched:"The application's own manifests and lockfiles were not changed.",dependencyChangesHeader:"### \u{1F4E6} Changes to the application's dependencies",dependencyChangeLine:(e,t,n)=>`Added \`${e}\` to \`${t}\` (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:(e,t)=>`Trusted CI check ${e} passed${t?` on ${t}`:""}, 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:(e,t,n)=>`${e}/${t} passed${n?`, ${n} skipped`:""}`,behaviourCoverageHeader:"\u{1F517} Behaviour Coverage",coverageCaption:(e,t,n,s)=>` (${e} generated \xB7 ${t} modified \xB7 ${n} verified \xB7 ${s} executed)`,coverageTableHeader:"| Behaviour | Source | Tested By | Maintained By |",writtenNotRun:"written, not run",issuesFoundHeader:"\u26A0\uFE0F Issues Found",requirementsHeader:(e,t)=>`\u{1F4CB} Requirements (${e}/${t} clauses pass)`,requirementsTableHeader:"| Requirement | Clause | Tests | Result |",requirementsSummaryTableHeader:"| Requirement | Clauses passing | Not passing |",clauseStatuses:{},regressionGuard:" (regression guard)",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:e=>e?`${e} hook`:"commit hook",commitRefusedByHook:(e,t)=>`Your repository's ${e} rejected the generated-test commit, so no Testbot PR was created. Hook error: \`${t}\`.`,commitHookCouldNotRun:(e,t)=>`Your repository's ${e} could not run, so no Testbot PR was created: a command it calls is not installed on the runner. Hook error: \`${t}\`.`,maintenanceActions:{},stoppedEarly:(e,t)=>`> \u26A0\uFE0F Run stopped early \u2014 ${e}. The results below are partial.${t}`,viewInSkyramp:e=>` [View in Skyramp](${e})`,testsPr:{summaryHeader:"### Summary",targets:"The tests target:",moreItems:e=>`and ${e} more`,counts:(e,t)=>`${uG(e,"new")} and ${uG(t,"maintained")}.`,types:e=>`Test types: ${e}.`,statusHeader:"### Validation status",noChange:"\u2139\uFE0F Nothing changed since the baseline.",noTestRan:"No test ran, and no existing evidence was accepted.",noLiveApp:"No live app (SUT) was available, so the tests were not run.",resultCounts:(e,t,n)=>`Test results: ${e} passed, ${t} failed, ${n} not run.`,limitations:"Important failures and limitations:",verdict:e=>`The run's verdict is in [Run details](${e}).`,runningHeader:"### Running the tests",environment:e=>`The tests read these environment variables, which the job that runs them must set: ${e}.`,filesChanged:"Review each test in the **Files changed** tab."},descriptionCut:(e,t,n)=>`_\u2026 The rest is left out${t===void 0?", with more test results":t?`, with ${t} more test result${t===1?"":"s"}`:""}: Azure DevOps takes at most ${e} characters.${n?` [Full report](${n})`:""}_`,testsReplaced:(e,t,n)=>[t?`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${e}), commit \`${t}\`.`:`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${e}).`,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:e=>`Unable to contact the mothership ${e}. Please try again later.`,couldNotStart:e=>`Skyramp Testbot could not start: ${e}`,assembledAfterFailedChecks:e=>`> \u26A0\uFE0F This report was assembled automatically after the write-up step failed its checks; ${e} check(s) remain unmet \u2014 see the run log for details.`,testbotPrLine:(e,t,n)=>`Testbot PR${e?` (${e})`:""} : [${t}](${n})`,viewRun:e=>`_[View run](${e})_`,testsPrNotOpened:(e,t)=>`The tests PR could not be opened (${e}); the tests were pushed to branch \`${t}\`.`,testsNotDelivered:e=>`The tests could not be delivered: ${e}`,testsPinnedNotDelivered:(e,t,n)=>`${e}: ${t} ${t===1?"test":"tests"} written, ${n} maintained. The repository is pinned to a commit, so these changes were not delivered.`,testsNotPushed:(e,t)=>`The tests could not be pushed (${e}); they remain on the local branch \`${t}\`.`,testsPrRetargeted:e=>`The dev PR merged while tests were being generated \u2014 the tests PR targets its base branch${e?` (\`${e}\`)`:""} instead.`,testsPrUnchanged:"This push required no new test changes; the tests PR below is from an earlier run and was left as is.",committedNoPr:e=>`The tests were committed but no PR was opened: ${e}.`,testsHeldBack:(e,t,n,s)=>`${e?"Delivery partial":"Delivery failed: no tests were delivered"}. These test files need a pull request that is not on ${t} yet, so they were held back: ${n}. Their changes are in the run artifact's ${s}.`,testsNotProposed:e=>`The tests were not proposed in a pull request: ${e}.`}};var lG={testRecommendationsImplementedHeader:(e,t)=>`\u{1F4A1} \u5B9F\u88C5\u3057\u305F\u30C6\u30B9\u30C8\u63A8\u5968\uFF08\u30C6\u30B9\u30C8 ${e}\u4EF6${t>e?`\u3001\u30B1\u30FC\u30B9 ${t}\u4EF6`:""}\uFF09`,listSeparator:"\u3001",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:e=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u518D\u5229\u7528\u30FB\u691C\u8A3C\u6E08\u307F`,reusedThenVerified:(e,t)=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u518D\u5229\u7528\uFF08\u3046\u3061 ${t} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F\uFF09`,reused:e=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u518D\u5229\u7528`,verified:e=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F`,unresolved:e=>`${e} \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:e=>`\u5019\u88DC\u3068\u306A\u308B POM \u30D5\u30A1\u30A4\u30EB ${e} \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:e=>`\u30A4\u30F3\u30E9\u30A4\u30F3\u306E\u307E\u307E: ${e}`,gate:{"not-mapped":"\u30DE\u30C3\u30D4\u30F3\u30B0\u5BFE\u8C61\u5916","demoted-by-verify":"\u691C\u8A3C\u3067\u5DEE\u3057\u623B\u3057"}},testMaintenanceHeader:e=>`\u2705 \u30C6\u30B9\u30C8\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\uFF08${e}\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:e=>`\u{1F9EA} \u30C6\u30B9\u30C8\u7D50\u679C\uFF08${e}\u4EF6\uFF09`,columnVideo:"\u30D3\u30C7\u30AA",videoDownloadLink:e=>`[\u{1F4F9} \u30C0\u30A6\u30F3\u30ED\u30FC\u30C9](${e})`,videosArtifactFallback:e=>`\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](${e})`,issuesFoundHeader:e=>`\u26A0\uFE0F \u691C\u51FA\u3055\u308C\u305F\u554F\u984C\uFF08${e}\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:e=>e?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u6210\u529F\u3057\u307E\u3057\u305F":"\u6210\u529F\u3057\u307E\u3057\u305F",notRun:e=>e?"\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:e=>e?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5931\u6557\u3057\u307E\u3057\u305F":"\u5931\u6557\u3057\u307E\u3057\u305F",failedTest:e=>`\u5931\u6557\u3057\u307E\u3057\u305F \u2014 \u30A2\u30D7\u30EA\u3067\u306F\u306A\u304F\u30C6\u30B9\u30C8\u306B\u554F\u984C\u304C\u3042\u308A\u307E\u3059\uFF08${e}\uFF09`,executedOf:(e,t)=>t?`\u3001\u305D\u306E\u3046\u3061 ${e} \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 ${e} \u4EF6\u3092\u5B9F\u884C\u3057\u307E\u3057\u305F\u3002`,noneExecuted:e=>e?"\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",staleResult:"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u6700\u5F8C\u306E\u5909\u66F4\u3088\u308A\u524D\u306E\u5B9F\u884C\u306E\u7D50\u679C\u3067\u3001\u63D0\u51FA\u3057\u305F\u30C6\u30B9\u30C8\u306E\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093:"},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",missingSecret:e=>`\u3053\u306E\u5B9F\u884C\u3067\u306F\u30A2\u30D7\u30EA\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u8D77\u52D5\u306B\u306F ${e} \u304C\u5FC5\u8981\u3067\u3059\u304C\u3001\u3053\u306E\u5B9F\u884C\u306B\u306F\u5024\u304C\u3042\u308A\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",findingsNotVerified:e=>`\u6B21\u306E\u7B87\u6240\u306E\u7591\u308F\u3057\u3044\u6B20\u9665\u3092\u78BA\u8A8D\u307E\u305F\u306F\u5426\u5B9A\u3059\u308B\u30C6\u30B9\u30C8\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093: ${e}\u3002`,failedAlone:e=>`\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306F\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306F\u6210\u529F\u3057\u307E\u3057\u305F\u304C\u3001Testbot \u304C\u5358\u72EC\u3067\u5B9F\u884C\u3059\u308B\u3068\u5931\u6557\u3057\u305F\u305F\u3081\u3001\u7D50\u679C\u306F\u78BA\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093: ${e}\u3002`,missingCaseResults:(e,t)=>{let n=t?` \u6700\u65B0\u306E\u5B9F\u884C: ${t}`:"";return`\u4F5C\u6210\u3057\u305F\u30B1\u30FC\u30B9\u306E\u6700\u7D42\u7D50\u679C\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: ${e}\u3002${n}`},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:e=>`${e} \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:e=>`\u30C6\u30B9\u30C8\u306F\u73FE\u72B6\u3067\u306F\u30DE\u30FC\u30B8\u53EF\u80FD\u306A\u72B6\u614B\u3067\u306F\u3042\u308A\u307E\u305B\u3093${e?`: ${e}`:"\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:e=>`\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: ${e}`,guardedEntryCi:(e,t)=>`${e} \u306F Test Environment \u5411\u3051\u306E Testbot \u306E\u30AC\u30FC\u30C9\u4ED8\u304D\u30A8\u30F3\u30C8\u30EA\u3067\u3059\u3002CI \u3067\u306F @skyramp/testbot-core ${t} \u3092\u5BA3\u8A00\u3057\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u304B\u3089 \`node --test ${e}\` \u3067\u5B9F\u884C\u3057\u307E\u3059\u3002Testbot \u3078\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u884C\u308F\u306A\u3044\u305F\u3081\u3001\u305D\u306E CI \u30B8\u30E7\u30D6\u306B \`id-token: write\` \u6A29\u9650\u3068 TESTBOT_POLICY_ORIGIN \u306F\u4E0D\u8981\u3067\u3059\u3002`,ciUnconfirmedAbsent:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u304C ${e} \u3092\u5B9F\u884C\u3057\u306A\u3044\u3053\u3068\u3092 Testbot \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3053\u308C\u3089\u306F CI \u304C\u8D77\u52D5\u3057\u306A\u3044\u30B5\u30FC\u30D3\u30B9\u3092\u5FC5\u8981\u3068\u3057\u307E\u3059\u3002CI \u3067\u5B9F\u884C\u3055\u308C\u306A\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,ciUnconfirmed:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u304C ${e} \u3092\u53CE\u96C6\u3059\u308B\u3053\u3068\u3092 Testbot \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002CI \u3067\u5B9F\u884C\u3055\u308C\u308B\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,ciNotIntegrated:e=>`CI \u672A\u7D71\u5408: ${e} \u306F\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u304C\u8D77\u52D5\u3057\u306A\u3044\u30B5\u30FC\u30D3\u30B9\u3092\u5FC5\u8981\u3068\u3059\u308B\u305F\u3081\u3001Testbot \u306F CI \u304C\u5B9F\u884C\u3057\u306A\u3044\u5834\u6240\u306B\u914D\u7F6E\u3057\u307E\u3057\u305F\u3002CI \u3067\u5B9F\u884C\u3059\u308B\u305F\u3081\u306E\u5909\u66F4\u306F CI \u30CE\u30FC\u30C8\u306B\u8A18\u8F09\u3057\u3066\u3044\u307E\u3059\u3002`,ciWithheld:e=>`\u30C6\u30B9\u30C8 PR \u306B\u542B\u3081\u3066\u3044\u307E\u305B\u3093: \u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u306F ${e} \u3092\u5FC5\u8981\u306A\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u305B\u305A\u306B\u5B9F\u884C\u3059\u308B\u305F\u3081\u3001CI \u304C\u5931\u6557\u3057\u307E\u3059\u3002CI \u3067\u5B9F\u884C\u3059\u308B\u305F\u3081\u306E\u5909\u66F4\u306F CI \u30CE\u30FC\u30C8\u306B\u8A18\u8F09\u3057\u3066\u3044\u307E\u3059\u3002`,ciUnprovisioned:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u306F ${e} \u3092\u5FC5\u8981\u306A\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u305B\u305A\u306B\u5B9F\u884C\u3059\u308B\u305F\u3081\u3001\u305D\u308C\u3089\u306E\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u3059\u308B\u307E\u3067 CI \u306F\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u3067\u5931\u6557\u3057\u307E\u3059\u3002`,ciResultsUnread:e=>`Testbot \u306F ${e} \u306E CI \u7D50\u679C\u3092\u8AAD\u307F\u53D6\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u305D\u3053\u3067\u306E CI \u7D50\u679C\u306F\u8A3C\u62E0\u3068\u3057\u3066\u6271\u308F\u308C\u3066\u3044\u307E\u305B\u3093\u3002`,browserSuiteReadOnly:(e,t)=>`${e} \u306B\u306F\u30D6\u30E9\u30A6\u30B6\u30C6\u30B9\u30C8\u30B9\u30A4\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u306E\u5B9F\u884C\u3067\u306F\u66F8\u304D\u8FBC\u3081\u306A\u3044\u305F\u3081\u3001UI \u30C6\u30B9\u30C8\u306F ${t} \u306B\u3042\u308A\u307E\u3059\u3002`,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:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30EA\u30F3\u30BF\u30FC\u306F ${e} \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`,lintNotRun:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30EA\u30F3\u30BF\u30FC\u306F\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30EA\u30F3\u30BF\u30FC\u3092\u901A\u3055\u305A\u306B\u63D0\u51FA\u3057\u307E\u3057\u305F: ${e}\u3002`,analysisUnverified:e=>`\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 ${e} \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:e=>`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: ${e}`,componentsNotTested:e=>`\u672A\u30C6\u30B9\u30C8: \u8A08\u753B\u304C\u30C6\u30B9\u30C8\u5BFE\u8C61\u306B\u3057\u306A\u304B\u3063\u305F\u3001\u5909\u66F4\u3055\u308C\u305F\u30B3\u30FC\u30C9\u306E\u90E8\u5206\u3067\u3059\u3002${e}`,componentsWithoutReason:e=>`\u8A08\u753B\u304C\u7406\u7531\u3092\u793A\u3055\u305A\u306B\u9664\u5916\u3057\u305F\u90E8\u5206: ${e}\u3002`,targetNotesDeviation:e=>`Target \u306E\u30E1\u30E2\u304C\u6307\u5B9A\u3059\u308B\u5834\u6240\u306B\u30C6\u30B9\u30C8\u3092\u7F6E\u3044\u3066\u3044\u307E\u305B\u3093: ${e}`,appRestarted:e=>`\u5B9F\u884C\u4E2D\u306B\u30A2\u30D7\u30EA\u304C\u5FDC\u7B54\u3057\u306A\u304F\u306A\u3063\u305F\u305F\u3081\u3001Testbot \u306F\u30C6\u30B9\u30C8\u3092\u5358\u72EC\u3067\u5B9F\u884C\u3059\u308B\u524D\u306B\u3001\u8A18\u9332\u3055\u308C\u305F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3067\u30A2\u30D7\u30EA\u3092\u518D\u8D77\u52D5\u3057\u307E\u3057\u305F: ${e}`,testSettingsDiffer:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u81EA\u8EAB\u306E\u30C6\u30B9\u30C8\u30B3\u30DE\u30F3\u30C9\u3068\u306F\u7570\u306A\u308B\u8A2D\u5B9A\u3067\u691C\u8A3C\u3057\u305F\u305F\u3081\u3001\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30D3\u30EB\u30C9\u3067\u306F\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306E\u6271\u3044\u304C\u5909\u308F\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059: ${e}\u3002`,stageSalvaged:(e,t)=>t.length===1?`${e} \u30B9\u30C6\u30C3\u30D7\u306F\u3001\u4FEE\u6B63\u5F8C\u3082 ${t[0]} \u306E\u30C1\u30A7\u30C3\u30AF\u306B\u901A\u3089\u306A\u304B\u3063\u305F\u3082\u306E\u306E\u3001\u4F5C\u6210\u3057\u305F\u51FA\u529B\u3092\u6B8B\u3057\u307E\u3057\u305F\u3002\u305D\u306E\u51FA\u529B\u306F\u3053\u306E\u30C1\u30A7\u30C3\u30AF\u3067\u78BA\u8A8D\u3055\u308C\u3066\u3044\u306A\u3044\u3082\u306E\u3068\u3057\u3066\u6271\u3063\u3066\u304F\u3060\u3055\u3044\u3002`:`${e} \u30B9\u30C6\u30C3\u30D7\u306F\u3001\u4FEE\u6B63\u5F8C\u3082 ${t.length} \u4EF6\u306E\u30C1\u30A7\u30C3\u30AF\uFF08${t.join("\u3001")}\uFF09\u306B\u901A\u3089\u306A\u304B\u3063\u305F\u3082\u306E\u306E\u3001\u4F5C\u6210\u3057\u305F\u51FA\u529B\u3092\u6B8B\u3057\u307E\u3057\u305F\u3002\u305D\u306E\u51FA\u529B\u306F\u3053\u308C\u3089\u306E\u30C1\u30A7\u30C3\u30AF\u3067\u78BA\u8A8D\u3055\u308C\u3066\u3044\u306A\u3044\u3082\u306E\u3068\u3057\u3066\u6271\u3063\u3066\u304F\u3060\u3055\u3044\u3002`,downstreamNotChecked:e=>`\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${e}`,browserBuildNotDeclared:(e,t,n)=>`${e} \u306E Playwright \u304C\u6307\u5B9A\u3059\u308B\u30D6\u30E9\u30A6\u30B6\u306E\u30D3\u30EB\u30C9 ${t} \u306E\u4EE3\u308F\u308A\u306B\u3001\u5225\u306E\u30D3\u30EB\u30C9\u304C\u4F7F\u308F\u308C\u3066\u3044\u307E\u3057\u305F\uFF08\u5225\u306E\u30D3\u30EB\u30C9\u3078\u306E\u30EA\u30F3\u30AF\u306B\u306A\u3063\u3066\u3044\u307E\u3059\uFF09\u3002\u305D\u306E\u305F\u3081\u3001\u3053\u3053\u3067\u306E\u30D6\u30E9\u30A6\u30B6\u30C6\u30B9\u30C8\u306E\u7D50\u679C\u306F CI \u306E\u7D50\u679C\u3068\u4E00\u81F4\u3057\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002CI \u3067\u306F\u305D\u3053\u3067 \`${n}\` \u304C\u5FC5\u8981\u3067\u3059\u3002`,resultsNotOfDeliveredTests:e=>`\u6B21\u306E\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F\u6700\u5F8C\u306E\u5B9F\u884C\u306E\u5F8C\u306B\u5909\u66F4\u3055\u308C\u305F\u305F\u3081\u3001\u3053\u3053\u3067\u306E\u7D50\u679C\u306F\u4EE5\u524D\u306E\u7248\u306E\u3082\u306E\u3067\u3001\u63D0\u51FA\u3057\u305F\u30C6\u30B9\u30C8\u306E\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093: ${e}\u3002`,videoMissing:e=>`\u6B21\u306E\u30D6\u30E9\u30A6\u30B6\u30C6\u30B9\u30C8\u306F\u52D5\u753B\u304C\u8A18\u9332\u3055\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u3053\u3067\u306E\u7D50\u679C\u306B\u306F\u78BA\u8A8D\u3067\u304D\u308B\u52D5\u753B\u304C\u3042\u308A\u307E\u305B\u3093: ${e}\u3002`,testsCouldNotRunHere:(e,t)=>`\u3053\u306E\u5909\u66F4\u306B\u306F ${e} \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: ${t}`,modelProviderDenied:(e,t=!1)=>t?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${e} \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 ${e} \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`,stageInterruptedByProvider:(e,t)=>`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u306B\u3088\u308A ${e} \u306E\u6BB5\u968E\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F\u3002Testbot \u306F\u305D\u306E\u6BB5\u968E\u3067\u4F5C\u6210\u6E08\u307F\u306E\u5185\u5BB9\u3092\u6B8B\u3057\u307E\u3057\u305F\u3002`,planInterruptedByProvider:(e,t)=>`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${e} \u306B\u3088\u308A\u8A08\u753B\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F\u3002Testbot \u306F\u4F5C\u6210\u6E08\u307F\u306E\u8A08\u753B\u3092\u6B8B\u3057\u3001\u5F97\u3089\u308C\u305F\u30C6\u30B9\u30C8\u7D50\u679C\u3092\u5831\u544A\u3057\u307E\u3059\u3002`+(t?"\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002":""),modelProviderUnavailable:(e,t=!1)=>t?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${e} \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 ${e} \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`,dataSafetyBrowserClean:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306E\u30D6\u30E9\u30A6\u30B6\u306F\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u306E\u4E0B\u3067\u52D5\u4F5C\u3057\u3001\u81EA\u5206\u304C\u4F5C\u6210\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3060\u3051\u3092\u5909\u66F4\u3057\u3001\u5F8C\u3067\u524A\u9664\u3057\u307E\u3057\u305F\u3002",dataSafetyNoBrowser:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306F\u30D6\u30E9\u30A6\u30B6\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyInvalidConfig:"\u5171\u6709\u74B0\u5883\u306E\u30C7\u30FC\u30BF\u5B89\u5168\u8A2D\u5B9A\u304C\u7121\u52B9\u3067\u3059\uFF08\u30AE\u30E3\u30C3\u30D7\u3092\u53C2\u7167\uFF09\u3002",dataSafetyGuardCheckFailed:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u30C7\u30FC\u30BF\u4FDD\u8B77\u30AC\u30FC\u30C9\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u8A73\u7D30\u306F\u4E0D\u8DB3\u4E8B\u9805\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002",dataSafetyGuardUnconfirmed:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306F\u30D6\u30E9\u30A6\u30B6\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u304C\u3001\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u304C\u6709\u52B9\u3067\u3042\u3063\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u30AE\u30E3\u30C3\u30D7\u3092\u53C2\u7167\uFF09\u3002",dataSafetyBrowserLeftovers:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306E\u30D6\u30E9\u30A6\u30B6\u306F\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u306E\u4E0B\u3067\u52D5\u4F5C\u3057\u3001\u81EA\u5206\u304C\u4F5C\u6210\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3060\u3051\u3092\u5909\u66F4\u3057\u307E\u3057\u305F\u304C\u3001\u4F5C\u6210\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u306E\u4E00\u90E8\u306F\u524A\u9664\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u30AE\u30E3\u30C3\u30D7\u3092\u53C2\u7167\uFF09\u3002",dataSafetyBrowserWithheld:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Skyramp MCP \u30B5\u30FC\u30D0\u30FC\u306B\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u304C\u306A\u3044\u305F\u3081\u3001Testbot \u306F\u30D6\u30E9\u30A6\u30B6\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyGuardUnavailable:"\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u3092\u8AAD\u307F\u8FBC\u3081\u306A\u304B\u3063\u305F\u305F\u3081\u3001Testbot \u306E\u30D7\u30ED\u30AD\u30B7\u306F\u30D7\u30ED\u30FC\u30D6\u3001\u30C6\u30B9\u30C8\u3001\u305D\u306E\u4ED6\u306E\u30B3\u30DE\u30F3\u30C9\u304B\u3089\u5171\u6709\u74B0\u5883\u3078\u306E\u3059\u3079\u3066\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u62D2\u5426\u3057\u3001Testbot \u306F\u5171\u6709\u74B0\u5883\u306B\u5BFE\u3057\u3066\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyPlanOnly:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u306E\u30C6\u30B9\u30C8\u8A08\u753B\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F\u3002\u5B9F\u884C\u6642\u30D7\u30ED\u30FC\u30D6\u3084\u30C6\u30B9\u30C8\u306F\u8981\u6C42\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyOffLimitsRulesOnly:"\u30D7\u30ED\u30FC\u30D6\u3068\u5B9F\u884C\u3059\u308B\u30C6\u30B9\u30C8\u306E\u7ACB\u5165\u7981\u6B62\u30EB\u30FC\u30C8\u3078\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u3001\u6307\u793A\u306B\u3088\u3063\u3066\u5236\u9650\u3059\u308B\u3060\u3051\u3067\u3059\u3002Testbot \u306F\u305D\u308C\u3089\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5F37\u5236\u7684\u306B\u5236\u9650\u3057\u307E\u305B\u3093\u3002",dataSafetyAuthCreates:e=>`\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u30D6\u30E9\u30A6\u30B6\u304C\u30B5\u30A4\u30F3\u30A4\u30F3\u307E\u305F\u306F\u30B5\u30A4\u30F3\u30A2\u30C3\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F: ${e}\u3002\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u306F\u3053\u308C\u3089\u3092\u901A\u904E\u3055\u305B\u3001\u4F5C\u6210\u3055\u308C\u305F\u3082\u306E\uFF08\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306A\u3069\uFF09\u306F\u524A\u9664\u3057\u307E\u305B\u3093\u3002`,dataSafetyProxyOffLimitsRulesOnly:"\u4E0A\u8A18\u306E\u30AC\u30FC\u30C9\u3055\u308C\u306A\u3044\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304B\u3089\u306E\u7ACB\u5165\u7981\u6B62\u30EB\u30FC\u30C8\u3078\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u3001\u6307\u793A\u306B\u3088\u3063\u3066\u5236\u9650\u3059\u308B\u3060\u3051\u3067\u3059\u3002Testbot \u306F\u305D\u308C\u3089\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5F37\u5236\u7684\u306B\u5236\u9650\u3057\u307E\u305B\u3093\u3002",dataSafetyRulesOnly:"\u30AC\u30FC\u30C9\u4ED8\u304D\u30D6\u30E9\u30A6\u30B6\u306E\u5916\u3067\u884C\u3046\u30D7\u30ED\u30FC\u30D6\u3068\u30C6\u30B9\u30C8\u306B\u306F\u3001\u4F5C\u6210\u3057\u305F\u30C7\u30FC\u30BF\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u6307\u793A\u3059\u308B\u3060\u3051\u3067\u3059\u3002",dataSafetyProxy:(e,t)=>`${e}\u306F Testbot \u306E\u30C7\u30FC\u30BF\u5B89\u5168\u30D7\u30ED\u30AD\u30B7\u3092\u7D4C\u7531\u3057\u307E\u3057\u305F\u3002\u30AC\u30FC\u30C9\u3055\u308C\u305A\u3001\u4F5C\u6210\u3057\u305F\u3082\u306E\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u6307\u793A\u3055\u308C\u308B\u3060\u3051\u306E\u5BFE\u8C61: ${t}\u3002`,dataSafetyIsolationEnforced:()=>"\u30D7\u30ED\u30FC\u30D6\u3068\u30C6\u30B9\u30C8\u30B3\u30DE\u30F3\u30C9\u306F\u3001Testbot \u306E\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u3092\u901A\u3057\u3066\u306E\u307F\u5171\u6709\u74B0\u5883\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u3057\u305F\u3002",playwrightNotRouted:(e,t)=>`Testbot \u304C Playwright \u306E API \u30EA\u30AF\u30A8\u30B9\u30C8\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF08request \u30D5\u30A3\u30AF\u30B9\u30C1\u30E3\u3001page.request\u3001request.newContext\uFF09\u3092\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u7D4C\u7531\u3067\u9001\u308B\u306E\u306F Playwright ${t} \u306E\u5834\u5408\u3060\u3051\u3067\u3059\u3002\u3053\u306E\u30C1\u30A7\u30C3\u30AF\u30A2\u30A6\u30C8\u306E Playwright \u306F ${e} \u306E\u305F\u3081\u3001\u305D\u308C\u3089\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u5171\u6709\u74B0\u5883\u306B\u5230\u9054\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,dataSafetyIsolationRefused:"\u4E00\u90E8\u306E\u30C1\u30A7\u30C3\u30AF\u306F\u3001\u5171\u6709\u74B0\u5883\u306E\u4FDD\u8B77\u3092\u6709\u52B9\u306B\u3057\u305F\u307E\u307E\u3067\u306F\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002Testbot \u306F\u3001\u4FDD\u8B77\u306A\u3057\u3067\u305D\u308C\u3089\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyProxyAuthCreates:e=>`\u8A08\u753B\u6642\u306E\u30D7\u30ED\u30FC\u30D6\u307E\u305F\u306F\u30C6\u30B9\u30C8\u304C\u30B5\u30A4\u30F3\u30A4\u30F3\u307E\u305F\u306F\u30B5\u30A4\u30F3\u30A2\u30C3\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F: ${e}\u3002\u30C7\u30FC\u30BF\u5B89\u5168\u30D7\u30ED\u30AD\u30B7\u306F\u3053\u308C\u3089\u3092\u901A\u904E\u3055\u305B\u3001\u4F5C\u6210\u3055\u308C\u305F\u3082\u306E\uFF08\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306A\u3069\uFF09\u306F\u8FFD\u8DE1\u3057\u307E\u305B\u3093\u3002`,dataSafetyNoClientCertificate:(e,t)=>`${e} \u306F\u3001Testbot \u306E\u30C7\u30FC\u30BF\u5B89\u5168\u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092 Cloudflare \u306E\u30C1\u30E3\u30EC\u30F3\u30B8\u307E\u305F\u306F TLS \u30CF\u30F3\u30C9\u30B7\u30A7\u30A4\u30AF\u3067\u62D2\u5426\u3057\u307E\u3057\u305F\u3002\u539F\u56E0\u306F\u8A3C\u660E\u66F8\u3067\u306F\u306A\u304F\u30D7\u30ED\u30AD\u30B7\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30D7\u30ED\u30AD\u30B7\u306F TLS \u3092\u81EA\u8EAB\u3067\u7D42\u7AEF\u3057\u3001\u3053\u306E\u30DB\u30B9\u30C8\u306B\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u8A3C\u660E\u66F8\u3092\u9001\u4FE1\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u8A3C\u660E\u66F8\u3092\u9001\u4FE1\u3059\u308B\u306E\u306F ${t} \u304C\u305D\u306E\u30DB\u30B9\u30C8\u3092\u6307\u5B9A\u3057\u3066\u3044\u308B\u5834\u5408\u3060\u3051\u3067\u3059\u3002`,dataSafetyGuardedProbes:"\u8A08\u753B\u6642\u306E\u30D7\u30ED\u30FC\u30D6",dataSafetyGuardedTests:"\u30C6\u30B9\u30C8\u306E\u5B9F\u884C",dataSafetyAnd:"\u3068",dataSafetyCleanupConfirmed:"Testbot \u306F\u5404\u30C6\u30B9\u30C8\u304C\u5BA3\u8A00\u3057\u305F\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3092\u5B9F\u884C\u3057\u3001\u3059\u3079\u3066\u6210\u529F\u3057\u307E\u3057\u305F\u3002",dataSafetyLeftRecords:e=>`\u6B21\u306E\u30C6\u30B9\u30C8\u306F\u5171\u6709\u74B0\u5883\u304B\u3089\u524A\u9664\u3067\u304D\u306A\u3044\u30EC\u30B3\u30FC\u30C9\u3092\u5BA3\u8A00\u3057\u3066\u3044\u307E\u3059: ${e}\u3002`,dataSafetyCleanupFailed:e=>`${e} \u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u306F\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4F5C\u6210\u3057\u305F\u3082\u306E\u304C\u5171\u6709\u74B0\u5883\u306B\u6B8B\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002`,dataSafetyCleanupUnknown:e=>`${e} \u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u306F\u4E0D\u660E\u3067\u3059\u3002Testbot \u306F\u305D\u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,dataSafetyKeptRecords:(e,t)=>`\u30C6\u30B9\u30C8\u306F\u3001\u30C6\u30B9\u30C8\u30C7\u30FC\u30BF\u3092\u4FDD\u6301\u3059\u308B\u6A29\u9650 (\u74B0\u5883 ${e}\u3001\u30DD\u30EA\u30B7\u30FC\u30EA\u30D3\u30B8\u30E7\u30F3 ${t}) \u306E\u3082\u3068\u3067\u3001\u6B21\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u5171\u6709\u74B0\u5883\u306B\u6B8B\u3057\u307E\u3057\u305F`},isolationReport:{rationale:"Testbot \u306F\u3001\u5FC5\u8981\u306A\u5171\u6709\u74B0\u5883\u306E\u9694\u96E2\u306E\u4E2D\u3067\u3053\u306E\u691C\u8A3C\u3092\u5B9F\u884C\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u5909\u66F4\u3092\u691C\u8A3C\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",gap:e=>`\u5171\u6709\u74B0\u5883\u306E\u9694\u96E2\u3092\u5229\u7528\u3067\u304D\u307E\u305B\u3093: ${e}`,nextStep:"\u30AE\u30E3\u30C3\u30D7\u306B\u8A18\u8F09\u3055\u308C\u305F\u554F\u984C\u3092\u89E3\u6D88\u3057\u3066\u304B\u3089\u3001\u691C\u8A3C\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",nextStepPackageSource:"Ubuntu \u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u914D\u5E03\u5143\u304C\u518D\u3073\u5229\u7528\u53EF\u80FD\u306B\u306A\u3063\u3066\u304B\u3089\u3001\u691C\u8A3C\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u30DB\u30B9\u30C8\u3084\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002"},nextSteps:{componentMismatch:(e,t,n,s)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u306F ${n} \u3092\u5B9F\u884C\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${s} \u3092\u542B\u3093\u3067\u3044\u307E\u305B\u3093\u3002`,componentUnverified:(e,t,n,s)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u304C\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${s} \u3092\u5B9F\u884C\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u5831\u544A\u3055\u308C\u305F\u30B3\u30DF\u30C3\u30C8: ${n}\u3002`,componentUnread:(e,t,n)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u304C\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${n} \u3092\u5B9F\u884C\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3053\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u5B9F\u884C\u3057\u3066\u3044\u308B\u30B3\u30DF\u30C3\u30C8\u306E\u8A18\u9332\u304C\u3042\u308A\u307E\u305B\u3093\u3002`,deployCommit:(e,t)=>`${e} \u306E ${t} \u3092 Test Environment \u306B\u30C7\u30D7\u30ED\u30A4\u3057\u3066\u3001Testbot \u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u305D\u306E\u30B3\u30DF\u30C3\u30C8\u304C\u5B9F\u884C\u3055\u308C\u308B\u307E\u3067\u3001\u305D\u3053\u3067\u306E\u30C6\u30B9\u30C8\u306F\u3053\u306E\u5909\u66F4\u306E\u691C\u8A3C\u306B\u306A\u308A\u307E\u305B\u3093\u3002`,addSecret:(e,t)=>`\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E\u30DB\u30B9\u30C8\u306B ${e} \u3068\u3044\u3046\u540D\u524D\u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\uFF08GitHub Actions \u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u3001\u307E\u305F\u306F Azure DevOps \u3067\u306F\u30DB\u30B9\u30C8\u30EA\u30DD\u30B8\u30C8\u30EA\u306E Pipelines \u203A Library \u306B\u3042\u308B skyramp-testbot \u5909\u6570\u30B0\u30EB\u30FC\u30D7\u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u5909\u6570\uFF09\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u6B21\u306B Target \u306E Setup \u30DA\u30FC\u30B8\u306E Credentials \u306B\u8FFD\u52A0\u3057\u3001Testbot \u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u5B9F\u884C\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C Testbot \u306B\u6E21\u3059\u306E\u306F Target \u306E\u8A8D\u8A3C\u60C5\u5831\u3060\u3051\u3067\u3001\u305D\u308C\u305E\u308C\u5BFE\u5FDC\u4ED8\u3051\u3089\u308C\u305F\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E\u30DB\u30B9\u30C8\u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u6E21\u3055\u308C\u307E\u3059\u3002\u30A2\u30D7\u30EA\u306F\u3053\u308C\u306A\u3057\u3067\u306F\u8D77\u52D5\u3067\u304D\u305A\u3001Testbot \u304C\u5024\u3092\u4F5C\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093\u3002`},providerOutageHeadline:(e,t)=>`${e} \u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002Testbot \u306F ${t} \u56DE\u8A66\u884C\u3057\u307E\u3057\u305F\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002`,providerOutageActionStatusPage:e=>`${e} \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:e=>`${e} \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:e=>`${e} \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:e=>`\u5B9F\u884C\u4E2D\u306B\u3001Testbot \u304C ${e} \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:e=>`Testbot \u306F\u5236\u9650\u6642\u9593 ${e} \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:e=>`\u30BD\u30FC\u30B9\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8 ${e} \u306E\u30C6\u30B9\u30C8`,validatedTogether:e=>`\u4E00\u7DD2\u306B\u691C\u8A3C\u3057\u305F\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8: ${e}`,requestedByPerson:e=>`${e} \u3055\u3093\u306E\u4F9D\u983C\u3067\u5B9F\u884C`,requestedByPolicy:e=>`\u691C\u8A3C\u30DD\u30EA\u30B7\u30FC ${e} \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:e=>`> \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 ${e} \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:(e,t,n)=>`**${e}**: ${n?`${n} \u306E`:""}\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8 ${t} \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:(e,t,n="")=>`\`${e}/\` \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${n?`\u3053\u306E\u5B9F\u884C\u3067\u8FFD\u52A0\u3057\u305F\u3082\u306E\u3067\u3001${n} \u3092\u3053\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u306B\u306E\u307F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u3044\u307E\u3059\u3002`:""}\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u4E2D\u306B \`${t}\` \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\u30A2\u30D7\u30EA\u304C\u8D77\u52D5\u3057\u3066\u3044\u308B CI \u30B8\u30E7\u30D6\u306B\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\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:(e,t,n)=>`\`${t}\`\uFF08\u304A\u3088\u3073\u305D\u306E\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\uFF09\u306B \`${e}\` \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:(e,t)=>`\u4FE1\u983C\u6E08\u307F\u306E CI \u30C1\u30A7\u30C3\u30AF ${e} \u304C${t?` ${t} \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:(e,t,n)=>`${t} \u4EF6\u4E2D ${e} \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:(e,t,n,s)=>`\uFF08\u751F\u6210 ${e} \xB7 \u5909\u66F4 ${t} \xB7 \u691C\u8A3C ${n} \xB7 \u5B9F\u884C ${s}\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",requirementsHeader:(e,t)=>`\u{1F4CB} \u8981\u4EF6\uFF08${t} \u4EF6\u4E2D ${e} \u4EF6\u306E\u6761\u9805\u304C\u5408\u683C\uFF09`,requirementsTableHeader:"| \u8981\u4EF6 | \u6761\u9805 | \u30C6\u30B9\u30C8 | \u7D50\u679C |",requirementsSummaryTableHeader:"| \u8981\u4EF6 | \u5408\u683C\u3057\u305F\u6761\u9805 | \u5408\u683C\u3057\u3066\u3044\u306A\u3044\u6761\u9805 |",clauseStatuses:{Pass:"\u5408\u683C",Fail:"\u4E0D\u5408\u683C","Not run":"\u672A\u5B9F\u884C","Not tested":"\u672A\u30C6\u30B9\u30C8","Passed, test not kept":"\u5408\u683C\uFF08\u30C6\u30B9\u30C8\u306F\u4FDD\u6301\u305B\u305A\uFF09"},regressionGuard:"\uFF08\u56DE\u5E30\u30AC\u30FC\u30C9\uFF09",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:e=>e?`${e} \u30D5\u30C3\u30AF`:"\u30B3\u30DF\u30C3\u30C8\u30D5\u30C3\u30AF",commitRefusedByHook:(e,t)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${e}\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: \`${t}\`\u3002`,commitHookCouldNotRun:(e,t)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${e}\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: \`${t}\`\u3002`,stoppedEarly:(e,t)=>`> \u26A0\uFE0F \u5B9F\u884C\u304C\u9014\u4E2D\u3067\u505C\u6B62\u3057\u307E\u3057\u305F \u2014 ${e}\u3002\u4EE5\u4E0B\u306E\u7D50\u679C\u306F\u4E00\u90E8\u306E\u307F\u3067\u3059\u3002${t}`,viewInSkyramp:e=>` [Skyramp \u3067\u8868\u793A](${e})`,testsPr:{summaryHeader:"### \u6982\u8981",targets:"\u30C6\u30B9\u30C8\u306E\u5BFE\u8C61:",moreItems:e=>`\u307B\u304B ${e} \u4EF6`,counts:(e,t)=>`\u65B0\u898F\u30C6\u30B9\u30C8 ${e} \u4EF6\u3001\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\u3057\u305F\u30C6\u30B9\u30C8 ${t} \u4EF6\u3002`,types:e=>`\u30C6\u30B9\u30C8\u7A2E\u5225: ${e}\u3002`,statusHeader:"### \u691C\u8A3C\u30B9\u30C6\u30FC\u30BF\u30B9",noChange:"\u2139\uFE0F \u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u4EE5\u964D\u306B\u5909\u66F4\u306F\u3042\u308A\u307E\u305B\u3093\u3002",noTestRan:"\u5B9F\u884C\u3057\u305F\u30C6\u30B9\u30C8\u306F\u306A\u304F\u3001\u65E2\u5B58\u306E\u8A3C\u62E0\u3082\u63A1\u7528\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",noLiveApp:"\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\uFF08SUT\uFF09\u304C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30C6\u30B9\u30C8\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",resultCounts:(e,t,n)=>`\u30C6\u30B9\u30C8\u7D50\u679C: \u5408\u683C ${e} \u4EF6\u3001\u4E0D\u5408\u683C ${t} \u4EF6\u3001\u672A\u5B9F\u884C ${n} \u4EF6\u3002`,limitations:"\u91CD\u8981\u306A\u5931\u6557\u3068\u5236\u9650:",verdict:e=>`\u5B9F\u884C\u306E\u5224\u5B9A\u306F[\u5B9F\u884C\u306E\u8A73\u7D30](${e})\u306B\u3042\u308A\u307E\u3059\u3002`,runningHeader:"### \u30C6\u30B9\u30C8\u306E\u5B9F\u884C\u65B9\u6CD5",environment:e=>`\u30C6\u30B9\u30C8\u306F\u6B21\u306E\u74B0\u5883\u5909\u6570\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3059\u308B\u30B8\u30E7\u30D6\u3067\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044: ${e}\u3002`,filesChanged:"\u5404\u30C6\u30B9\u30C8\u306F **Files changed** \u30BF\u30D6\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},descriptionCut:(e,t,n)=>`_\u2026 \u6B8B\u308A\u306F\u7701\u7565\u3057\u307E\u3057\u305F${t===void 0?"\uFF08\u30C6\u30B9\u30C8\u7D50\u679C\u3092\u542B\u3080\uFF09":t?`\uFF08\u30C6\u30B9\u30C8\u7D50\u679C ${t} \u4EF6\u3092\u542B\u3080\uFF09`:""}\u3002Azure DevOps \u306E\u8AAC\u660E\u306F ${e} \u6587\u5B57\u307E\u3067\u3067\u3059\u3002${n?` [\u5B8C\u5168\u306A\u30EC\u30DD\u30FC\u30C8](${n})`:""}_`,testsReplaced:(e,t,n)=>[t?`Skyramp Testbot \u304C\u3053\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30C6\u30B9\u30C8\u3092[\u3053\u306E\u5B9F\u884C](${e})\u306E\u30C6\u30B9\u30C8\uFF08\u30B3\u30DF\u30C3\u30C8 \`${t}\`\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](${e})\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:e=>`Skyramp\uFF08${e}\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:e=>`Skyramp Testbot \u3092\u958B\u59CB\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${e}`,assembledAfterFailedChecks:e=>`> \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${e} \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:(e,t,n)=>`Testbot PR${e?`\uFF08${e}\uFF09`:""}: [${t}](${n})`,viewRun:e=>`_[\u5B9F\u884C\u3092\u8868\u793A](${e})_`,testsPrNotOpened:(e,t)=>`\u30C6\u30B9\u30C8 PR \u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${e}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30D6\u30E9\u30F3\u30C1 \`${t}\` \u306B\u30D7\u30C3\u30B7\u30E5\u3055\u308C\u3066\u3044\u307E\u3059\u3002`,testsNotDelivered:e=>`\u30C6\u30B9\u30C8\u3092\u914D\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${e}`,testsPinnedNotDelivered:(e,t,n)=>`${e}: ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u3092\u4F5C\u6210\u3057\u3001${n} \u4EF6\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F\u3002\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u30B3\u30DF\u30C3\u30C8\u306B\u56FA\u5B9A\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u3053\u308C\u3089\u306E\u5909\u66F4\u306F\u914D\u4FE1\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,testsNotPushed:(e,t)=>`\u30C6\u30B9\u30C8\u3092\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${e}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30ED\u30FC\u30AB\u30EB\u30D6\u30E9\u30F3\u30C1 \`${t}\` \u306B\u6B8B\u3063\u3066\u3044\u307E\u3059\u3002`,testsPrRetargeted:e=>`\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${e?`\uFF08\`${e}\`\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:e=>`\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: ${e}\u3002`,testsHeldBack:(e,t,n,s)=>`${e?"\u4E00\u90E8\u306E\u30C6\u30B9\u30C8\u306E\u307F\u63D0\u51FA\u3057\u307E\u3057\u305F":"\u30C6\u30B9\u30C8\u3092\u63D0\u51FA\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}\u3002\u6B21\u306E\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F ${t} \u306B\u307E\u3060\u306A\u3044\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5FC5\u8981\u3068\u3059\u308B\u305F\u3081\u4FDD\u7559\u3057\u307E\u3057\u305F: ${n}\u3002\u5909\u66F4\u5185\u5BB9\u306F\u5B9F\u884C\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306E ${s} \u306B\u3042\u308A\u307E\u3059\u3002`,testsNotProposed:e=>`\u30C6\u30B9\u30C8\u306F PR \u3068\u3057\u3066\u63D0\u6848\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F: ${e}\u3002`}};var Nf=(n=>(n.En="en",n.Ja="ja",n))(Nf||{}),Sle={en:Xy,ja:lG},kle="en";function CR(e){let t=e.trim().toLowerCase();if(t==="")return"en";let n=Object.values(Nf);return n.includes(t)?t:(Dt(`Invalid language '${e}'. Supported: ${n.join(", ")}. Falling back to 'en'.`),"en")}function ta(e,t){return(Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0)??t}function ne(){return Sle[kle]}var eE=(a=>(a.ProviderOutage="provider_outage",a.ProviderRateLimit="provider_rate_limit",a.ProviderUsageLimit="provider_usage_limit",a.ProviderAuthExpired="provider_auth_expired",a.Timeout="timeout",a.NoReport="no_report",a.RenderFailure="render_failure",a))(eE||{});(t=>{function e(n,s){switch(n){case"provider_outage":return{headline:ne().providerOutageHeadline(s.provider.name,s.maxRetries),action:ne().providerOutageActionStatusPage(s.provider.statusUrl)};case"provider_rate_limit":return{headline:ne().providerRateLimitHeadline(s.provider.name),action:ne().providerRateLimitAction};case"provider_usage_limit":return{headline:ne().providerUsageLimitHeadline(s.provider.name),action:ne().providerUsageLimitAction};case"provider_auth_expired":return{headline:ne().providerAuthExpiredHeadline(s.provider.name),action:ne().providerAuthExpiredAction};case"timeout":return{headline:ne().providerTimeoutHeadline(s.timeoutMinutes),action:ne().providerTimeoutAction};case"no_report":case"render_failure":return}}t.buildNotice=e})(eE||={});var SR=(n=>(n.SameBranch="same-branch",n.SeparateBranch="separate-branch",n))(SR||{});var dG=(n=>(n.Sonnet="sonnet",n.Opus="opus",n))(dG||{}),Rle="opus";function kR(e){return Object.values(dG).includes(e)}function pG(e){let t=(e??"").trim();if(t==="")return Rle;let n=t.toLowerCase();return kR(n)?n:t}var tE=(i=>(i.Low="low",i.Medium="medium",i.High="high",i.XHigh="xhigh",i.Max="max",i))(tE||{}),nE="high";function fG(e){return Object.values(tE).includes(e)}var hG=5;function Ble(e){let t=e.split(/\r?\n/).map(n=>n.trim()).filter(Boolean);if(t.length>hG)throw new Error(`relatedRepoPaths supports at most ${hG} entries (got ${t.length}); the cap limits how much cross-repo context is loaded to avoid overflowing Testbot's context window.`);return t}function xle(e){let t=e.trim().toLowerCase();return t===""?"separate-branch":Object.values(SR).includes(t)?t:(Dt(`Invalid generatedTestsMode '${e}'. Falling back to 'separate-branch'.`),"separate-branch")}function $le(e){let t=(e??"").trim();if(t!==""){if(/^(?:[1-9]|10)$/.test(t))return Number(t);Dt(`Ignoring perTestMaxFixAttempts="${e}": expected a whole number from 1 to 10; the Skyramp MCP default applies`)}}function Tle(e){let t=(e??"").trim().toLowerCase();return t===""?nE:fG(t)?t:(Dt(`Ignoring effort="${e}": expected one of ${Object.values(tE).join(", ")}; using "${nE}"`),nE)}function gG(){let e=pG(je("model"));return kR(e)||Dt(`model '${e}' is not a tested alias (sonnet, opus); passing it to the agent verbatim as a raw model id.`),{skyrampLicenseFile:je("skyrampLicenseFile"),cursorApiKey:je("cursorApiKey"),copilotApiKey:je("copilotApiKey"),anthropicApiKey:je("anthropicApiKey"),useBedrock:Yo("useBedrock"),awsRegion:je("awsRegion"),useLocalAuth:je("useLocalAuth").toLowerCase()==="true",model:e,effort:Tle(je("effort")),targetSetupCommand:je("targetSetupCommand"),authTokenCommand:je("authTokenCommand"),uiCredentials:je("uiCredentials"),targetTeardownCommand:je("targetTeardownCommand"),skipTargetTeardown:Yo("skipTargetTeardown"),skyrampMcpVersion:je("skyrampMcpVersion"),skyrampMcpSource:je("skyrampMcpSource"),skyrampMcpGithubToken:je("skyrampMcpGithubToken"),skyrampMcpGithubRef:je("skyrampMcpGithubRef"),nodeVersion:je("nodeVersion"),skipTargetSetup:Yo("skipTargetSetup"),targetReadyCheckCommand:je("targetReadyCheckCommand"),targetReadyCheckTimeout:(()=>{let n=parseInt(je("targetReadyCheckTimeout"),10)||1800;return n<1?(Dt(`targetReadyCheckTimeout must be at least 1 second, got ${n}. Using 1s.`),1):n})(),targetReadyCheckInterval:(()=>{let n=parseInt(je("targetReadyCheckInterval"),10),s=isNaN(n)?30:n;return s<1?(Dt(`targetReadyCheckInterval must be at least 1 second, got ${s}. Using 1s.`),1):s})(),targetReadyCheckDiagnosticsCommand:(()=>{let n=je("targetReadyCheckDiagnosticsCommand");return n.trim().toLowerCase()==="none"?"":n})(),workingDirectory:je("workingDirectory"),autoCommit:Yo("autoCommit"),commitMessage:je("commitMessage"),generatedTestsMode:xle(je("generatedTestsMode")),postPrComment:Yo("postPrComment"),testExecutionTimeout:parseInt(je("testExecutionTimeout"),10)||300,maxRecommendations:(()=>{let n=parseInt(je("maxRecommendations"),10);return isNaN(n)?void 0:Math.max(0,n)})(),maxGenerate:(()=>{let n=parseInt(je("maxGenerate"),10);return isNaN(n)?void 0:Math.max(0,n)})(),perTestMaxFixAttempts:$le(je("perTestMaxFixAttempts")),testbotMaxRetries:parseInt(je("testbotMaxRetries"),10)||3,testbotRetryDelay:parseInt(je("testbotRetryDelay"),10)||10,testbotTimeout:parseInt(je("testbotTimeout"),10)||60,targetSetupRetries:parseInt(je("targetSetupRetries"),10)||3,targetSetupRetryDelay:parseInt(je("targetSetupRetryDelay"),10)||10,authTokenRetries:(()=>{let n=parseInt(je("authTokenRetries"),10);return Number.isFinite(n)&&n>=1?n:6})(),authTokenRetryDelay:(()=>{let n=parseInt(je("authTokenRetryDelay"),10);return Number.isFinite(n)&&n>=0?n:10})(),reportCollapsed:Yo("reportCollapsed"),language:CR(je("language")),enableDebug:Yo("enableDebug"),testRepoPath:je("testRepoPath")||void 0,relatedRepoPaths:Ble(je("relatedRepoPaths")),allowedAuthors:je("allowedAuthors").split(/\r?\n/).map(n=>n.trim()).filter(Boolean)}}var Qle={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 mG(e=process.env){for(let[t,n]of Object.entries(Qle)){let s=`INPUT_${t.replace(/ /g,"_").toUpperCase()}`;(e[s]??"").trim()===""&&(e[s]=n)}}On();async function AG(e){let t=e.targetSetupCommand,n=e.skyrampMcpVersion;n||(n="latest"),t||(t="docker compose up -d --build");let s={targetSetupCommand:t,authTokenCommand:e.authTokenCommand,targetTeardownCommand:e.targetTeardownCommand,skipTargetTeardown:e.skipTargetTeardown,skyrampMcpVersion:n,skyrampMcpSource:e.skyrampMcpSource,skyrampMcpGithubRef:e.skyrampMcpGithubRef,nodeVersion:e.nodeVersion,skipTargetSetup:e.skipTargetSetup,targetReadyCheckCommand:e.targetReadyCheckCommand,targetReadyCheckTimeout:e.targetReadyCheckTimeout,targetReadyCheckInterval:e.targetReadyCheckInterval,targetReadyCheckDiagnosticsCommand:e.targetReadyCheckDiagnosticsCommand,autoCommit:e.autoCommit,commitMessage:e.commitMessage,generatedTestsMode:e.generatedTestsMode,postPrComment:e.postPrComment,testExecutionTimeout:e.testExecutionTimeout,maxRecommendations:e.maxRecommendations,maxGenerate:e.maxGenerate,perTestMaxFixAttempts:e.perTestMaxFixAttempts,testbotMaxRetries:e.testbotMaxRetries,testbotRetryDelay:e.testbotRetryDelay,testbotTimeout:e.testbotTimeout,targetSetupRetries:e.targetSetupRetries,targetSetupRetryDelay:e.targetSetupRetryDelay,authTokenRetries:e.authTokenRetries,authTokenRetryDelay:e.authTokenRetryDelay,reportCollapsed:e.reportCollapsed,language:e.language,enableDebug:e.enableDebug,testRepoPath:e.testRepoPath,relatedRepoPaths:e.relatedRepoPaths};Ly("Resolved configuration");for(let[r,i]of Object.entries(s))r==="authTokenCommand"?ls(` ${r}: [REDACTED]`):ls(` ${r}: ${i}`);return jy(),s}On();On();fR();var EG=G(require("child_process")),RR=class extends Error{constructor(t){super(t),this.name="ExecTimeoutError"}},rE=class extends Error{constructor(t){super(t),this.name="ExecAbortedError"}};function yG(e,t){if(!(!e||e.destroyed||e.writableEnded))try{e.write(t)}catch(n){Dt(`stream write failed: ${n instanceof Error?n.message:String(n)}`)}}async function vG(e,t=[],n={}){let s="",r="",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:a=>{s+=a.toString(),yG(n.stdoutStream,a)},stderr:a=>{r+=a.toString()}}};if(n.timeout||n.signal){let a=n.signal;return a?.aborted?Promise.reject(new rE(`Command aborted before start: ${e}`)):new Promise((c,u)=>{let l=EG.spawn(e,t,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:process.env,stdio:["pipe","pipe","pipe"],shell:!1});l.stdout?.on("data",y=>{s+=y.toString(),n.silent||process.stdout.write(y),yG(n.stdoutStream,y)}),l.stderr?.on("data",y=>{r+=y.toString(),n.silent||process.stderr.write(y)}),n.input&&l.stdin?.end(n.input);let p=()=>{m&&clearTimeout(m),a?.removeEventListener("abort",g)},h=y=>{p();try{l.kill("SIGTERM")}catch{}u(y)},g=()=>h(new rE(`Command aborted: ${e}`)),m=n.timeout?setTimeout(()=>h(new RR(`Command timed out after ${Math.round(n.timeout/6e4)}m: ${e}`)),n.timeout):void 0;a?.addEventListener("abort",g,{once:!0}),l.on("close",y=>{p();let v=y??1;v!==0&&!n.ignoreReturnCode?u(new Error(`The process '${e}' failed with exit code ${v}`)):c({exitCode:v,stdout:s,stderr:r})}),l.on("error",y=>{p(),u(y)})})}return{exitCode:await UV(e,t,i),stdout:s,stderr:r}}async function bG(e,t){Ly(e);try{return await t()}finally{jy()}}function BR(e){return e.toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")}async function wG(e,t){await bG("Tearing down services",async()=>{if(e.skipTargetTeardown){mR("Skipping service teardown (skipTargetTeardown=true)");return}if(!e.targetTeardownCommand){ls("No targetTeardownCommand configured, skipping teardown");return}ls(`Running teardown command: ${e.targetTeardownCommand}`);try{await vG("bash",["-c",e.targetTeardownCommand],{cwd:t}),mR("Services torn down successfully")}catch(n){let s=n instanceof Error?n.message:String(n);Dt(`Service teardown command failed (non-fatal): ${s}`)}})}var le=G(require("fs")),$G=require("crypto"),Se=G(require("path")),TG=require("child_process");var sE=G(require("fs")),CG=G(require("path")),_le=/[;|`$<>(){}\n\r]|(?<!&)&(?!&)|\|\|/,Dle=/`|\$[\w{(@*#?!$-]|\\[$`"\\\n]/;function Nle(e){let t="";for(let s=0;s<e.length;){let r=e[s];if(r==="\\"&&(e[s+1]==='"'||e[s+1]==="'"))return{syntax:"a backslash before a quote",quoted:!1};if(r!=='"'&&r!=="'"){t+=r,s++;continue}let i=e.indexOf(r,s+1);if(i<0)return;let o=r==='"'?Dle.exec(e.slice(s+1,i+(e[i-1]==="\\"?1:0))):null;if(o)return{syntax:`${IG(o[0])} inside double quotes`,quoted:!0};t+=" ",s=i+1}let n=_le.exec(t);return n?{syntax:IG(n[0]),quoted:!1}:void 0}var IG=e=>e==="`"?"a backtick":/[\n\r]/.test(e)?"a line break":`\`${e}\``;function Qc(e){let t=(e??"").trim();if(!t)return{kind:"empty",reason:"the command is empty"};let n=Nle(t);if(n)return{kind:"shell-syntax",reason:`it uses shell syntax (${n.syntax}), and this is re-executed WITHOUT a shell so the recorded string cannot be interpreted \u2014 put the logic in a script and record the script invocation instead, or put an argument that holds such characters in ${n.quoted?"single quotes":"quotes"}`};let s=[],r=[],i="",o,a=!1,c=()=>{(i||a)&&r.push(i),i="",a=!1},u=()=>{c(),r.length>0&&s.push(r),r=[]};for(let p=0;p<t.length;p++){let h=t[p];if(o){h===o?o=void 0:i+=h;continue}if(h==='"'||h==="'"){o=h,a=!0;continue}if(h==="&"&&t[p+1]==="&"){u(),p+=1;continue}if(/\s/.test(h)){c();continue}i+=h}if(o)return{kind:"unterminated-quote",reason:"it has an unterminated quote"};if(u(),s.length===0)return{kind:"empty",reason:"the command is empty"};if(s.some(p=>p.length===0))return{kind:"empty-step",reason:"it has an empty step between && operators"};let l=s.find(p=>["cd","export","source","."].includes(p[0]));return l?{kind:"builtin",reason:`it runs the shell builtin "${l[0]}", which cannot be executed as a program \u2014 record a script that does this instead`}:{argv:s[0],steps:s}}function iE(e,t,n){let s=(e??"").trim(),{steps:r,kind:i}=Qc(s);if(!r&&!(i!=="shell-syntax"&&i!=="builtin")){try{sE.mkdirSync(CG.dirname(t),{recursive:!0}),sE.writeFileSync(t,`#!/usr/bin/env bash
51
+ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function jV(e){process.exitCode=gR.Failure,VV(e)}function rR(e){Ma("debug",{},e)}function VV(e,t={}){Ma("error",Dm(t),e instanceof Error?e.toString():e)}function Dt(e,t={}){Ma("warning",Dm(t),e instanceof Error?e.toString():e)}function mR(e,t={}){Ma("notice",Dm(t),e instanceof Error?e.toString():e)}function ls(e){process.stdout.write(e+LV.EOL)}function Ly(e){CI("group",e)}function jy(){CI("endgroup")}function Us(e){return process.env[`STATE_${e}`]||""}function GV(e){return due(this,void 0,void 0,function*(){return yield Ny.getIDToken(e)})}var LV,due,gR,On=qn(()=>{UN();FN();Nm();LV=G(require("os"),1);wV();oR();oR();SV();MV();due=function(e,t,n,s){function r(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(l){try{u(s.next(l))}catch(p){o(p)}}function c(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){l.done?i(l.value):r(l.value).then(a,c)}u((s=s.apply(e,t||[])).next())})};(function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure"})(gR||(gR={}))});var ud=T((MDe,l2)=>{"use strict";var Ofe="2.0.0",Ufe=Number.MAX_SAFE_INTEGER||9007199254740991,Ffe=16,Mfe=250,Lfe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];l2.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Ffe,MAX_SAFE_BUILD_LENGTH:Mfe,MAX_SAFE_INTEGER:Ufe,RELEASE_TYPES:Lfe,SEMVER_SPEC_VERSION:Ofe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var _h=T((LDe,d2)=>{"use strict";var jfe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};d2.exports=jfe});var ld=T((Ri,p2)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:YB,MAX_SAFE_BUILD_LENGTH:Vfe,MAX_LENGTH:Gfe}=ud(),zfe=_h();Ri=p2.exports={};var qfe=Ri.re=[],Hfe=Ri.safeRe=[],ae=Ri.src=[],Jfe=Ri.safeSrc=[],ce=Ri.t={},Wfe=0,ZB="[a-zA-Z0-9-]",Yfe=[["\\s",1],["\\d",Gfe],[ZB,Vfe]],Zfe=e=>{for(let[t,n]of Yfe)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},Ve=(e,t,n)=>{let s=Zfe(t),r=Wfe++;zfe(e,r,t),ce[e]=r,ae[r]=t,Jfe[r]=s,qfe[r]=new RegExp(t,n?"g":void 0),Hfe[r]=new RegExp(s,n?"g":void 0)};Ve("NUMERICIDENTIFIER","0|[1-9]\\d*");Ve("NUMERICIDENTIFIERLOOSE","\\d+");Ve("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ZB}*`);Ve("MAINVERSION",`(${ae[ce.NUMERICIDENTIFIER]})\\.(${ae[ce.NUMERICIDENTIFIER]})\\.(${ae[ce.NUMERICIDENTIFIER]})`);Ve("MAINVERSIONLOOSE",`(${ae[ce.NUMERICIDENTIFIERLOOSE]})\\.(${ae[ce.NUMERICIDENTIFIERLOOSE]})\\.(${ae[ce.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASEIDENTIFIER",`(?:${ae[ce.NONNUMERICIDENTIFIER]}|${ae[ce.NUMERICIDENTIFIER]})`);Ve("PRERELEASEIDENTIFIERLOOSE",`(?:${ae[ce.NONNUMERICIDENTIFIER]}|${ae[ce.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASE",`(?:-(${ae[ce.PRERELEASEIDENTIFIER]}(?:\\.${ae[ce.PRERELEASEIDENTIFIER]})*))`);Ve("PRERELEASELOOSE",`(?:-?(${ae[ce.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ae[ce.PRERELEASEIDENTIFIERLOOSE]})*))`);Ve("BUILDIDENTIFIER",`${ZB}+`);Ve("BUILD",`(?:\\+(${ae[ce.BUILDIDENTIFIER]}(?:\\.${ae[ce.BUILDIDENTIFIER]})*))`);Ve("FULLPLAIN",`v?${ae[ce.MAINVERSION]}${ae[ce.PRERELEASE]}?${ae[ce.BUILD]}?`);Ve("FULL",`^${ae[ce.FULLPLAIN]}$`);Ve("LOOSEPLAIN",`[v=\\s]*${ae[ce.MAINVERSIONLOOSE]}${ae[ce.PRERELEASELOOSE]}?${ae[ce.BUILD]}?`);Ve("LOOSE",`^${ae[ce.LOOSEPLAIN]}$`);Ve("GTLT","((?:<|>)?=?)");Ve("XRANGEIDENTIFIERLOOSE",`${ae[ce.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ve("XRANGEIDENTIFIER",`${ae[ce.NUMERICIDENTIFIER]}|x|X|\\*`);Ve("XRANGEPLAIN",`[v=\\s]*(${ae[ce.XRANGEIDENTIFIER]})(?:\\.(${ae[ce.XRANGEIDENTIFIER]})(?:\\.(${ae[ce.XRANGEIDENTIFIER]})(?:${ae[ce.PRERELEASE]})?${ae[ce.BUILD]}?)?)?`);Ve("XRANGEPLAINLOOSE",`[v=\\s]*(${ae[ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ae[ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ae[ce.XRANGEIDENTIFIERLOOSE]})(?:${ae[ce.PRERELEASELOOSE]})?${ae[ce.BUILD]}?)?)?`);Ve("XRANGE",`^${ae[ce.GTLT]}\\s*${ae[ce.XRANGEPLAIN]}$`);Ve("XRANGELOOSE",`^${ae[ce.GTLT]}\\s*${ae[ce.XRANGEPLAINLOOSE]}$`);Ve("COERCEPLAIN",`(^|[^\\d])(\\d{1,${YB}})(?:\\.(\\d{1,${YB}}))?(?:\\.(\\d{1,${YB}}))?`);Ve("COERCE",`${ae[ce.COERCEPLAIN]}(?:$|[^\\d])`);Ve("COERCEFULL",ae[ce.COERCEPLAIN]+`(?:${ae[ce.PRERELEASE]})?(?:${ae[ce.BUILD]})?(?:$|[^\\d])`);Ve("COERCERTL",ae[ce.COERCE],!0);Ve("COERCERTLFULL",ae[ce.COERCEFULL],!0);Ve("LONETILDE","(?:~>?)");Ve("TILDETRIM",`(\\s*)${ae[ce.LONETILDE]}\\s+`,!0);Ri.tildeTrimReplace="$1~";Ve("TILDE",`^${ae[ce.LONETILDE]}${ae[ce.XRANGEPLAIN]}$`);Ve("TILDELOOSE",`^${ae[ce.LONETILDE]}${ae[ce.XRANGEPLAINLOOSE]}$`);Ve("LONECARET","(?:\\^)");Ve("CARETTRIM",`(\\s*)${ae[ce.LONECARET]}\\s+`,!0);Ri.caretTrimReplace="$1^";Ve("CARET",`^${ae[ce.LONECARET]}${ae[ce.XRANGEPLAIN]}$`);Ve("CARETLOOSE",`^${ae[ce.LONECARET]}${ae[ce.XRANGEPLAINLOOSE]}$`);Ve("COMPARATORLOOSE",`^${ae[ce.GTLT]}\\s*(${ae[ce.LOOSEPLAIN]})$|^$`);Ve("COMPARATOR",`^${ae[ce.GTLT]}\\s*(${ae[ce.FULLPLAIN]})$|^$`);Ve("COMPARATORTRIM",`(\\s*)${ae[ce.GTLT]}\\s*(${ae[ce.LOOSEPLAIN]}|${ae[ce.XRANGEPLAIN]})`,!0);Ri.comparatorTrimReplace="$1$2$3";Ve("HYPHENRANGE",`^\\s*(${ae[ce.XRANGEPLAIN]})\\s+-\\s+(${ae[ce.XRANGEPLAIN]})\\s*$`);Ve("HYPHENRANGELOOSE",`^\\s*(${ae[ce.XRANGEPLAINLOOSE]})\\s+-\\s+(${ae[ce.XRANGEPLAINLOOSE]})\\s*$`);Ve("STAR","(<|>)?=?\\s*\\*");Ve("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ve("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var WE=T((jDe,f2)=>{"use strict";var Kfe=Object.freeze({loose:!0}),Xfe=Object.freeze({}),ehe=e=>e?typeof e!="object"?Kfe:e:Xfe;f2.exports=ehe});var KB=T((VDe,m2)=>{"use strict";var h2=/^[0-9]+$/,g2=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let n=h2.test(e),s=h2.test(t);return n&&s&&(e=+e,t=+t),e===t?0:n&&!s?-1:s&&!n?1:e<t?-1:1},the=(e,t)=>g2(t,e);m2.exports={compareIdentifiers:g2,rcompareIdentifiers:the}});var Bn=T((GDe,y2)=>{"use strict";var YE=_h(),{MAX_LENGTH:A2,MAX_SAFE_INTEGER:ZE}=ud(),{safeRe:KE,t:XE}=ld(),nhe=WE(),{compareIdentifiers:XB}=KB(),rhe=(e,t)=>{let n=t.split(".");if(n.length>e.length)return!1;for(let s=0;s<n.length;s++)if(XB(e[s],n[s])!==0)return!1;return!0},ex=class e{constructor(t,n){if(n=nhe(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>A2)throw new TypeError(`version is longer than ${A2} characters`);YE("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let s=t.trim().match(n.loose?KE[XE.LOOSE]:KE[XE.FULL]);if(!s)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ZE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ZE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ZE||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let i=+r;if(i>=0&&i<ZE)return i}return r}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(YE("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let s=this.prerelease[n],r=t.prerelease[n];if(YE("prerelease compare",n,s,r),s===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(s===void 0)return-1;if(s===r)continue;return XB(s,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let s=this.build[n],r=t.build[n];if(YE("build compare",n,s,r),s===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(s===void 0)return-1;if(s===r)continue;return XB(s,r)}while(++n)}inc(t,n,s){if(t.startsWith("pre")){if(!n&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let r=`-${n}`.match(this.options.loose?KE[XE.PRERELEASELOOSE]:KE[XE.PRERELEASE]);if(!r||r[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,s),this.inc("pre",n,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,s),this.inc("pre",n,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let i=[n,r];if(s===!1&&(i=[n]),rhe(this.prerelease,n)){let o=this.prerelease[n.split(".").length];isNaN(o)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};y2.exports=ex});var ga=T((zDe,v2)=>{"use strict";var E2=Bn(),she=(e,t,n=!1)=>{if(e instanceof E2)return e;try{return new E2(e,t)}catch(s){if(!n)return null;throw s}};v2.exports=she});var w2=T((qDe,b2)=>{"use strict";var ihe=ga(),ohe=(e,t)=>{let n=ihe(e,t);return n?n.version:null};b2.exports=ohe});var C2=T((HDe,I2)=>{"use strict";var ahe=ga(),che=(e,t)=>{let n=ahe(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};I2.exports=che});var R2=T((JDe,k2)=>{"use strict";var S2=Bn(),uhe=(e,t,n,s,r)=>{typeof n=="string"&&(r=s,s=n,n=void 0);try{return new S2(e instanceof S2?e.version:e,n).inc(t,s,r).version}catch{return null}};k2.exports=uhe});var $2=T((WDe,x2)=>{"use strict";var B2=ga(),lhe=(e,t)=>{let n=B2(e,null,!0),s=B2(t,null,!0),r=n.compare(s);if(r===0)return null;let i=r>0,o=i?n:s,a=i?s:n,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return n.major!==s.major?l+"major":n.minor!==s.minor?l+"minor":n.patch!==s.patch?l+"patch":"prerelease"};x2.exports=lhe});var Q2=T((YDe,T2)=>{"use strict";var dhe=Bn(),phe=(e,t)=>new dhe(e,t).major;T2.exports=phe});var D2=T((ZDe,_2)=>{"use strict";var fhe=Bn(),hhe=(e,t)=>new fhe(e,t).minor;_2.exports=hhe});var P2=T((KDe,N2)=>{"use strict";var ghe=Bn(),mhe=(e,t)=>new ghe(e,t).patch;N2.exports=mhe});var U2=T((XDe,O2)=>{"use strict";var Ahe=ga(),yhe=(e,t)=>{let n=Ahe(e,t);return n&&n.prerelease.length?n.prerelease:null};O2.exports=yhe});var vs=T((eNe,M2)=>{"use strict";var F2=Bn(),Ehe=(e,t,n)=>new F2(e,n).compare(new F2(t,n));M2.exports=Ehe});var j2=T((tNe,L2)=>{"use strict";var vhe=vs(),bhe=(e,t,n)=>vhe(t,e,n);L2.exports=bhe});var G2=T((nNe,V2)=>{"use strict";var whe=vs(),Ihe=(e,t)=>whe(e,t,!0);V2.exports=Ihe});var ev=T((rNe,q2)=>{"use strict";var z2=Bn(),Che=(e,t,n)=>{let s=new z2(e,n),r=new z2(t,n);return s.compare(r)||s.compareBuild(r)};q2.exports=Che});var J2=T((sNe,H2)=>{"use strict";var She=ev(),khe=(e,t)=>e.sort((n,s)=>She(n,s,t));H2.exports=khe});var Y2=T((iNe,W2)=>{"use strict";var Rhe=ev(),Bhe=(e,t)=>e.sort((n,s)=>Rhe(s,n,t));W2.exports=Bhe});var Dh=T((oNe,Z2)=>{"use strict";var xhe=vs(),$he=(e,t,n)=>xhe(e,t,n)>0;Z2.exports=$he});var tv=T((aNe,K2)=>{"use strict";var The=vs(),Qhe=(e,t,n)=>The(e,t,n)<0;K2.exports=Qhe});var tx=T((cNe,X2)=>{"use strict";var _he=vs(),Dhe=(e,t,n)=>_he(e,t,n)===0;X2.exports=Dhe});var nx=T((uNe,eH)=>{"use strict";var Nhe=vs(),Phe=(e,t,n)=>Nhe(e,t,n)!==0;eH.exports=Phe});var nv=T((lNe,tH)=>{"use strict";var Ohe=vs(),Uhe=(e,t,n)=>Ohe(e,t,n)>=0;tH.exports=Uhe});var rv=T((dNe,nH)=>{"use strict";var Fhe=vs(),Mhe=(e,t,n)=>Fhe(e,t,n)<=0;nH.exports=Mhe});var rx=T((pNe,rH)=>{"use strict";var Lhe=tx(),jhe=nx(),Vhe=Dh(),Ghe=nv(),zhe=tv(),qhe=rv(),Hhe=(e,t,n,s)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return Lhe(e,n,s);case"!=":return jhe(e,n,s);case">":return Vhe(e,n,s);case">=":return Ghe(e,n,s);case"<":return zhe(e,n,s);case"<=":return qhe(e,n,s);default:throw new TypeError(`Invalid operator: ${t}`)}};rH.exports=Hhe});var iH=T((fNe,sH)=>{"use strict";var Jhe=Bn(),Whe=ga(),{safeRe:sv,t:iv}=ld(),Yhe=(e,t)=>{if(e instanceof Jhe)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?sv[iv.COERCEFULL]:sv[iv.COERCE]);else{let c=t.includePrerelease?sv[iv.COERCERTLFULL]:sv[iv.COERCERTL],u;for(;(u=c.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(n===null)return null;let s=n[2],r=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Whe(`${s}.${r}.${i}${o}${a}`,t)};sH.exports=Yhe});var aH=T((hNe,oH)=>{"use strict";var Zhe=ga(),Khe=ud(),Xhe=Bn(),ege=(e,t,n)=>{if(!Khe.RELEASE_TYPES.includes(t))return null;let s=tge(e,n);return s&&nge(s,t)},tge=(e,t)=>{let n=e instanceof Xhe?e.version:e;return Zhe(n,t)},nge=(e,t)=>{if(rge(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},rge=e=>e.startsWith("pre");oH.exports=ege});var uH=T((gNe,cH)=>{"use strict";var sx=class{constructor(){this.max=1e3,this.map=new Map}get(t){let n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(t,n)}return this}};cH.exports=sx});var bs=T((mNe,fH)=>{"use strict";var sge=/\s+/g,ix=class e{constructor(t,n){if(n=oge(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof ox)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(sge," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(r=>!dH(r[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&gge(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let n=this.set[t];for(let s=0;s<n.length;s++)s>0&&(this.formatted+=" "),this.formatted+=n[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(hge,"");let s=((this.options.includePrerelease&&pge)|(this.options.loose&&fge))+":"+t,r=lH.get(s);if(r)return r;let i=this.options.loose,o=i?rr[xn.HYPHENRANGELOOSE]:rr[xn.HYPHENRANGE];t=t.replace(o,kge(this.options.includePrerelease)),Nt("hyphen replace",t),t=t.replace(rr[xn.COMPARATORTRIM],uge),Nt("comparator trim",t),t=t.replace(rr[xn.TILDETRIM],lge),Nt("tilde trim",t),t=t.replace(rr[xn.CARETTRIM],dge),Nt("caret trim",t);let a=t.split(" ").map(p=>mge(p,this.options)).join(" ").split(/\s+/).map(p=>Sge(p,this.options));i&&(a=a.filter(p=>(Nt("loose invalid filter",p,this.options),!!p.match(rr[xn.COMPARATORLOOSE])))),Nt("range list",a);let c=new Map,u=a.map(p=>new ox(p,this.options));for(let p of u){if(dH(p))return[p];c.set(p.value,p)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return lH.set(s,l),l}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(s=>pH(s,n)&&t.set.some(r=>pH(r,n)&&s.every(i=>r.every(o=>i.intersects(o,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new age(t,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Rge(this.set[n],t,this.options))return!0;return!1}};fH.exports=ix;var ige=uH(),lH=new ige,oge=WE(),ox=Nh(),Nt=_h(),age=Bn(),{safeRe:rr,src:cge,t:xn,comparatorTrimReplace:uge,tildeTrimReplace:lge,caretTrimReplace:dge}=ld(),{FLAG_INCLUDE_PRERELEASE:pge,FLAG_LOOSE:fge}=ud(),hge=new RegExp(cge[xn.BUILD],"g"),dH=e=>e.value==="<0.0.0-0",gge=e=>e.value==="",pH=(e,t)=>{let n=!0,s=e.slice(),r=s.pop();for(;n&&s.length;)n=s.every(i=>r.intersects(i,t)),r=s.pop();return n},mge=(e,t)=>(e=e.replace(rr[xn.BUILD],""),Nt("comp",e,t),e=vge(e,t),Nt("caret",e),e=yge(e,t),Nt("tildes",e),e=wge(e,t),Nt("xrange",e),e=Cge(e,t),Nt("stars",e),e),un=e=>!e||e.toLowerCase()==="x"||e==="*",Age=(e,t,n)=>un(e)&&!un(t)||un(t)&&n&&!un(n),yge=(e,t)=>e.trim().split(/\s+/).map(n=>Ege(n,t)).join(" "),Ege=(e,t)=>{let n=t.loose?rr[xn.TILDELOOSE]:rr[xn.TILDE],s=t.includePrerelease?"-0":"";return e.replace(n,(r,i,o,a,c)=>{Nt("tilde",e,r,i,o,a,c);let u;return un(i)?u="":un(o)?u=`>=${i}.0.0${s} <${+i+1}.0.0-0`:un(a)?u=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:c?(Nt("replaceTilde pr",c),u=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`):u=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`,Nt("tilde return",u),u})},vge=(e,t)=>e.trim().split(/\s+/).map(n=>bge(n,t)).join(" "),bge=(e,t)=>{Nt("caret",e,t);let n=t.loose?rr[xn.CARETLOOSE]:rr[xn.CARET],s=t.includePrerelease?"-0":"";return e.replace(n,(r,i,o,a,c)=>{Nt("caret",e,r,i,o,a,c);let u;return un(i)?u="":un(o)?u=`>=${i}.0.0${s} <${+i+1}.0.0-0`:un(a)?i==="0"?u=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:u=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:c?(Nt("replaceCaret pr",c),i==="0"?o==="0"?u=`>=${i}.${o}.${a}-${c} <${i}.${o}.${+a+1}-0`:u=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`:u=`>=${i}.${o}.${a}-${c} <${+i+1}.0.0-0`):(Nt("no pr"),i==="0"?o==="0"?u=`>=${i}.${o}.${a} <${i}.${o}.${+a+1}-0`:u=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`:u=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),Nt("caret return",u),u})},wge=(e,t)=>(Nt("replaceXRanges",e,t),e.split(/\s+/).map(n=>Ige(n,t)).join(" ")),Ige=(e,t)=>{e=e.trim();let n=t.loose?rr[xn.XRANGELOOSE]:rr[xn.XRANGE];return e.replace(n,(s,r,i,o,a,c)=>{if(Nt("xRange",e,s,r,i,o,a,c),Age(i,o,a))return e;let u=un(i),l=u||un(o),p=l||un(a),h=p;return r==="="&&h&&(r=""),c=t.includePrerelease?"-0":"",u?r===">"||r==="<"?s="<0.0.0-0":s="*":r&&h?(l&&(o=0),a=0,r===">"?(r=">=",l?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):r==="<="&&(r="<",l?i=+i+1:o=+o+1),r==="<"&&(c="-0"),s=`${r+i}.${o}.${a}${c}`):l?s=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(s=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),Nt("xRange return",s),s})},Cge=(e,t)=>(Nt("replaceStars",e,t),e.trim().replace(rr[xn.STAR],"")),Sge=(e,t)=>(Nt("replaceGTE0",e,t),e.trim().replace(rr[t.includePrerelease?xn.GTE0PRE:xn.GTE0],"")),kge=e=>(t,n,s,r,i,o,a,c,u,l,p,h)=>(un(s)?n="":un(r)?n=`>=${s}.0.0${e?"-0":""}`:un(i)?n=`>=${s}.${r}.0${e?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${e?"-0":""}`,un(u)?c="":un(l)?c=`<${+u+1}.0.0-0`:un(p)?c=`<${u}.${+l+1}.0-0`:h?c=`<=${u}.${l}.${p}-${h}`:e?c=`<${u}.${l}.${+p+1}-0`:c=`<=${c}`,`${n} ${c}`.trim()),Rge=(e,t,n)=>{for(let s=0;s<e.length;s++)if(!e[s].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let s=0;s<e.length;s++)if(Nt(e[s].semver),e[s].semver!==ox.ANY&&e[s].semver.prerelease.length>0){let r=e[s].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}});var Nh=T((ANe,EH)=>{"use strict";var Ph=Symbol("SemVer ANY"),ux=class e{static get ANY(){return Ph}constructor(t,n){if(n=hH(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),cx("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===Ph?this.value="":this.value=this.operator+this.semver.version,cx("comp",this)}parse(t){let n=this.options.loose?gH[mH.COMPARATORLOOSE]:gH[mH.COMPARATOR],s=t.match(n);if(!s)throw new TypeError(`Invalid comparator: ${t}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new AH(s[2],this.options.loose):this.semver=Ph}toString(){return this.value}test(t){if(cx("Comparator.test",t,this.options.loose),this.semver===Ph||t===Ph)return!0;if(typeof t=="string")try{t=new AH(t,this.options)}catch{return!1}return ax(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new yH(t.value,n).test(this.value):t.operator===""?t.value===""?!0:new yH(this.value,n).test(t.semver):(n=hH(n),n.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||ax(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||ax(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};EH.exports=ux;var hH=WE(),{safeRe:gH,t:mH}=ld(),ax=rx(),cx=_h(),AH=Bn(),yH=bs()});var Oh=T((yNe,vH)=>{"use strict";var Bge=bs(),xge=(e,t,n)=>{try{t=new Bge(t,n)}catch{return!1}return t.test(e)};vH.exports=xge});var wH=T((ENe,bH)=>{"use strict";var $ge=bs(),Tge=(e,t)=>new $ge(e,t).set.map(n=>n.map(s=>s.value).join(" ").trim().split(" "));bH.exports=Tge});var CH=T((vNe,IH)=>{"use strict";var Qge=Bn(),_ge=bs(),Dge=(e,t,n)=>{let s=null,r=null,i=null;try{i=new _ge(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!s||r.compare(o)===-1)&&(s=o,r=new Qge(s,n))}),s};IH.exports=Dge});var kH=T((bNe,SH)=>{"use strict";var Nge=Bn(),Pge=bs(),Oge=(e,t,n)=>{let s=null,r=null,i=null;try{i=new Pge(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!s||r.compare(o)===1)&&(s=o,r=new Nge(s,n))}),s};SH.exports=Oge});var xH=T((wNe,BH)=>{"use strict";var lx=Bn(),Uge=bs(),RH=Dh(),Fge=(e,t)=>{e=new Uge(e,t);let n=new lx("0.0.0");if(e.test(n)||(n=new lx("0.0.0-0"),e.test(n)))return n;n=null;for(let s=0;s<e.set.length;++s){let r=e.set[s],i=null;r.forEach(o=>{let a=new lx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||RH(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||RH(n,i))&&(n=i)}return n&&e.test(n)?n:null};BH.exports=Fge});var TH=T((INe,$H)=>{"use strict";var Mge=bs(),Lge=(e,t)=>{try{return new Mge(e,t).range||"*"}catch{return null}};$H.exports=Lge});var ov=T((CNe,NH)=>{"use strict";var jge=Bn(),DH=Nh(),{ANY:Vge}=DH,Gge=bs(),zge=Oh(),QH=Dh(),_H=tv(),qge=rv(),Hge=nv(),Jge=(e,t,n,s)=>{e=new jge(e,s),t=new Gge(t,s);let r,i,o,a,c;switch(n){case">":r=QH,i=qge,o=_H,a=">",c=">=";break;case"<":r=_H,i=Hge,o=QH,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(zge(e,t,s))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],p=null,h=null;if(l.forEach(g=>{g.semver===Vge&&(g=new DH(">=0.0.0")),p=p||g,h=h||g,r(g.semver,p.semver,s)?p=g:o(g.semver,h.semver,s)&&(h=g)}),p.operator===a||p.operator===c||(!h.operator||h.operator===a)&&i(e,h.semver))return!1;if(h.operator===c&&o(e,h.semver))return!1}return!0};NH.exports=Jge});var OH=T((SNe,PH)=>{"use strict";var Wge=ov(),Yge=(e,t,n)=>Wge(e,t,">",n);PH.exports=Yge});var FH=T((kNe,UH)=>{"use strict";var Zge=ov(),Kge=(e,t,n)=>Zge(e,t,"<",n);UH.exports=Kge});var jH=T((RNe,LH)=>{"use strict";var MH=bs(),Xge=(e,t,n)=>(e=new MH(e,n),t=new MH(t,n),e.intersects(t,n));LH.exports=Xge});var GH=T((BNe,VH)=>{"use strict";var eme=Oh(),tme=vs();VH.exports=(e,t,n)=>{let s=[],r=null,i=null,o=e.sort((l,p)=>tme(l,p,n));for(let l of o)eme(l,t,n)?(i=l,r||(r=l)):(i&&s.push([r,i]),i=null,r=null);r&&s.push([r,null]);let a=[];for(let[l,p]of s)l===p?a.push(l):!p&&l===o[0]?a.push("*"):p?l===o[0]?a.push(`<=${p}`):a.push(`${l} - ${p}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var YH=T((xNe,WH)=>{"use strict";var zH=bs(),fx=Nh(),{ANY:dx}=fx,px=Oh(),hx=vs(),nme=(e,t,n={})=>{if(e===t)return!0;e=new zH(e,n),t=new zH(t,n);let s=!1;e:for(let r of e.set){for(let i of t.set){let o=sme(r,i,n);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},rme=[new fx(">=0.0.0-0")],qH=[new fx(">=0.0.0")],sme=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===dx){if(t.length===1&&t[0].semver===dx)return!0;n.includePrerelease?e=rme:e=qH}if(t.length===1&&t[0].semver===dx){if(n.includePrerelease)return!0;t=qH}let s=new Set,r,i;for(let g of e)g.operator===">"||g.operator===">="?r=HH(r,g,n):g.operator==="<"||g.operator==="<="?i=JH(i,g,n):s.add(g.semver);if(s.size>1)return null;let o;if(r&&i){if(o=hx(r.semver,i.semver,n),o>0)return null;if(o===0&&(r.operator!==">="||i.operator!=="<="))return null}for(let g of s){if(r&&!px(g,String(r),n)||i&&!px(g,String(i),n))return null;for(let m of t)if(!px(g,String(m),n))return!1;return!0}let a,c,u,l,p=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,h=r&&!n.includePrerelease&&r.semver.prerelease.length?r.semver:!1;p&&p.prerelease.length===1&&i.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let g of t){if(l=l||g.operator===">"||g.operator===">=",u=u||g.operator==="<"||g.operator==="<=",r){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator===">"||g.operator===">="){if(a=HH(r,g,n),a===g&&a!==r)return!1}else if(r.operator===">="&&!g.test(r.semver))return!1}if(i){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator==="<"||g.operator==="<="){if(c=JH(i,g,n),c===g&&c!==i)return!1}else if(i.operator==="<="&&!g.test(i.semver))return!1}if(!g.operator&&(i||r)&&o!==0)return!1}return!(r&&u&&!i&&o!==0||i&&l&&!r&&o!==0||h||p)},HH=(e,t,n)=>{if(!e)return t;let s=hx(e.semver,t.semver,n);return s>0?e:s<0||t.operator===">"&&e.operator===">="?t:e},JH=(e,t,n)=>{if(!e)return t;let s=hx(e.semver,t.semver,n);return s<0?e:s>0||t.operator==="<"&&e.operator==="<="?t:e};WH.exports=nme});var mx=T(($Ne,XH)=>{"use strict";var gx=ld(),ZH=ud(),ime=Bn(),KH=KB(),ome=ga(),ame=w2(),cme=C2(),ume=R2(),lme=$2(),dme=Q2(),pme=D2(),fme=P2(),hme=U2(),gme=vs(),mme=j2(),Ame=G2(),yme=ev(),Eme=J2(),vme=Y2(),bme=Dh(),wme=tv(),Ime=tx(),Cme=nx(),Sme=nv(),kme=rv(),Rme=rx(),Bme=iH(),xme=aH(),$me=Nh(),Tme=bs(),Qme=Oh(),_me=wH(),Dme=CH(),Nme=kH(),Pme=xH(),Ome=TH(),Ume=ov(),Fme=OH(),Mme=FH(),Lme=jH(),jme=GH(),Vme=YH();XH.exports={parse:ome,valid:ame,clean:cme,inc:ume,diff:lme,major:dme,minor:pme,patch:fme,prerelease:hme,compare:gme,rcompare:mme,compareLoose:Ame,compareBuild:yme,sort:Eme,rsort:vme,gt:bme,lt:wme,eq:Ime,neq:Cme,gte:Sme,lte:kme,cmp:Rme,coerce:Bme,truncate:xme,Comparator:$me,Range:Tme,satisfies:Qme,toComparators:_me,maxSatisfying:Dme,minSatisfying:Nme,minVersion:Pme,validRange:Ome,outside:Ume,gtr:Fme,ltr:Mme,intersects:Lme,simplifyRange:jme,subset:Vme,SemVer:ime,re:gx.re,src:gx.src,tokens:gx.t,SEMVER_SPEC_VERSION:ZH.SEMVER_SPEC_VERSION,RELEASE_TYPES:ZH.RELEASE_TYPES,compareIdentifiers:KH.compareIdentifiers,rcompareIdentifiers:KH.rcompareIdentifiers}});var fxe={};rs(fxe,{post:()=>r3});module.exports=u3(fxe);On();var n3=G(require("path"));On();On();var AR;(function(e){e.Pass="Pass",e.Fail="Fail",e.Error="Error",e.Skipped="Skipped",e.Unknown="Unknown"})(AR||(AR={}));var zV;(function(e){e.High="high",e.Medium="medium",e.Low="low"})(zV||(zV={}));var qV;(function(e){e.Skyramp="skyramp",e.External="external"})(qV||(qV={}));var yR;(function(e){e.Update="UPDATE",e.Regenerate="REGENERATE",e.Delete="DELETE",e.Verify="VERIFY",e.Ignore="IGNORE"})(yR||(yR={}));var HV;(function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"})(HV||(HV={}));var Ce={};rs(Ce,{BRAND:()=>Oue,DIRTY:()=>mc,EMPTY_PATH:()=>gue,INVALID:()=>Be,NEVER:()=>ble,OK:()=>Un,ParseStatus:()=>Sn,Schema:()=>Ke,ZodAny:()=>Xo,ZodArray:()=>Xi,ZodBigInt:()=>yc,ZodBoolean:()=>Ec,ZodBranded:()=>Qf,ZodCatch:()=>$c,ZodDate:()=>vc,ZodDefault:()=>xc,ZodDiscriminatedUnion:()=>zy,ZodEffects:()=>fs,ZodEnum:()=>Rc,ZodError:()=>Ar,ZodFirstPartyTypeKind:()=>De,ZodFunction:()=>Hy,ZodIntersection:()=>Cc,ZodIssueCode:()=>j,ZodLazy:()=>Sc,ZodLiteral:()=>kc,ZodMap:()=>Fl,ZodNaN:()=>Ll,ZodNativeEnum:()=>Bc,ZodNever:()=>Fs,ZodNull:()=>wc,ZodNullable:()=>gi,ZodNumber:()=>Ac,ZodObject:()=>yr,ZodOptional:()=>ds,ZodParsedType:()=>ie,ZodPipeline:()=>_f,ZodPromise:()=>ea,ZodReadonly:()=>Tc,ZodRecord:()=>qy,ZodSchema:()=>Ke,ZodSet:()=>Ml,ZodString:()=>Ko,ZodSymbol:()=>Ol,ZodTransformer:()=>fs,ZodTuple:()=>hi,ZodType:()=>Ke,ZodUndefined:()=>bc,ZodUnion:()=>Ic,ZodUnknown:()=>Ki,ZodVoid:()=>Ul,addIssueToContext:()=>ee,any:()=>que,array:()=>Yue,bigint:()=>Lue,boolean:()=>sG,coerce:()=>vle,custom:()=>tG,date:()=>jue,datetimeRegex:()=>XV,defaultErrorMap:()=>Yi,discriminatedUnion:()=>ele,effect:()=>ple,enum:()=>ule,function:()=>ole,getErrorMap:()=>Dl,getParsedType:()=>fi,instanceof:()=>Fue,intersection:()=>tle,isAborted:()=>Vy,isAsync:()=>Nl,isDirty:()=>Gy,isValid:()=>Zo,late:()=>Uue,lazy:()=>ale,literal:()=>cle,makeIssue:()=>Tf,map:()=>sle,nan:()=>Mue,nativeEnum:()=>lle,never:()=>Jue,null:()=>zue,nullable:()=>hle,number:()=>rG,object:()=>Zue,objectUtil:()=>ER,oboolean:()=>Ele,onumber:()=>yle,optional:()=>fle,ostring:()=>Ale,pipeline:()=>mle,preprocess:()=>gle,promise:()=>dle,quotelessJson:()=>pue,record:()=>rle,set:()=>ile,setErrorMap:()=>hue,strictObject:()=>Kue,string:()=>nG,symbol:()=>Vue,transformer:()=>ple,tuple:()=>nle,undefined:()=>Gue,union:()=>Xue,unknown:()=>Hue,util:()=>st,void:()=>Wue});var st;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let i={};for(let o of r)i[o]=o;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),o={};for(let a of i)o[a]=r[a];return e.objectValues(o)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},e.find=(r,i)=>{for(let o of r)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=s,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var ER;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ER||(ER={}));var ie=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return Number.isNaN(e)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(e)?ie.array:e===null?ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ie.promise:typeof Map<"u"&&e instanceof Map?ie.map:typeof Set<"u"&&e instanceof Set?ie.set:typeof Date<"u"&&e instanceof Date?ie.date:ie.object;default:return ie.unknown}};var j=st.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"]),pue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ar=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},s={_errors:[]},r=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(n(o));else{let a=s,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return r(this),s}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},s=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else s.push(t(r));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}};Ar.create=e=>new Ar(e);var fue=(e,t)=>{let n;switch(e.code){case j.invalid_type:e.received===ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case j.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case j.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case j.invalid_union:n="Invalid input";break;case j.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case j.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case j.invalid_arguments:n="Invalid function arguments";break;case j.invalid_return_type:n="Invalid function return type";break;case j.invalid_date:n="Invalid date";break;case j.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case j.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case j.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case j.custom:n="Invalid input";break;case j.invalid_intersection_types:n="Intersection results could not be merged";break;case j.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case j.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}},Yi=fue;var JV=Yi;function hue(e){JV=e}function Dl(){return JV}var Tf=e=>{let{data:t,path:n,errorMaps:s,issueData:r}=e,i=[...n,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let a="",c=s.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...r,path:i,message:a}},gue=[];function ee(e,t){let n=Dl(),s=Tf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Yi?void 0:Yi].filter(r=>!!r)});e.common.issues.push(s)}var Sn=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let s=[];for(let r of n){if(r.status==="aborted")return Be;r.status==="dirty"&&t.dirty(),s.push(r.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,n){let s=[];for(let r of n){let i=await r.key,o=await r.value;s.push({key:i,value:o})}return e.mergeObjectSync(t,s)}static mergeObjectSync(t,n){let s={};for(let r of n){let{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(s[i.value]=o.value)}return{status:t.value,value:s}}},Be=Object.freeze({status:"aborted"}),mc=e=>({status:"dirty",value:e}),Un=e=>({status:"valid",value:e}),Vy=e=>e.status==="aborted",Gy=e=>e.status==="dirty",Zo=e=>e.status==="valid",Nl=e=>typeof Promise<"u"&&e instanceof Promise;var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(fe||(fe={}));var ps=class{constructor(t,n,s,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=s,this._key=r}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}},WV=(e,t)=>{if(Zo(t))return{success:!0,data:t.value};if(!e.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 Ar(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:s,description:r}=e;if(t&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??s??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:r}}var Ke=class{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Sn,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Nl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let s=this.safeParse(t,n);if(s.success)return s.data;throw s.error}safeParse(t,n){let s={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parseSync({data:t,path:s.path,parent:s});return WV(s,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)};if(!this["~standard"].async)try{let s=this._parseSync({data:t,path:[],parent:n});return Zo(s)?{value:s.value}:{issues:n.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>Zo(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){let s=await this.safeParseAsync(t,n);if(s.success)return s.data;throw s.error}async safeParseAsync(t,n){let s={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parse({data:t,path:s.path,parent:s}),i=await(Nl(r)?r:Promise.resolve(r));return WV(s,i)}refine(t,n){let s=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{let o=t(r),a=()=>i.addIssue({code:j.custom,...s(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((s,r)=>t(s)?!0:(r.addIssue(typeof n=="function"?n(s,r):n),!1))}_refinement(t){return new fs({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 ds.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xi.create(this)}promise(){return ea.create(this,this._def)}or(t){return Ic.create([this,t],this._def)}and(t){return Cc.create(this,t,this._def)}transform(t){return new fs({...ze(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new xc({...ze(this._def),innerType:this,defaultValue:n,typeName:De.ZodDefault})}brand(){return new Qf({typeName:De.ZodBranded,type:this,...ze(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new $c({...ze(this._def),innerType:this,catchValue:n,typeName:De.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _f.create(this,t)}readonly(){return Tc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mue=/^c[^\s-]{8,}$/i,Aue=/^[0-9a-z]+$/,yue=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Eue=/^[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,vue=/^[a-z0-9_-]{21}$/i,bue=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wue=/^[-+]?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)?)??$/,Iue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",vR,Sue=/^(?:(?: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])$/,kue=/^(?:(?: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])$/,Rue=/^(([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]))$/,Bue=/^(([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])$/,xue=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$ue=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ZV="((\\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])))",Tue=new RegExp(`^${ZV}$`);function KV(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Que(e){return new RegExp(`^${KV(e)}$`)}function XV(e){let t=`${ZV}T${KV(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _ue(e,t){return!!((t==="v4"||!t)&&Sue.test(e)||(t==="v6"||!t)&&Rue.test(e))}function Due(e,t){if(!bue.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let s=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(s));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function Nue(e,t){return!!((t==="v4"||!t)&&kue.test(e)||(t==="v6"||!t)&&Bue.test(e))}var Ko=class e extends Ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ie.string){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_type,expected:ie.string,received:i.parsedType}),Be}let s=new Sn,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(r=this._getOrReturnCtx(t,r),o?ee(r,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ee(r,{code:j.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),s.dirty())}else if(i.kind==="email")Iue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"email",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="emoji")vR||(vR=new RegExp(Cue,"u")),vR.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"emoji",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="uuid")Eue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"uuid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="nanoid")vue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"nanoid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid")mue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"cuid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid2")Aue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"cuid2",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="ulid")yue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"ulid",code:j.invalid_string,message:i.message}),s.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),ee(r,{validation:"url",code:j.invalid_string,message:i.message}),s.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"regex",code:j.invalid_string,message:i.message}),s.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):i.kind==="datetime"?XV(i).test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:"datetime",message:i.message}),s.dirty()):i.kind==="date"?Tue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:"date",message:i.message}),s.dirty()):i.kind==="time"?Que(i).test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:j.invalid_string,validation:"time",message:i.message}),s.dirty()):i.kind==="duration"?wue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"duration",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="ip"?_ue(t.data,i.version)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"ip",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="jwt"?Due(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"jwt",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="cidr"?Nue(t.data,i.version)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"cidr",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="base64"?xue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"base64",code:j.invalid_string,message:i.message}),s.dirty()):i.kind==="base64url"?$ue.test(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{validation:"base64url",code:j.invalid_string,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}_regex(t,n,s){return this.refinement(r=>t.test(r),{validation:n,code:j.invalid_string,...fe.errToObj(s)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...fe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...fe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...fe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...fe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Ko.create=e=>new Ko({checks:[],typeName:De.ZodString,coerce:e?.coerce??!1,...ze(e)});function Pue(e,t){let n=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=n>s?n:s,i=Number.parseInt(e.toFixed(r).replace(".","")),o=Number.parseInt(t.toFixed(r).replace(".",""));return i%o/10**r}var Ac=class e extends Ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ie.number){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_type,expected:ie.number,received:i.parsedType}),Be}let s,r=new Sn;for(let i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),ee(s,{code:j.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?Pue(t.data,i.value)!==0&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),ee(s,{code:j.not_finite,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,s,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:s,message:fe.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Ac.create=e=>new Ac({checks:[],typeName:De.ZodNumber,coerce:e?.coerce||!1,...ze(e)});var yc=class e extends Ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ie.bigint)return this._getInvalidInput(t);let s,r=new Sn;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),ee(s,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):st.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return ee(n,{code:j.invalid_type,expected:ie.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,s,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:s,message:fe.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};yc.create=e=>new yc({checks:[],typeName:De.ZodBigInt,coerce:e?.coerce??!1,...ze(e)});var Ec=class extends Ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ie.boolean){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.boolean,received:s.parsedType}),Be}return Un(t.data)}};Ec.create=e=>new Ec({typeName:De.ZodBoolean,coerce:e?.coerce||!1,...ze(e)});var vc=class e extends Ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ie.date){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_type,expected:ie.date,received:i.parsedType}),Be}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ee(i,{code:j.invalid_date}),Be}let s=new Sn,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),s.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),ee(r,{code:j.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),s.dirty()):st.assertNever(i);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};vc.create=e=>new vc({checks:[],coerce:e?.coerce||!1,typeName:De.ZodDate,...ze(e)});var Ol=class extends Ke{_parse(t){if(this._getType(t)!==ie.symbol){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.symbol,received:s.parsedType}),Be}return Un(t.data)}};Ol.create=e=>new Ol({typeName:De.ZodSymbol,...ze(e)});var bc=class extends Ke{_parse(t){if(this._getType(t)!==ie.undefined){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.undefined,received:s.parsedType}),Be}return Un(t.data)}};bc.create=e=>new bc({typeName:De.ZodUndefined,...ze(e)});var wc=class extends Ke{_parse(t){if(this._getType(t)!==ie.null){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.null,received:s.parsedType}),Be}return Un(t.data)}};wc.create=e=>new wc({typeName:De.ZodNull,...ze(e)});var Xo=class extends Ke{constructor(){super(...arguments),this._any=!0}_parse(t){return Un(t.data)}};Xo.create=e=>new Xo({typeName:De.ZodAny,...ze(e)});var Ki=class extends Ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Un(t.data)}};Ki.create=e=>new Ki({typeName:De.ZodUnknown,...ze(e)});var Fs=class extends Ke{_parse(t){let n=this._getOrReturnCtx(t);return ee(n,{code:j.invalid_type,expected:ie.never,received:n.parsedType}),Be}};Fs.create=e=>new Fs({typeName:De.ZodNever,...ze(e)});var Ul=class extends Ke{_parse(t){if(this._getType(t)!==ie.undefined){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.void,received:s.parsedType}),Be}return Un(t.data)}};Ul.create=e=>new Ul({typeName:De.ZodVoid,...ze(e)});var Xi=class e extends Ke{_parse(t){let{ctx:n,status:s}=this._processInputParams(t),r=this._def;if(n.parsedType!==ie.array)return ee(n,{code:j.invalid_type,expected:ie.array,received:n.parsedType}),Be;if(r.exactLength!==null){let o=n.data.length>r.exactLength.value,a=n.data.length<r.exactLength.value;(o||a)&&(ee(n,{code:o?j.too_big:j.too_small,minimum:a?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),s.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(ee(n,{code:j.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),s.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(ee(n,{code:j.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>r.type._parseAsync(new ps(n,o,n.path,a)))).then(o=>Sn.mergeArray(s,o));let i=[...n.data].map((o,a)=>r.type._parseSync(new ps(n,o,n.path,a)));return Sn.mergeArray(s,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}};Xi.create=(e,t)=>new Xi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...ze(t)});function Pl(e){if(e instanceof yr){let t={};for(let n in e.shape){let s=e.shape[n];t[n]=ds.create(Pl(s))}return new yr({...e._def,shape:()=>t})}else return e instanceof Xi?new Xi({...e._def,type:Pl(e.element)}):e instanceof ds?ds.create(Pl(e.unwrap())):e instanceof gi?gi.create(Pl(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>Pl(t))):e}var yr=class e extends Ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ie.object){let u=this._getOrReturnCtx(t);return ee(u,{code:j.invalid_type,expected:ie.object,received:u.parsedType}),Be}let{status:s,ctx:r}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Fs&&this._def.unknownKeys==="strip"))for(let u in r.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],p=r.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new ps(r,p,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Fs){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(u==="strict")a.length>0&&(ee(r,{code:j.unrecognized_keys,keys:a}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let p=r.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new ps(r,p,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let p=await l.key,h=await l.value;u.push({key:p,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>Sn.mergeObjectSync(s,u)):Sn.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,s)=>{let r=this._def.errorMap?.(n,s).message??s.defaultError;return n.code==="unrecognized_keys"?{message:fe.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:De.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let s of st.objectKeys(t))t[s]&&this.shape[s]&&(n[s]=this.shape[s]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let s of st.objectKeys(this.shape))t[s]||(n[s]=this.shape[s]);return new e({...this._def,shape:()=>n})}deepPartial(){return Pl(this)}partial(t){let n={};for(let s of st.objectKeys(this.shape)){let r=this.shape[s];t&&!t[s]?n[s]=r:n[s]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let s of st.objectKeys(this.shape))if(t&&!t[s])n[s]=this.shape[s];else{let i=this.shape[s];for(;i instanceof ds;)i=i._def.innerType;n[s]=i}return new e({...this._def,shape:()=>n})}keyof(){return eG(st.objectKeys(this.shape))}};yr.create=(e,t)=>new yr({shape:()=>e,unknownKeys:"strip",catchall:Fs.create(),typeName:De.ZodObject,...ze(t)});yr.strictCreate=(e,t)=>new yr({shape:()=>e,unknownKeys:"strict",catchall:Fs.create(),typeName:De.ZodObject,...ze(t)});yr.lazycreate=(e,t)=>new yr({shape:e,unknownKeys:"strip",catchall:Fs.create(),typeName:De.ZodObject,...ze(t)});var Ic=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s=this._def.options;function r(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Ar(a.ctx.common.issues));return ee(n,{code:j.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(s.map(async i=>{let o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(r);{let i,o=[];for(let c of s){let u={...n,common:{...n.common,issues:[]},parent:null},l=c._parseSync({data:n.data,path:n.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Ar(c));return ee(n,{code:j.invalid_union,unionErrors:a}),Be}}get options(){return this._def.options}};Ic.create=(e,t)=>new Ic({options:e,typeName:De.ZodUnion,...ze(t)});var Zi=e=>e instanceof Sc?Zi(e.schema):e instanceof fs?Zi(e.innerType()):e instanceof kc?[e.value]:e instanceof Rc?e.options:e instanceof Bc?st.objectValues(e.enum):e instanceof xc?Zi(e._def.innerType):e instanceof bc?[void 0]:e instanceof wc?[null]:e instanceof ds?[void 0,...Zi(e.unwrap())]:e instanceof gi?[null,...Zi(e.unwrap())]:e instanceof Qf||e instanceof Tc?Zi(e.unwrap()):e instanceof $c?Zi(e._def.innerType):[],zy=class e extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.object)return ee(n,{code:j.invalid_type,expected:ie.object,received:n.parsedType}),Be;let s=this.discriminator,r=n.data[s],i=this.optionsMap.get(r);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}):(ee(n,{code:j.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,s){let r=new Map;for(let i of n){let o=Zi(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(r.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);r.set(a,i)}}return new e({typeName:De.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...ze(s)})}};function bR(e,t){let n=fi(e),s=fi(t);if(e===t)return{valid:!0,data:e};if(n===ie.object&&s===ie.object){let r=st.objectKeys(t),i=st.objectKeys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=bR(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===ie.array&&s===ie.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=bR(o,a);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===ie.date&&s===ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Cc=class extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t),r=(i,o)=>{if(Vy(i)||Vy(o))return Be;let a=bR(i.value,o.value);return a.valid?((Gy(i)||Gy(o))&&n.dirty(),{status:n.value,value:a.data}):(ee(s,{code:j.invalid_intersection_types}),Be)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};Cc.create=(e,t,n)=>new Cc({left:e,right:t,typeName:De.ZodIntersection,...ze(n)});var hi=class e extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.array)return ee(s,{code:j.invalid_type,expected:ie.array,received:s.parsedType}),Be;if(s.data.length<this._def.items.length)return ee(s,{code:j.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&s.data.length>this._def.items.length&&(ee(s,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...s.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ps(s,o,s.path,a)):null}).filter(o=>!!o);return s.common.async?Promise.all(i).then(o=>Sn.mergeArray(n,o)):Sn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:De.ZodTuple,rest:null,...ze(t)})};var qy=class e extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.object)return ee(s,{code:j.invalid_type,expected:ie.object,received:s.parsedType}),Be;let r=[],i=this._def.keyType,o=this._def.valueType;for(let a in s.data)r.push({key:i._parse(new ps(s,a,s.path,a)),value:o._parse(new ps(s,s.data[a],s.path,a)),alwaysSet:a in s.data});return s.common.async?Sn.mergeObjectAsync(n,r):Sn.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,s){return n instanceof Ke?new e({keyType:t,valueType:n,typeName:De.ZodRecord,...ze(s)}):new e({keyType:Ko.create(),valueType:t,typeName:De.ZodRecord,...ze(n)})}},Fl=class extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.map)return ee(s,{code:j.invalid_type,expected:ie.map,received:s.parsedType}),Be;let r=this._def.keyType,i=this._def.valueType,o=[...s.data.entries()].map(([a,c],u)=>({key:r._parse(new ps(s,a,s.path,[u,"key"])),value:i._parse(new ps(s,c,s.path,[u,"value"]))}));if(s.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Be;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),a.set(u.value,l.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return Be;(u.status==="dirty"||l.status==="dirty")&&n.dirty(),a.set(u.value,l.value)}return{status:n.value,value:a}}}};Fl.create=(e,t,n)=>new Fl({valueType:t,keyType:e,typeName:De.ZodMap,...ze(n)});var Ml=class e extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.parsedType!==ie.set)return ee(s,{code:j.invalid_type,expected:ie.set,received:s.parsedType}),Be;let r=this._def;r.minSize!==null&&s.data.size<r.minSize.value&&(ee(s,{code:j.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&s.data.size>r.maxSize.value&&(ee(s,{code:j.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Be;l.status==="dirty"&&n.dirty(),u.add(l.value)}return{status:n.value,value:u}}let a=[...s.data.values()].map((c,u)=>i._parse(new ps(s,c,s.path,u)));return s.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Ml.create=(e,t)=>new Ml({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...ze(t)});var Hy=class e extends Ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.function)return ee(n,{code:j.invalid_type,expected:ie.function,received:n.parsedType}),Be;function s(a,c){return Tf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dl(),Yi].filter(u=>!!u),issueData:{code:j.invalid_arguments,argumentsError:c}})}function r(a,c){return Tf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Dl(),Yi].filter(u=>!!u),issueData:{code:j.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ea){let a=this;return Un(async function(...c){let u=new Ar([]),l=await a._def.args.parseAsync(c,i).catch(g=>{throw u.addIssue(s(c,g)),u}),p=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(p,i).catch(g=>{throw u.addIssue(r(p,g)),u})})}else{let a=this;return Un(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Ar([s(c,u.error)]);let l=Reflect.apply(o,this,u.data),p=a._def.returns.safeParse(l,i);if(!p.success)throw new Ar([r(l,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:hi.create(t).rest(Ki.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,s){return new e({args:t||hi.create([]).rest(Ki.create()),returns:n||Ki.create(),typeName:De.ZodFunction,...ze(s)})}},Sc=class extends Ke{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Sc.create=(e,t)=>new Sc({getter:e,typeName:De.ZodLazy,...ze(t)});var kc=class extends Ke{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:j.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}};kc.create=(e,t)=>new kc({value:e,typeName:De.ZodLiteral,...ze(t)});function eG(e,t){return new Rc({values:e,typeName:De.ZodEnum,...ze(t)})}var Rc=class e extends Ke{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),s=this._def.values;return ee(n,{expected:st.joinValues(s),received:n.parsedType,code:j.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),s=this._def.values;return ee(n,{received:n.data,code:j.invalid_enum_value,options:s}),Be}return Un(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(s=>!t.includes(s)),{...this._def,...n})}};Rc.create=eG;var Bc=class extends Ke{_parse(t){let n=st.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==ie.string&&s.parsedType!==ie.number){let r=st.objectValues(n);return ee(s,{expected:st.joinValues(r),received:s.parsedType,code:j.invalid_type}),Be}if(this._cache||(this._cache=new Set(st.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=st.objectValues(n);return ee(s,{received:s.data,code:j.invalid_enum_value,options:r}),Be}return Un(t.data)}get enum(){return this._def.values}};Bc.create=(e,t)=>new Bc({values:e,typeName:De.ZodNativeEnum,...ze(t)});var ea=class extends Ke{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.promise&&n.common.async===!1)return ee(n,{code:j.invalid_type,expected:ie.promise,received:n.parsedType}),Be;let s=n.parsedType===ie.promise?n.data:Promise.resolve(n.data);return Un(s.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ea.create=(e,t)=>new ea({type:e,typeName:De.ZodPromise,...ze(t)});var fs=class extends Ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:s}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:o=>{ee(s,o),o.fatal?n.abort():n.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let o=r.transform(s.data,i);if(s.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return Be;let c=await this._def.schema._parseAsync({data:a,path:s.path,parent:s});return c.status==="aborted"?Be:c.status==="dirty"?mc(c.value):n.value==="dirty"?mc(c.value):c});{if(n.value==="aborted")return Be;let a=this._def.schema._parseSync({data:o,path:s.path,parent:s});return a.status==="aborted"?Be:a.status==="dirty"?mc(a.value):n.value==="dirty"?mc(a.value):a}}if(r.type==="refinement"){let o=a=>{let c=r.refinement(a,i);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(s.common.async===!1){let a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?Be:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(a=>a.status==="aborted"?Be:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(r.type==="transform")if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Zo(o))return Be;let a=r.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>Zo(o)?Promise.resolve(r.transform(o.value,i)).then(a=>({status:n.value,value:a})):Be);st.assertNever(r)}};fs.create=(e,t,n)=>new fs({schema:e,typeName:De.ZodEffects,effect:t,...ze(n)});fs.createWithPreprocess=(e,t,n)=>new fs({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...ze(n)});var ds=class extends Ke{_parse(t){return this._getType(t)===ie.undefined?Un(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ds.create=(e,t)=>new ds({innerType:e,typeName:De.ZodOptional,...ze(t)});var gi=class extends Ke{_parse(t){return this._getType(t)===ie.null?Un(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};gi.create=(e,t)=>new gi({innerType:e,typeName:De.ZodNullable,...ze(t)});var xc=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s=n.data;return n.parsedType===ie.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};xc.create=(e,t)=>new xc({innerType:e,typeName:De.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});var $c=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Nl(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ar(s.common.issues)},input:s.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ar(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};$c.create=(e,t)=>new $c({innerType:e,typeName:De.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});var Ll=class extends Ke{_parse(t){if(this._getType(t)!==ie.nan){let s=this._getOrReturnCtx(t);return ee(s,{code:j.invalid_type,expected:ie.nan,received:s.parsedType}),Be}return{status:"valid",value:t.data}}};Ll.create=e=>new Ll({typeName:De.ZodNaN,...ze(e)});var Oue=Symbol("zod_brand"),Qf=class extends Ke{_parse(t){let{ctx:n}=this._processInputParams(t),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}},_f=class e extends Ke{_parse(t){let{status:n,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?Be:i.status==="dirty"?(n.dirty(),mc(i.value)):this._def.out._parseAsync({data:i.value,path:s.path,parent:s})})();{let r=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return r.status==="aborted"?Be:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:s.path,parent:s})}}static create(t,n){return new e({in:t,out:n,typeName:De.ZodPipeline})}},Tc=class extends Ke{_parse(t){let n=this._def.innerType._parse(t),s=r=>(Zo(r)&&(r.value=Object.freeze(r.value)),r);return Nl(n)?n.then(r=>s(r)):s(n)}unwrap(){return this._def.innerType}};Tc.create=(e,t)=>new Tc({innerType:e,typeName:De.ZodReadonly,...ze(t)});function YV(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function tG(e,t={},n){return e?Xo.create().superRefine((s,r)=>{let i=e(s);if(i instanceof Promise)return i.then(o=>{if(!o){let a=YV(t,s),c=a.fatal??n??!0;r.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=YV(t,s),a=o.fatal??n??!0;r.addIssue({code:"custom",...o,fatal:a})}}):Xo.create()}var Uue={object:yr.lazycreate},De;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(De||(De={}));var Fue=(e,t={message:`Input not instance of ${e.name}`})=>tG(n=>n instanceof e,t),nG=Ko.create,rG=Ac.create,Mue=Ll.create,Lue=yc.create,sG=Ec.create,jue=vc.create,Vue=Ol.create,Gue=bc.create,zue=wc.create,que=Xo.create,Hue=Ki.create,Jue=Fs.create,Wue=Ul.create,Yue=Xi.create,Zue=yr.create,Kue=yr.strictCreate,Xue=Ic.create,ele=zy.create,tle=Cc.create,nle=hi.create,rle=qy.create,sle=Fl.create,ile=Ml.create,ole=Hy.create,ale=Sc.create,cle=kc.create,ule=Rc.create,lle=Bc.create,dle=ea.create,ple=fs.create,fle=ds.create,hle=gi.create,gle=fs.createWithPreprocess,mle=_f.create,Ale=()=>nG().optional(),yle=()=>rG().optional(),Ele=()=>sG().optional(),vle={string:(e=>Ko.create({...e,coerce:!0})),number:(e=>Ac.create({...e,coerce:!0})),boolean:(e=>Ec.create({...e,coerce:!0})),bigint:(e=>yc.create({...e,coerce:!0})),date:(e=>vc.create({...e,coerce:!0}))};var ble=Be;var iG=["playwright","pytest","robot","junit","vitest","jest","mocha","go","rspec","jasmine"];var oG="skyramp_session_storage.json";var wR;(function(e){e.PYTHON="python",e.TYPESCRIPT="typescript",e.JAVASCRIPT="javascript",e.JAVA="java"})(wR||(wR={}));var mi;(function(e){e.SMOKE="smoke",e.FUZZ="fuzz",e.CONTRACT="contract",e.LOAD="load",e.INTEGRATION="integration",e.E2E="e2e",e.UI="ui",e.UNIT="unit",e.UNKNOWN="unknown"})(mi||(mi={}));var kQe=[mi.CONTRACT,mi.INTEGRATION,mi.E2E,mi.UI];var aG;(function(e){e.Rest="rest",e.Grpc="grpc",e.Kafka="kafka"})(aG||(aG={}));var Jy;(function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.HEAD="HEAD",e.OPTIONS="OPTIONS"})(Jy||(Jy={}));var Df;(function(e){e.LOCAL="local",e.DOCKER="docker",e.KUBERNETES="k8s"})(Df||(Df={}));var wle=Ce.nativeEnum(Df),Ile=Ce.preprocess(e=>e==="kubernetes"?Df.KUBERNETES:e,wle);var Cle=Ce.object({language:Ce.nativeEnum(wR).describe("Programming language for the generated test (default: python). Must be one of: python, typescript, javascript, java"),framework:Ce.string().describe(`Testing framework to use. Supported: ${iG.join(", ")} (e.g. pytest for python, playwright/vitest/jest for js/ts, junit for java).`)}),cG=Ce.object({...Cle.shape,deployDashboard:Ce.boolean().default(!1).describe("Whether to deploy the Skyramp dashboard for test monitoring"),runtime:Ile.default(Df.LOCAL).describe("Runtime environment (local, docker, or k8s; accepts kubernetes as an alias)"),dockerNetwork:Ce.string().default("").describe("Docker network name to use for containerized testing"),dockerWorkerPort:Ce.number().int().min(0).max(65535).default(0).describe("Port number for the Docker worker service"),k8sNamespace:Ce.string().default("").describe("Kubernetes namespace for deployment"),k8sConfig:Ce.string().default("").describe("Path to Kubernetes configuration file"),k8sContext:Ce.string().default("").describe("Kubernetes context to use"),authHeader:Ce.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:Ce.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:Ce.boolean().default(!1).describe("Whether to allow insecure SSL connections for HTTPS endpoints"),output:Ce.string().optional().refine(e=>!e||e===""?!0:[".py",".ts",".js",".java"].some(n=>e.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:Ce.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:Ce.boolean().default(!0).describe("Whether to overwrite existing files in the output directory"),mockPort:Ce.number().int().min(0).max(65535).default(0).describe("Port number for the mock server"),optionalFields:Ce.boolean().default(!1).describe("Whether to include optional fields in the generated test/mock"),prompt:Ce.string().describe("The prompt user provided to generate the test")}),RQe=Ce.object({playwrightInput:Ce.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:Ce.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:Ce.string().optional().describe(`Path to SAVE Playwright session storage after trace collection. Omit this argument to use the default \u2014 \`${oG}\` resolved against the active outputDir, which produces an absolute path like '/abs/outputDir/${oG}'. 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:Ce.union([Ce.enum(["","hd","full-hd","2k"]),Ce.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:Ce.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:Ce.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.")}),BQe=Ce.object({trace:Ce.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:Ce.array(Ce.string()).default([]).describe("List of endpoints or patterns to include in test generation."),exclude:Ce.array(Ce.string()).default([]).describe("List of endpoints or patterns to exclude from test generation."),...cG.shape}),xQe={endpointURL:Ce.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:Ce.union([Ce.nativeEnum(Jy),Ce.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:Ce.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:Ce.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:Ce.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:Ce.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for form data parameters"),requestData:Ce.string().default("").refine(e=>{if(!e||e===""||e.startsWith("@"))return!0;try{return JSON.parse(e),!0}catch{}let t=e.trim();return!!(t.startsWith("---")||/^\w[\w\s]*:/.test(t)||t.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:Ce.string().default("").refine(e=>!e||/^[1-5]\d{2}$/.test(e),{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"),...cG.shape},$Qe=Ce.object({codeReuse:Ce.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:Ce.boolean().default(!1).describe("Whether to modularize the code")}),TQe=[mi.INTEGRATION,mi.CONTRACT,mi.UI];var Wy;(function(e){e.Bug="bug",e.Lint="lint",e.Type="type",e.Config="config"})(Wy||(Wy={}));var Yy;(function(e){e.NotMapped="not-mapped",e.DemotedByVerify="demoted-by-verify"})(Yy||(Yy={}));var Zy;(function(e){e.Passed="passed",e.Failed="failed",e.SkippedNoPom="skipped-no-pom"})(Zy||(Zy={}));var IR;(function(e){e.Passed="passed",e.Failed="failed",e.NoUtilsFile="no-utils-file"})(IR||(IR={}));On();var Ky=e=>`${e} POM call${e===1?"":"s"}`,uG=(e,t)=>e===1?`1 ${t} test`:`${e} ${t} tests`,Xy={listSeparator:", ",testRecommendationsImplementedHeader:(e,t)=>`\u{1F4A1} Test Recommendations Implemented (${e} test${e===1?"":"s"}${t>e?`, ${t} cases`:""})`,testTypeCellLabels:{},statusLabels:{},severityLabels:{},reuse:{label:"POM reuse",noPomLayer:"skipped \u2014 no page-object layer detected for this test",reusedAndVerified:e=>`${Ky(e)} reused and verified`,reusedThenVerified:(e,t)=>`${Ky(e)} reused, ${t} of them verified`,reused:e=>`${Ky(e)} reused`,verified:e=>`${Ky(e)} verified`,unresolved:e=>`${e} not resolvable to POM source (informational, not declines)`,candidates:e=>`${e} candidate POM file${e===1?"":"s"} detected`,verificationPassed:"verification passed",verificationFailed:"\u26A0\uFE0F verification did not pass",keptInline:e=>`kept inline: ${e}`,gate:{"not-mapped":"not mapped","demoted-by-verify":"demoted by verification"}},testMaintenanceHeader:e=>`\u2705 Test Maintenance (${e})`,maintenanceTableHeader:"| Test Type | Endpoint | File | Change | Before | After |",testResultsHeader:e=>`\u{1F9EA} Test Results (${e})`,columnVideo:"Video",videoDownloadLink:e=>`[\u{1F4F9} download](${e})`,videosArtifactFallback:e=>`\u{1F4F9} Recorded UI test videos: [download from run artifacts](${e})`,issuesFoundHeader:e=>`\u26A0\uFE0F Issues Found (${e})`,configErrorsHeader:"\u2699\uFE0F Configuration Errors",nextStepsHeader:"### \u{1F4A1} Next Steps",caveatsHeader:"### \u26A0\uFE0F What this run could not prove",rows:{passed:e=>e?"passed against the running app":"passed",notRun:e=>e?"not run against a live app this run":"not run this run",failedBug:e=>e?"failed against the running app":"failed",failedTest:e=>`failed \u2014 the test is at fault, not the app (${e})`,executedOf:(e,t)=>t?` and executed ${e} of them against the running app.`:` and executed ${e} of them.`,noneExecuted:e=>e?"; none were executed against a live app this run.":"; none were executed this run.",staleResult:"From a run before this file's last change, not of the delivered test:"},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.",missingSecret:e=>`The app could not be started this run: it needs ${e}, which this run had no value for. 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.",findingsNotVerified:e=>`No test result confirms or refutes the suspected defects at ${e}.`,failedAlone:e=>`These tests passed in the session but failed when Testbot ran them alone, so their results are not final: ${e}.`,missingCaseResults:(e,t)=>{let n=t?` Latest run: ${t}`:"";return`No final result was recorded for written cases: ${e}.${n}`},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:e=>`${e} was mocked rather than really deployed \u2014 a green run against it is not proof.`,finalizeNotReady:e=>`The tests are not ready to merge as they stand${e?`: ${e}`:"."}`,ciNotCovered:"No CI workflow runs these tests, so they will not execute on future pull requests.",ciNotCoveredBecause:e=>`The repo's CI will not run some of these tests on future pull requests: ${e}`,guardedEntryCi:(e,t)=>`${e} is Testbot's guarded entry for the Test Environment: CI runs it with \`node --test ${e}\` from a package that declares @skyramp/testbot-core ${t}. It makes no request to Testbot, so its CI job needs no \`id-token: write\` permission and no TESTBOT_POLICY_ORIGIN.`,ciUnconfirmed:e=>`Testbot could not confirm that the repo's CI collects ${e}: check that CI runs them.`,ciUnconfirmedAbsent:e=>`Testbot could not confirm that the repo's CI leaves out ${e}, which need services it does not start: check that CI does not run them.`,ciNotIntegrated:e=>`Not yet CI-integrated: ${e} need services the repo's CI does not start, so Testbot put them where CI does not run them. The CI notes say what to change to run them in CI.`,ciUnprovisioned:e=>`The repo's CI runs ${e} without starting what they need, so CI will fail on them until it starts those services.`,ciWithheld:e=>`Not in the tests PR: the repo's CI would run ${e} without starting what they need, which would fail CI. The CI notes say what to change to run them.`,ciResultsUnread:e=>`Testbot could not read the CI results of ${e}, so no CI result there counted as evidence.`,browserSuiteReadOnly:(e,t)=>`${e} has a browser suite, but this run could not write there, so its ui tests are in ${t}.`,sutNotRequired:"No app was started: validation triage found no deployed behavior this change needs validated.",lintNotCovered:e=>`The repo's linter does not check ${e} \u2014 a style or type issue there would not be caught automatically.`,lintNotRun:e=>`The repo's linter did not check the test files, so they were delivered unlinted: ${e}.`,analysisUnverified:e=>`Part of the change analysis could not be verified (${e} unresolved check${e===1?"":"s"}); the tests were planned treating those claims as unconfirmed.`,unitTestsNotRun:e=>`Testbot could not run the unit tests it selected, so no unit result here is its own re-run: ${e}`,componentsNotTested:e=>`Not tested: changed parts of the code the plan did not test. ${e}`,componentsWithoutReason:e=>`The plan gave no reason for leaving out: ${e}.`,targetNotesDeviation:e=>`Tests were not put where the Target notes say tests go: ${e}`,appRestarted:e=>`Testbot's health check for the application under test failed during the run. Testbot restarted it with its recorded setup before running tests alone: ${e}`,testSettingsDiffer:e=>`Verified under other settings than the repository's own test command uses, so the repository's build may treat these tests differently: ${e}.`,stageSalvaged:(e,t)=>t.length===1?`The ${e} step kept what it had produced although its ${t[0]} check still failed after a repair, so treat that output as unconfirmed by it.`:`The ${e} step kept what it had produced although ${t.length} of its checks (${t.join(", ")}) still failed after a repair, so treat that output as unconfirmed by them.`,downstreamNotChecked:e=>`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. ${e}`,browserBuildNotDeclared:(e,t,n)=>`Another browser build stood in for ${t}, the build the Playwright in ${e} declares (it links to another build), so its browser tests' results here may not match its CI. Its CI needs \`${n}\` there.`,resultsNotOfDeliveredTests:e=>`These test files were changed after their last run, so their results here are from an earlier version, not the delivered tests: ${e}.`,videoMissing:e=>`No video was recorded for these browser tests, so their results here have no video to watch: ${e}.`,testsCouldNotRunHere:(e,t)=>`${e} ${e===1?"test exists":"tests exist"} in this change, but this environment could not run ${e===1?"it":"them"}, so ${e===1?"it has":"they have"} no result here (not skipped): ${t}`,modelProviderDenied:(e,t=!1)=>t?`${e}, the model provider, refused a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${e}, 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.`,stageInterruptedByProvider:(e,t)=>`${t}, the model provider, interrupted the ${e} step. Testbot kept what that step had produced.`,planInterruptedByProvider:(e,t)=>`${e}, the model provider, interrupted planning. Testbot kept the plan it had and reports the test results it obtained.`+(t?" Please try again later.":""),modelProviderUnavailable:(e,t=!1)=>t?`${e}, the model provider, was unavailable for a call. The evidence already obtained is sufficient to determine this run\u2019s outcome.`:`${e}, 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.`,dataSafetyBrowserClean:"This run used a shared environment. Testbot's browser ran under a data-safety guard, which let it change only the records it created and deleted them afterwards.",dataSafetyNoBrowser:"This run used a shared environment. Testbot did not use its browser.",dataSafetyInvalidConfig:"The shared environment's data-safety configuration is invalid: see the gaps.",dataSafetyGuardCheckFailed:"Testbot could not verify the browser data-safety guard: see the gaps.",dataSafetyGuardUnconfirmed:"This run used a shared environment. Testbot used its browser, but the data-safety guard could not be confirmed active: see the gaps.",dataSafetyBrowserLeftovers:"This run used a shared environment. Testbot's browser ran under a data-safety guard, which let it change only the records it created, but not every record it created was deleted: see the gaps.",dataSafetyBrowserWithheld:"This run used a shared environment. Testbot did not use its browser: the Skyramp MCP server has no data-safety guard.",dataSafetyGuardUnavailable:"No data-safety guard could be loaded, so Testbot's proxy refused every request to the shared environment from probes, tests and other commands, and Testbot ran no test against it.",dataSafetyPlanOnly:"This run produced a plan for a shared environment. No runtime probes or tests were requested.",dataSafetyOffLimitsRulesOnly:"Off-limits requests from probes and executed tests are restricted by instruction only. Testbot does not enforce those requests.",dataSafetyAuthCreates:e=>`The agent's browser sent sign-in or sign-up requests: ${e}. The data-safety guard lets these through and does not delete what they create, for example a new account.`,dataSafetyProxyOffLimitsRulesOnly:"Off-limits requests from the unguarded clients listed above are restricted by instruction only. Testbot does not enforce those requests.",dataSafetyRulesOnly:"For probes and tests outside the guarded browser, cleanup is required by instruction only.",dataSafetyProxy:(e,t)=>`The ${e} went through Testbot's data-safety proxy. Not guarded, and held to deleting what they create by instruction only: ${t}.`,dataSafetyIsolationEnforced:()=>"Probe and test commands could reach the shared environment only through Testbot's data-safety guard.",playwrightNotRouted:(e,t)=>`Testbot sends Playwright's API request client (the request fixture, page.request and request.newContext) through its data-safety guard only for Playwright ${t}. This checkout has Playwright ${e}, so those requests could not reach the shared environment.`,dataSafetyIsolationRefused:"Some checks could not run with the shared-environment protection in place. Testbot did not run them without it.",dataSafetyProxyAuthCreates:e=>`The plan probes or the tests sent sign-in or sign-up requests: ${e}. The data-safety proxy lets these through and does not track what they create, for example a new account.`,dataSafetyNoClientCertificate:(e,t)=>`${e} refused a request through Testbot's data-safety proxy with a Cloudflare challenge or at the TLS handshake. The proxy may be the cause, not the certificate: it ends TLS itself, it sent no client certificate to that host, and it sends one only when ${t} names the host.`,dataSafetyGuardedProbes:"plan probes",dataSafetyGuardedTests:"test runs",dataSafetyAnd:" and ",dataSafetyCleanupConfirmed:"Testbot ran each test's declared cleanup, and each succeeded.",dataSafetyLeftRecords:e=>`These tests declare records they cannot delete from the shared environment: ${e}.`,dataSafetyCleanupFailed:e=>`The cleanup of ${e} failed: what they created may still be in the shared environment.`,dataSafetyCleanupUnknown:e=>`The cleanup of ${e} is not known: Testbot did not check their cleanup.`,dataSafetyKeptRecords:(e,t)=>`The tests kept these records in the shared environment under the permission to keep test data (environment ${e}, policy revision ${t})`},isolationReport:{rationale:"Testbot could not run this validation inside the shared-environment isolation it requires, so it did not validate the change.",gap:e=>`Shared-environment isolation unavailable: ${e}`,nextStep:"Fix what the gap names, then run the validation again.",nextStepPackageSource:"Run the validation again later, when the Ubuntu package source is available again. Nothing on this host or in the repository needs a change."},nextSteps:{componentMismatch:(e,t,n,s)=>`${e} (${t}) in the Test Environment runs ${n}, which does not contain ${s}, the commit this run validates.`,componentUnverified:(e,t,n,s)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${s}, the commit this run validates: it reports ${n}.`,componentUnread:(e,t,n)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${n}, the commit this run validates: it has no record of which commit that component runs.`,deployCommit:(e,t)=>`Deploy ${t} of ${e} to the Test Environment and run Testbot again: until it runs that commit, tests there do not validate this change.`,addSecret:(e,t)=>`Add ${t?"a secret":"secrets"} named ${e} on the workflow host, as a GitHub Actions secret or, on Azure DevOps, a secret variable in the host repository's skyramp-testbot variable group under Pipelines \u203A Library. Then add ${t?"it":"them"} under Credentials on the Target's Setup page, and run Testbot again: a run's workflow passes Testbot only the Target's credentials, each from the workflow host's secret it is mapped to, and the app cannot start without ${t?"it":"them"}. Testbot does not make up a value.`},providerOutageHeadline:(e,t)=>`Testbot could not reach ${e} \u2014 it tried ${t} times without success.`,providerOutageActionStatusPage:e=>`Check ${e}. Once the service is healthy, re-run this workflow from its run page in the Actions tab.`,providerRateLimitHeadline:e=>`Testbot was rate-limited by ${e} (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:e=>`The account behind ${e} 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:e=>`The credential Testbot uses to reach ${e} 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:e=>`Testbot ran past its ${e}-minute time limit and was stopped.`,providerTimeoutAction:"Raise the `testbotTimeout` input on the workflow if runs on this repository legitimately need longer.",staged:{testsSourcePullRequest:e=>`Tests for source pull request ${e}`,validatedTogether:e=>`Pull requests validated together: ${e}`,requestedByPerson:e=>`Requested by ${e}`,requestedByPolicy:e=>`Started by the Validation Policy ${e}`,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:e=>`> \u26A0\uFE0F **No live app (SUT) was available this run** \u2014 the ${e} 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:(e,t,n)=>`**${e}**: ${t} unit test${t===1?"":"s"}${n?` for ${n}`:""}`,addedToExistingFile:"added to an existing test file",testPackagesHeader:"### \u{1F4E6} Running these tests",testPackageLine:(e,t,n="")=>`\`${e}/\` is a self-contained test package Skyramp Testbot owns and maintains, with its own manifest, lockfile and runner config.${n?` This run added it, with ${n}, installed in that package only.`:""} Run it with \`${t}\` while the app is running; to run it on every pull request, add that command to a CI job that has the app running.`,appManifestsUntouched:"The application's own manifests and lockfiles were not changed.",dependencyChangesHeader:"### \u{1F4E6} Changes to the application's dependencies",dependencyChangeLine:(e,t,n)=>`Added \`${e}\` to \`${t}\` (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:(e,t)=>`Trusted CI check ${e} passed${t?` on ${t}`:""}, 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:(e,t,n)=>`${e}/${t} passed${n?`, ${n} skipped`:""}`,behaviourCoverageHeader:"\u{1F517} Behaviour Coverage",coverageCaption:(e,t,n,s)=>` (${e} generated \xB7 ${t} modified \xB7 ${n} verified \xB7 ${s} executed)`,coverageTableHeader:"| Behaviour | Source | Tested By | Maintained By |",writtenNotRun:"written, not run",issuesFoundHeader:"\u26A0\uFE0F Issues Found",requirementsHeader:(e,t)=>`\u{1F4CB} Requirements (${e}/${t} clauses pass)`,requirementsTableHeader:"| Requirement | Clause | Tests | Result |",requirementsSummaryTableHeader:"| Requirement | Clauses passing | Not passing |",clauseStatuses:{},regressionGuard:" (regression guard)",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:e=>e?`${e} hook`:"commit hook",commitRefusedByHook:(e,t)=>`Your repository's ${e} rejected the generated-test commit, so no Testbot PR was created. Hook error: \`${t}\`.`,commitHookCouldNotRun:(e,t)=>`Your repository's ${e} could not run, so no Testbot PR was created: a command it calls is not installed on the runner. Hook error: \`${t}\`.`,maintenanceActions:{},stoppedEarly:(e,t)=>`> \u26A0\uFE0F Run stopped early \u2014 ${e}. The results below are partial.${t}`,viewInSkyramp:e=>` [View in Skyramp](${e})`,testsPr:{summaryHeader:"### Summary",targets:"The tests target:",moreItems:e=>`and ${e} more`,counts:(e,t)=>`${uG(e,"new")} and ${uG(t,"maintained")}.`,types:e=>`Test types: ${e}.`,statusHeader:"### Validation status",noChange:"\u2139\uFE0F Nothing changed since the baseline.",noTestRan:"No test ran, and no existing evidence was accepted.",noLiveApp:"No live app (SUT) was available, so the tests were not run.",resultCounts:(e,t,n)=>`Test results: ${e} passed, ${t} failed, ${n} not run.`,limitations:"Important failures and limitations:",verdict:e=>`The run's verdict is in [Run details](${e}).`,runningHeader:"### Running the tests",environment:e=>`The tests read these environment variables, which the job that runs them must set: ${e}.`,filesChanged:"Review each test in the **Files changed** tab."},descriptionCut:(e,t,n)=>`_\u2026 The rest is left out${t===void 0?", with more test results":t?`, with ${t} more test result${t===1?"":"s"}`:""}: Azure DevOps takes at most ${e} characters.${n?` [Full report](${n})`:""}_`,testsReplaced:(e,t,n)=>[t?`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${e}), commit \`${t}\`.`:`Skyramp Testbot replaced the tests on this pull request with the tests of [this run](${e}).`,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:e=>`Unable to contact the Skyramp web app at ${e}. Please try again later.`,couldNotStart:e=>`Skyramp Testbot could not start: ${e}`,assembledAfterFailedChecks:e=>`> \u26A0\uFE0F This report was assembled automatically after the write-up step failed its checks; ${e} check(s) remain unmet \u2014 see the run log for details.`,testbotPrLine:(e,t,n)=>`Testbot PR${e?` (${e})`:""} : [${t}](${n})`,viewRun:e=>`_[View run](${e})_`,testsPrNotOpened:(e,t)=>`The tests PR could not be opened (${e}); the tests were pushed to branch \`${t}\`.`,testsNotDelivered:e=>`The tests could not be delivered: ${e}`,testsPinnedNotDelivered:(e,t,n)=>`${e}: ${t} ${t===1?"test":"tests"} written, ${n} maintained. The repository is pinned to a commit, so these changes were not delivered.`,testsNotPushed:(e,t)=>`The tests could not be pushed (${e}); they remain on the local branch \`${t}\`.`,testsPrRetargeted:e=>`The dev PR merged while tests were being generated \u2014 the tests PR targets its base branch${e?` (\`${e}\`)`:""} instead.`,testsPrUnchanged:"This push required no new test changes; the tests PR below is from an earlier run and was left as is.",committedNoPr:e=>`The tests were committed but no PR was opened: ${e}.`,testsHeldBack:(e,t,n,s)=>`${e?"Delivery partial":"Delivery failed: no tests were delivered"}. These test files need a pull request that is not on ${t} yet, so they were held back: ${n}. Their changes are in the run artifact's ${s}.`,testsNotProposed:e=>`The tests were not proposed in a pull request: ${e}.`}};var lG={testRecommendationsImplementedHeader:(e,t)=>`\u{1F4A1} \u5B9F\u88C5\u3057\u305F\u30C6\u30B9\u30C8\u63A8\u5968\uFF08\u30C6\u30B9\u30C8 ${e}\u4EF6${t>e?`\u3001\u30B1\u30FC\u30B9 ${t}\u4EF6`:""}\uFF09`,listSeparator:"\u3001",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:e=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u518D\u5229\u7528\u30FB\u691C\u8A3C\u6E08\u307F`,reusedThenVerified:(e,t)=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u518D\u5229\u7528\uFF08\u3046\u3061 ${t} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F\uFF09`,reused:e=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u518D\u5229\u7528`,verified:e=>`POM \u547C\u3073\u51FA\u3057 ${e} \u4EF6\u3092\u691C\u8A3C\u6E08\u307F`,unresolved:e=>`${e} \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:e=>`\u5019\u88DC\u3068\u306A\u308B POM \u30D5\u30A1\u30A4\u30EB ${e} \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:e=>`\u30A4\u30F3\u30E9\u30A4\u30F3\u306E\u307E\u307E: ${e}`,gate:{"not-mapped":"\u30DE\u30C3\u30D4\u30F3\u30B0\u5BFE\u8C61\u5916","demoted-by-verify":"\u691C\u8A3C\u3067\u5DEE\u3057\u623B\u3057"}},testMaintenanceHeader:e=>`\u2705 \u30C6\u30B9\u30C8\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\uFF08${e}\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:e=>`\u{1F9EA} \u30C6\u30B9\u30C8\u7D50\u679C\uFF08${e}\u4EF6\uFF09`,columnVideo:"\u30D3\u30C7\u30AA",videoDownloadLink:e=>`[\u{1F4F9} \u30C0\u30A6\u30F3\u30ED\u30FC\u30C9](${e})`,videosArtifactFallback:e=>`\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](${e})`,issuesFoundHeader:e=>`\u26A0\uFE0F \u691C\u51FA\u3055\u308C\u305F\u554F\u984C\uFF08${e}\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:e=>e?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u6210\u529F\u3057\u307E\u3057\u305F":"\u6210\u529F\u3057\u307E\u3057\u305F",notRun:e=>e?"\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:e=>e?"\u8D77\u52D5\u4E2D\u306E\u30A2\u30D7\u30EA\u306B\u5BFE\u3057\u3066\u5931\u6557\u3057\u307E\u3057\u305F":"\u5931\u6557\u3057\u307E\u3057\u305F",failedTest:e=>`\u5931\u6557\u3057\u307E\u3057\u305F \u2014 \u30A2\u30D7\u30EA\u3067\u306F\u306A\u304F\u30C6\u30B9\u30C8\u306B\u554F\u984C\u304C\u3042\u308A\u307E\u3059\uFF08${e}\uFF09`,executedOf:(e,t)=>t?`\u3001\u305D\u306E\u3046\u3061 ${e} \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 ${e} \u4EF6\u3092\u5B9F\u884C\u3057\u307E\u3057\u305F\u3002`,noneExecuted:e=>e?"\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",staleResult:"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u6700\u5F8C\u306E\u5909\u66F4\u3088\u308A\u524D\u306E\u5B9F\u884C\u306E\u7D50\u679C\u3067\u3001\u63D0\u51FA\u3057\u305F\u30C6\u30B9\u30C8\u306E\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093:"},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",missingSecret:e=>`\u3053\u306E\u5B9F\u884C\u3067\u306F\u30A2\u30D7\u30EA\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u8D77\u52D5\u306B\u306F ${e} \u304C\u5FC5\u8981\u3067\u3059\u304C\u3001\u3053\u306E\u5B9F\u884C\u306B\u306F\u5024\u304C\u3042\u308A\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",findingsNotVerified:e=>`\u6B21\u306E\u7B87\u6240\u306E\u7591\u308F\u3057\u3044\u6B20\u9665\u3092\u78BA\u8A8D\u307E\u305F\u306F\u5426\u5B9A\u3059\u308B\u30C6\u30B9\u30C8\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093: ${e}\u3002`,failedAlone:e=>`\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306F\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306F\u6210\u529F\u3057\u307E\u3057\u305F\u304C\u3001Testbot \u304C\u5358\u72EC\u3067\u5B9F\u884C\u3059\u308B\u3068\u5931\u6557\u3057\u305F\u305F\u3081\u3001\u7D50\u679C\u306F\u78BA\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093: ${e}\u3002`,missingCaseResults:(e,t)=>{let n=t?` \u6700\u65B0\u306E\u5B9F\u884C: ${t}`:"";return`\u4F5C\u6210\u3057\u305F\u30B1\u30FC\u30B9\u306E\u6700\u7D42\u7D50\u679C\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: ${e}\u3002${n}`},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:e=>`${e} \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:e=>`\u30C6\u30B9\u30C8\u306F\u73FE\u72B6\u3067\u306F\u30DE\u30FC\u30B8\u53EF\u80FD\u306A\u72B6\u614B\u3067\u306F\u3042\u308A\u307E\u305B\u3093${e?`: ${e}`:"\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:e=>`\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: ${e}`,guardedEntryCi:(e,t)=>`${e} \u306F Test Environment \u5411\u3051\u306E Testbot \u306E\u30AC\u30FC\u30C9\u4ED8\u304D\u30A8\u30F3\u30C8\u30EA\u3067\u3059\u3002CI \u3067\u306F @skyramp/testbot-core ${t} \u3092\u5BA3\u8A00\u3057\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u304B\u3089 \`node --test ${e}\` \u3067\u5B9F\u884C\u3057\u307E\u3059\u3002Testbot \u3078\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u884C\u308F\u306A\u3044\u305F\u3081\u3001\u305D\u306E CI \u30B8\u30E7\u30D6\u306B \`id-token: write\` \u6A29\u9650\u3068 TESTBOT_POLICY_ORIGIN \u306F\u4E0D\u8981\u3067\u3059\u3002`,ciUnconfirmedAbsent:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u304C ${e} \u3092\u5B9F\u884C\u3057\u306A\u3044\u3053\u3068\u3092 Testbot \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3053\u308C\u3089\u306F CI \u304C\u8D77\u52D5\u3057\u306A\u3044\u30B5\u30FC\u30D3\u30B9\u3092\u5FC5\u8981\u3068\u3057\u307E\u3059\u3002CI \u3067\u5B9F\u884C\u3055\u308C\u306A\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,ciUnconfirmed:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u304C ${e} \u3092\u53CE\u96C6\u3059\u308B\u3053\u3068\u3092 Testbot \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002CI \u3067\u5B9F\u884C\u3055\u308C\u308B\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,ciNotIntegrated:e=>`CI \u672A\u7D71\u5408: ${e} \u306F\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u304C\u8D77\u52D5\u3057\u306A\u3044\u30B5\u30FC\u30D3\u30B9\u3092\u5FC5\u8981\u3068\u3059\u308B\u305F\u3081\u3001Testbot \u306F CI \u304C\u5B9F\u884C\u3057\u306A\u3044\u5834\u6240\u306B\u914D\u7F6E\u3057\u307E\u3057\u305F\u3002CI \u3067\u5B9F\u884C\u3059\u308B\u305F\u3081\u306E\u5909\u66F4\u306F CI \u30CE\u30FC\u30C8\u306B\u8A18\u8F09\u3057\u3066\u3044\u307E\u3059\u3002`,ciWithheld:e=>`\u30C6\u30B9\u30C8 PR \u306B\u542B\u3081\u3066\u3044\u307E\u305B\u3093: \u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u306F ${e} \u3092\u5FC5\u8981\u306A\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u305B\u305A\u306B\u5B9F\u884C\u3059\u308B\u305F\u3081\u3001CI \u304C\u5931\u6557\u3057\u307E\u3059\u3002CI \u3067\u5B9F\u884C\u3059\u308B\u305F\u3081\u306E\u5909\u66F4\u306F CI \u30CE\u30FC\u30C8\u306B\u8A18\u8F09\u3057\u3066\u3044\u307E\u3059\u3002`,ciUnprovisioned:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E CI \u306F ${e} \u3092\u5FC5\u8981\u306A\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u305B\u305A\u306B\u5B9F\u884C\u3059\u308B\u305F\u3081\u3001\u305D\u308C\u3089\u306E\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u3059\u308B\u307E\u3067 CI \u306F\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u3067\u5931\u6557\u3057\u307E\u3059\u3002`,ciResultsUnread:e=>`Testbot \u306F ${e} \u306E CI \u7D50\u679C\u3092\u8AAD\u307F\u53D6\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u305D\u3053\u3067\u306E CI \u7D50\u679C\u306F\u8A3C\u62E0\u3068\u3057\u3066\u6271\u308F\u308C\u3066\u3044\u307E\u305B\u3093\u3002`,browserSuiteReadOnly:(e,t)=>`${e} \u306B\u306F\u30D6\u30E9\u30A6\u30B6\u30C6\u30B9\u30C8\u30B9\u30A4\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u306E\u5B9F\u884C\u3067\u306F\u66F8\u304D\u8FBC\u3081\u306A\u3044\u305F\u3081\u3001UI \u30C6\u30B9\u30C8\u306F ${t} \u306B\u3042\u308A\u307E\u3059\u3002`,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:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30EA\u30F3\u30BF\u30FC\u306F ${e} \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`,lintNotRun:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30EA\u30F3\u30BF\u30FC\u306F\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30EA\u30F3\u30BF\u30FC\u3092\u901A\u3055\u305A\u306B\u63D0\u51FA\u3057\u307E\u3057\u305F: ${e}\u3002`,analysisUnverified:e=>`\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 ${e} \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:e=>`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: ${e}`,componentsNotTested:e=>`\u672A\u30C6\u30B9\u30C8: \u8A08\u753B\u304C\u30C6\u30B9\u30C8\u5BFE\u8C61\u306B\u3057\u306A\u304B\u3063\u305F\u3001\u5909\u66F4\u3055\u308C\u305F\u30B3\u30FC\u30C9\u306E\u90E8\u5206\u3067\u3059\u3002${e}`,componentsWithoutReason:e=>`\u8A08\u753B\u304C\u7406\u7531\u3092\u793A\u3055\u305A\u306B\u9664\u5916\u3057\u305F\u90E8\u5206: ${e}\u3002`,targetNotesDeviation:e=>`Target \u306E\u30E1\u30E2\u304C\u6307\u5B9A\u3059\u308B\u5834\u6240\u306B\u30C6\u30B9\u30C8\u3092\u7F6E\u3044\u3066\u3044\u307E\u305B\u3093: ${e}`,appRestarted:e=>`\u5B9F\u884C\u4E2D\u306B\u30C6\u30B9\u30C8\u5BFE\u8C61\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u306B\u5931\u6557\u3057\u305F\u305F\u3081\u3001Testbot \u306F\u30C6\u30B9\u30C8\u3092\u5358\u72EC\u3067\u5B9F\u884C\u3059\u308B\u524D\u306B\u3001\u8A18\u9332\u3055\u308C\u305F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3067\u30C6\u30B9\u30C8\u5BFE\u8C61\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u518D\u8D77\u52D5\u3057\u307E\u3057\u305F: ${e}`,testSettingsDiffer:e=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u81EA\u8EAB\u306E\u30C6\u30B9\u30C8\u30B3\u30DE\u30F3\u30C9\u3068\u306F\u7570\u306A\u308B\u8A2D\u5B9A\u3067\u691C\u8A3C\u3057\u305F\u305F\u3081\u3001\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u30D3\u30EB\u30C9\u3067\u306F\u3053\u308C\u3089\u306E\u30C6\u30B9\u30C8\u306E\u6271\u3044\u304C\u5909\u308F\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059: ${e}\u3002`,stageSalvaged:(e,t)=>t.length===1?`${e} \u30B9\u30C6\u30C3\u30D7\u306F\u3001\u4FEE\u6B63\u5F8C\u3082 ${t[0]} \u306E\u30C1\u30A7\u30C3\u30AF\u306B\u901A\u3089\u306A\u304B\u3063\u305F\u3082\u306E\u306E\u3001\u4F5C\u6210\u3057\u305F\u51FA\u529B\u3092\u6B8B\u3057\u307E\u3057\u305F\u3002\u305D\u306E\u51FA\u529B\u306F\u3053\u306E\u30C1\u30A7\u30C3\u30AF\u3067\u78BA\u8A8D\u3055\u308C\u3066\u3044\u306A\u3044\u3082\u306E\u3068\u3057\u3066\u6271\u3063\u3066\u304F\u3060\u3055\u3044\u3002`:`${e} \u30B9\u30C6\u30C3\u30D7\u306F\u3001\u4FEE\u6B63\u5F8C\u3082 ${t.length} \u4EF6\u306E\u30C1\u30A7\u30C3\u30AF\uFF08${t.join("\u3001")}\uFF09\u306B\u901A\u3089\u306A\u304B\u3063\u305F\u3082\u306E\u306E\u3001\u4F5C\u6210\u3057\u305F\u51FA\u529B\u3092\u6B8B\u3057\u307E\u3057\u305F\u3002\u305D\u306E\u51FA\u529B\u306F\u3053\u308C\u3089\u306E\u30C1\u30A7\u30C3\u30AF\u3067\u78BA\u8A8D\u3055\u308C\u3066\u3044\u306A\u3044\u3082\u306E\u3068\u3057\u3066\u6271\u3063\u3066\u304F\u3060\u3055\u3044\u3002`,downstreamNotChecked:e=>`\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${e}`,browserBuildNotDeclared:(e,t,n)=>`${e} \u306E Playwright \u304C\u6307\u5B9A\u3059\u308B\u30D6\u30E9\u30A6\u30B6\u306E\u30D3\u30EB\u30C9 ${t} \u306E\u4EE3\u308F\u308A\u306B\u3001\u5225\u306E\u30D3\u30EB\u30C9\u304C\u4F7F\u308F\u308C\u3066\u3044\u307E\u3057\u305F\uFF08\u5225\u306E\u30D3\u30EB\u30C9\u3078\u306E\u30EA\u30F3\u30AF\u306B\u306A\u3063\u3066\u3044\u307E\u3059\uFF09\u3002\u305D\u306E\u305F\u3081\u3001\u3053\u3053\u3067\u306E\u30D6\u30E9\u30A6\u30B6\u30C6\u30B9\u30C8\u306E\u7D50\u679C\u306F CI \u306E\u7D50\u679C\u3068\u4E00\u81F4\u3057\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002CI \u3067\u306F\u305D\u3053\u3067 \`${n}\` \u304C\u5FC5\u8981\u3067\u3059\u3002`,resultsNotOfDeliveredTests:e=>`\u6B21\u306E\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F\u6700\u5F8C\u306E\u5B9F\u884C\u306E\u5F8C\u306B\u5909\u66F4\u3055\u308C\u305F\u305F\u3081\u3001\u3053\u3053\u3067\u306E\u7D50\u679C\u306F\u4EE5\u524D\u306E\u7248\u306E\u3082\u306E\u3067\u3001\u63D0\u51FA\u3057\u305F\u30C6\u30B9\u30C8\u306E\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093: ${e}\u3002`,videoMissing:e=>`\u6B21\u306E\u30D6\u30E9\u30A6\u30B6\u30C6\u30B9\u30C8\u306F\u52D5\u753B\u304C\u8A18\u9332\u3055\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u3053\u3053\u3067\u306E\u7D50\u679C\u306B\u306F\u78BA\u8A8D\u3067\u304D\u308B\u52D5\u753B\u304C\u3042\u308A\u307E\u305B\u3093: ${e}\u3002`,testsCouldNotRunHere:(e,t)=>`\u3053\u306E\u5909\u66F4\u306B\u306F ${e} \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: ${t}`,modelProviderDenied:(e,t=!1)=>t?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${e} \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 ${e} \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`,stageInterruptedByProvider:(e,t)=>`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${t} \u306B\u3088\u308A ${e} \u306E\u6BB5\u968E\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F\u3002Testbot \u306F\u305D\u306E\u6BB5\u968E\u3067\u4F5C\u6210\u6E08\u307F\u306E\u5185\u5BB9\u3092\u6B8B\u3057\u307E\u3057\u305F\u3002`,planInterruptedByProvider:(e,t)=>`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${e} \u306B\u3088\u308A\u8A08\u753B\u304C\u4E2D\u65AD\u3055\u308C\u307E\u3057\u305F\u3002Testbot \u306F\u4F5C\u6210\u6E08\u307F\u306E\u8A08\u753B\u3092\u6B8B\u3057\u3001\u5F97\u3089\u308C\u305F\u30C6\u30B9\u30C8\u7D50\u679C\u3092\u5831\u544A\u3057\u307E\u3059\u3002`+(t?"\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002":""),modelProviderUnavailable:(e,t=!1)=>t?`\u30E2\u30C7\u30EB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306E ${e} \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 ${e} \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`,dataSafetyBrowserClean:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306E\u30D6\u30E9\u30A6\u30B6\u306F\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u306E\u4E0B\u3067\u52D5\u4F5C\u3057\u3001\u81EA\u5206\u304C\u4F5C\u6210\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3060\u3051\u3092\u5909\u66F4\u3057\u3001\u5F8C\u3067\u524A\u9664\u3057\u307E\u3057\u305F\u3002",dataSafetyNoBrowser:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306F\u30D6\u30E9\u30A6\u30B6\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyInvalidConfig:"\u5171\u6709\u74B0\u5883\u306E\u30C7\u30FC\u30BF\u5B89\u5168\u8A2D\u5B9A\u304C\u7121\u52B9\u3067\u3059\uFF08\u30AE\u30E3\u30C3\u30D7\u3092\u53C2\u7167\uFF09\u3002",dataSafetyGuardCheckFailed:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u30C7\u30FC\u30BF\u4FDD\u8B77\u30AC\u30FC\u30C9\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u8A73\u7D30\u306F\u4E0D\u8DB3\u4E8B\u9805\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002",dataSafetyGuardUnconfirmed:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306F\u30D6\u30E9\u30A6\u30B6\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u304C\u3001\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u304C\u6709\u52B9\u3067\u3042\u3063\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u30AE\u30E3\u30C3\u30D7\u3092\u53C2\u7167\uFF09\u3002",dataSafetyBrowserLeftovers:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Testbot \u306E\u30D6\u30E9\u30A6\u30B6\u306F\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u306E\u4E0B\u3067\u52D5\u4F5C\u3057\u3001\u81EA\u5206\u304C\u4F5C\u6210\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3060\u3051\u3092\u5909\u66F4\u3057\u307E\u3057\u305F\u304C\u3001\u4F5C\u6210\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u306E\u4E00\u90E8\u306F\u524A\u9664\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u30AE\u30E3\u30C3\u30D7\u3092\u53C2\u7167\uFF09\u3002",dataSafetyBrowserWithheld:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u3092\u4F7F\u7528\u3057\u307E\u3057\u305F\u3002Skyramp MCP \u30B5\u30FC\u30D0\u30FC\u306B\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u304C\u306A\u3044\u305F\u3081\u3001Testbot \u306F\u30D6\u30E9\u30A6\u30B6\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyGuardUnavailable:"\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u3092\u8AAD\u307F\u8FBC\u3081\u306A\u304B\u3063\u305F\u305F\u3081\u3001Testbot \u306E\u30D7\u30ED\u30AD\u30B7\u306F\u30D7\u30ED\u30FC\u30D6\u3001\u30C6\u30B9\u30C8\u3001\u305D\u306E\u4ED6\u306E\u30B3\u30DE\u30F3\u30C9\u304B\u3089\u5171\u6709\u74B0\u5883\u3078\u306E\u3059\u3079\u3066\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u62D2\u5426\u3057\u3001Testbot \u306F\u5171\u6709\u74B0\u5883\u306B\u5BFE\u3057\u3066\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyPlanOnly:"\u3053\u306E\u5B9F\u884C\u306F\u5171\u6709\u74B0\u5883\u306E\u30C6\u30B9\u30C8\u8A08\u753B\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F\u3002\u5B9F\u884C\u6642\u30D7\u30ED\u30FC\u30D6\u3084\u30C6\u30B9\u30C8\u306F\u8981\u6C42\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyOffLimitsRulesOnly:"\u30D7\u30ED\u30FC\u30D6\u3068\u5B9F\u884C\u3059\u308B\u30C6\u30B9\u30C8\u306E\u7ACB\u5165\u7981\u6B62\u30EB\u30FC\u30C8\u3078\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u3001\u6307\u793A\u306B\u3088\u3063\u3066\u5236\u9650\u3059\u308B\u3060\u3051\u3067\u3059\u3002Testbot \u306F\u305D\u308C\u3089\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5F37\u5236\u7684\u306B\u5236\u9650\u3057\u307E\u305B\u3093\u3002",dataSafetyAuthCreates:e=>`\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u30D6\u30E9\u30A6\u30B6\u304C\u30B5\u30A4\u30F3\u30A4\u30F3\u307E\u305F\u306F\u30B5\u30A4\u30F3\u30A2\u30C3\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F: ${e}\u3002\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u306F\u3053\u308C\u3089\u3092\u901A\u904E\u3055\u305B\u3001\u4F5C\u6210\u3055\u308C\u305F\u3082\u306E\uFF08\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306A\u3069\uFF09\u306F\u524A\u9664\u3057\u307E\u305B\u3093\u3002`,dataSafetyProxyOffLimitsRulesOnly:"\u4E0A\u8A18\u306E\u30AC\u30FC\u30C9\u3055\u308C\u306A\u3044\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304B\u3089\u306E\u7ACB\u5165\u7981\u6B62\u30EB\u30FC\u30C8\u3078\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u3001\u6307\u793A\u306B\u3088\u3063\u3066\u5236\u9650\u3059\u308B\u3060\u3051\u3067\u3059\u3002Testbot \u306F\u305D\u308C\u3089\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5F37\u5236\u7684\u306B\u5236\u9650\u3057\u307E\u305B\u3093\u3002",dataSafetyRulesOnly:"\u30AC\u30FC\u30C9\u4ED8\u304D\u30D6\u30E9\u30A6\u30B6\u306E\u5916\u3067\u884C\u3046\u30D7\u30ED\u30FC\u30D6\u3068\u30C6\u30B9\u30C8\u306B\u306F\u3001\u4F5C\u6210\u3057\u305F\u30C7\u30FC\u30BF\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u6307\u793A\u3059\u308B\u3060\u3051\u3067\u3059\u3002",dataSafetyProxy:(e,t)=>`${e}\u306F Testbot \u306E\u30C7\u30FC\u30BF\u5B89\u5168\u30D7\u30ED\u30AD\u30B7\u3092\u7D4C\u7531\u3057\u307E\u3057\u305F\u3002\u30AC\u30FC\u30C9\u3055\u308C\u305A\u3001\u4F5C\u6210\u3057\u305F\u3082\u306E\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u6307\u793A\u3055\u308C\u308B\u3060\u3051\u306E\u5BFE\u8C61: ${t}\u3002`,dataSafetyIsolationEnforced:()=>"\u30D7\u30ED\u30FC\u30D6\u3068\u30C6\u30B9\u30C8\u30B3\u30DE\u30F3\u30C9\u306F\u3001Testbot \u306E\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u3092\u901A\u3057\u3066\u306E\u307F\u5171\u6709\u74B0\u5883\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u3057\u305F\u3002",playwrightNotRouted:(e,t)=>`Testbot \u304C Playwright \u306E API \u30EA\u30AF\u30A8\u30B9\u30C8\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF08request \u30D5\u30A3\u30AF\u30B9\u30C1\u30E3\u3001page.request\u3001request.newContext\uFF09\u3092\u30C7\u30FC\u30BF\u5B89\u5168\u30AC\u30FC\u30C9\u7D4C\u7531\u3067\u9001\u308B\u306E\u306F Playwright ${t} \u306E\u5834\u5408\u3060\u3051\u3067\u3059\u3002\u3053\u306E\u30C1\u30A7\u30C3\u30AF\u30A2\u30A6\u30C8\u306E Playwright \u306F ${e} \u306E\u305F\u3081\u3001\u305D\u308C\u3089\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u5171\u6709\u74B0\u5883\u306B\u5230\u9054\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,dataSafetyIsolationRefused:"\u4E00\u90E8\u306E\u30C1\u30A7\u30C3\u30AF\u306F\u3001\u5171\u6709\u74B0\u5883\u306E\u4FDD\u8B77\u3092\u6709\u52B9\u306B\u3057\u305F\u307E\u307E\u3067\u306F\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002Testbot \u306F\u3001\u4FDD\u8B77\u306A\u3057\u3067\u305D\u308C\u3089\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",dataSafetyProxyAuthCreates:e=>`\u8A08\u753B\u6642\u306E\u30D7\u30ED\u30FC\u30D6\u307E\u305F\u306F\u30C6\u30B9\u30C8\u304C\u30B5\u30A4\u30F3\u30A4\u30F3\u307E\u305F\u306F\u30B5\u30A4\u30F3\u30A2\u30C3\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F: ${e}\u3002\u30C7\u30FC\u30BF\u5B89\u5168\u30D7\u30ED\u30AD\u30B7\u306F\u3053\u308C\u3089\u3092\u901A\u904E\u3055\u305B\u3001\u4F5C\u6210\u3055\u308C\u305F\u3082\u306E\uFF08\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306A\u3069\uFF09\u306F\u8FFD\u8DE1\u3057\u307E\u305B\u3093\u3002`,dataSafetyNoClientCertificate:(e,t)=>`${e} \u306F\u3001Testbot \u306E\u30C7\u30FC\u30BF\u5B89\u5168\u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092 Cloudflare \u306E\u30C1\u30E3\u30EC\u30F3\u30B8\u307E\u305F\u306F TLS \u30CF\u30F3\u30C9\u30B7\u30A7\u30A4\u30AF\u3067\u62D2\u5426\u3057\u307E\u3057\u305F\u3002\u539F\u56E0\u306F\u8A3C\u660E\u66F8\u3067\u306F\u306A\u304F\u30D7\u30ED\u30AD\u30B7\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30D7\u30ED\u30AD\u30B7\u306F TLS \u3092\u81EA\u8EAB\u3067\u7D42\u7AEF\u3057\u3001\u3053\u306E\u30DB\u30B9\u30C8\u306B\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u8A3C\u660E\u66F8\u3092\u9001\u4FE1\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u8A3C\u660E\u66F8\u3092\u9001\u4FE1\u3059\u308B\u306E\u306F ${t} \u304C\u305D\u306E\u30DB\u30B9\u30C8\u3092\u6307\u5B9A\u3057\u3066\u3044\u308B\u5834\u5408\u3060\u3051\u3067\u3059\u3002`,dataSafetyGuardedProbes:"\u8A08\u753B\u6642\u306E\u30D7\u30ED\u30FC\u30D6",dataSafetyGuardedTests:"\u30C6\u30B9\u30C8\u306E\u5B9F\u884C",dataSafetyAnd:"\u3068",dataSafetyCleanupConfirmed:"Testbot \u306F\u5404\u30C6\u30B9\u30C8\u304C\u5BA3\u8A00\u3057\u305F\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3092\u5B9F\u884C\u3057\u3001\u3059\u3079\u3066\u6210\u529F\u3057\u307E\u3057\u305F\u3002",dataSafetyLeftRecords:e=>`\u6B21\u306E\u30C6\u30B9\u30C8\u306F\u5171\u6709\u74B0\u5883\u304B\u3089\u524A\u9664\u3067\u304D\u306A\u3044\u30EC\u30B3\u30FC\u30C9\u3092\u5BA3\u8A00\u3057\u3066\u3044\u307E\u3059: ${e}\u3002`,dataSafetyCleanupFailed:e=>`${e} \u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u306F\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4F5C\u6210\u3057\u305F\u3082\u306E\u304C\u5171\u6709\u74B0\u5883\u306B\u6B8B\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002`,dataSafetyCleanupUnknown:e=>`${e} \u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u306F\u4E0D\u660E\u3067\u3059\u3002Testbot \u306F\u305D\u306E\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,dataSafetyKeptRecords:(e,t)=>`\u30C6\u30B9\u30C8\u306F\u3001\u30C6\u30B9\u30C8\u30C7\u30FC\u30BF\u3092\u4FDD\u6301\u3059\u308B\u6A29\u9650 (\u74B0\u5883 ${e}\u3001\u30DD\u30EA\u30B7\u30FC\u30EA\u30D3\u30B8\u30E7\u30F3 ${t}) \u306E\u3082\u3068\u3067\u3001\u6B21\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u5171\u6709\u74B0\u5883\u306B\u6B8B\u3057\u307E\u3057\u305F`},isolationReport:{rationale:"Testbot \u306F\u3001\u5FC5\u8981\u306A\u5171\u6709\u74B0\u5883\u306E\u9694\u96E2\u306E\u4E2D\u3067\u3053\u306E\u691C\u8A3C\u3092\u5B9F\u884C\u3067\u304D\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u5909\u66F4\u3092\u691C\u8A3C\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002",gap:e=>`\u5171\u6709\u74B0\u5883\u306E\u9694\u96E2\u3092\u5229\u7528\u3067\u304D\u307E\u305B\u3093: ${e}`,nextStep:"\u30AE\u30E3\u30C3\u30D7\u306B\u8A18\u8F09\u3055\u308C\u305F\u554F\u984C\u3092\u89E3\u6D88\u3057\u3066\u304B\u3089\u3001\u691C\u8A3C\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",nextStepPackageSource:"Ubuntu \u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u914D\u5E03\u5143\u304C\u518D\u3073\u5229\u7528\u53EF\u80FD\u306B\u306A\u3063\u3066\u304B\u3089\u3001\u691C\u8A3C\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u30DB\u30B9\u30C8\u3084\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002"},nextSteps:{componentMismatch:(e,t,n,s)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u306F ${n} \u3092\u5B9F\u884C\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${s} \u3092\u542B\u3093\u3067\u3044\u307E\u305B\u3093\u3002`,componentUnverified:(e,t,n,s)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u304C\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${s} \u3092\u5B9F\u884C\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u5831\u544A\u3055\u308C\u305F\u30B3\u30DF\u30C3\u30C8: ${n}\u3002`,componentUnread:(e,t,n)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u304C\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${n} \u3092\u5B9F\u884C\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3053\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u5B9F\u884C\u3057\u3066\u3044\u308B\u30B3\u30DF\u30C3\u30C8\u306E\u8A18\u9332\u304C\u3042\u308A\u307E\u305B\u3093\u3002`,deployCommit:(e,t)=>`${e} \u306E ${t} \u3092 Test Environment \u306B\u30C7\u30D7\u30ED\u30A4\u3057\u3066\u3001Testbot \u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u305D\u306E\u30B3\u30DF\u30C3\u30C8\u304C\u5B9F\u884C\u3055\u308C\u308B\u307E\u3067\u3001\u305D\u3053\u3067\u306E\u30C6\u30B9\u30C8\u306F\u3053\u306E\u5909\u66F4\u306E\u691C\u8A3C\u306B\u306A\u308A\u307E\u305B\u3093\u3002`,addSecret:(e,t)=>`\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E\u30DB\u30B9\u30C8\u306B ${e} \u3068\u3044\u3046\u540D\u524D\u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\uFF08GitHub Actions \u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u3001\u307E\u305F\u306F Azure DevOps \u3067\u306F\u30DB\u30B9\u30C8\u30EA\u30DD\u30B8\u30C8\u30EA\u306E Pipelines \u203A Library \u306B\u3042\u308B skyramp-testbot \u5909\u6570\u30B0\u30EB\u30FC\u30D7\u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u5909\u6570\uFF09\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u6B21\u306B Target \u306E Setup \u30DA\u30FC\u30B8\u306E Credentials \u306B\u8FFD\u52A0\u3057\u3001Testbot \u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u5B9F\u884C\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u304C Testbot \u306B\u6E21\u3059\u306E\u306F Target \u306E\u8A8D\u8A3C\u60C5\u5831\u3060\u3051\u3067\u3001\u305D\u308C\u305E\u308C\u5BFE\u5FDC\u4ED8\u3051\u3089\u308C\u305F\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u306E\u30DB\u30B9\u30C8\u306E\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u6E21\u3055\u308C\u307E\u3059\u3002\u30A2\u30D7\u30EA\u306F\u3053\u308C\u306A\u3057\u3067\u306F\u8D77\u52D5\u3067\u304D\u305A\u3001Testbot \u304C\u5024\u3092\u4F5C\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093\u3002`},providerOutageHeadline:(e,t)=>`${e} \u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002Testbot \u306F ${t} \u56DE\u8A66\u884C\u3057\u307E\u3057\u305F\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002`,providerOutageActionStatusPage:e=>`${e} \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:e=>`${e} \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:e=>`${e} \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:e=>`\u5B9F\u884C\u4E2D\u306B\u3001Testbot \u304C ${e} \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:e=>`Testbot \u306F\u5236\u9650\u6642\u9593 ${e} \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:e=>`\u30BD\u30FC\u30B9\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8 ${e} \u306E\u30C6\u30B9\u30C8`,validatedTogether:e=>`\u4E00\u7DD2\u306B\u691C\u8A3C\u3057\u305F\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8: ${e}`,requestedByPerson:e=>`${e} \u3055\u3093\u306E\u4F9D\u983C\u3067\u5B9F\u884C`,requestedByPolicy:e=>`\u691C\u8A3C\u30DD\u30EA\u30B7\u30FC ${e} \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:e=>`> \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 ${e} \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:(e,t,n)=>`**${e}**: ${n?`${n} \u306E`:""}\u30E6\u30CB\u30C3\u30C8\u30C6\u30B9\u30C8 ${t} \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:(e,t,n="")=>`\`${e}/\` \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${n?`\u3053\u306E\u5B9F\u884C\u3067\u8FFD\u52A0\u3057\u305F\u3082\u306E\u3067\u3001${n} \u3092\u3053\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u306B\u306E\u307F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u3044\u307E\u3059\u3002`:""}\u30A2\u30D7\u30EA\u306E\u8D77\u52D5\u4E2D\u306B \`${t}\` \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\u30A2\u30D7\u30EA\u304C\u8D77\u52D5\u3057\u3066\u3044\u308B CI \u30B8\u30E7\u30D6\u306B\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\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:(e,t,n)=>`\`${t}\`\uFF08\u304A\u3088\u3073\u305D\u306E\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\uFF09\u306B \`${e}\` \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:(e,t)=>`\u4FE1\u983C\u6E08\u307F\u306E CI \u30C1\u30A7\u30C3\u30AF ${e} \u304C${t?` ${t} \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:(e,t,n)=>`${t} \u4EF6\u4E2D ${e} \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:(e,t,n,s)=>`\uFF08\u751F\u6210 ${e} \xB7 \u5909\u66F4 ${t} \xB7 \u691C\u8A3C ${n} \xB7 \u5B9F\u884C ${s}\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",requirementsHeader:(e,t)=>`\u{1F4CB} \u8981\u4EF6\uFF08${t} \u4EF6\u4E2D ${e} \u4EF6\u306E\u6761\u9805\u304C\u5408\u683C\uFF09`,requirementsTableHeader:"| \u8981\u4EF6 | \u6761\u9805 | \u30C6\u30B9\u30C8 | \u7D50\u679C |",requirementsSummaryTableHeader:"| \u8981\u4EF6 | \u5408\u683C\u3057\u305F\u6761\u9805 | \u5408\u683C\u3057\u3066\u3044\u306A\u3044\u6761\u9805 |",clauseStatuses:{Pass:"\u5408\u683C",Fail:"\u4E0D\u5408\u683C","Not run":"\u672A\u5B9F\u884C","Not tested":"\u672A\u30C6\u30B9\u30C8","Passed, test not kept":"\u5408\u683C\uFF08\u30C6\u30B9\u30C8\u306F\u4FDD\u6301\u305B\u305A\uFF09"},regressionGuard:"\uFF08\u56DE\u5E30\u30AC\u30FC\u30C9\uFF09",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:e=>e?`${e} \u30D5\u30C3\u30AF`:"\u30B3\u30DF\u30C3\u30C8\u30D5\u30C3\u30AF",commitRefusedByHook:(e,t)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${e}\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: \`${t}\`\u3002`,commitHookCouldNotRun:(e,t)=>`\u30EA\u30DD\u30B8\u30C8\u30EA\u306E ${e}\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: \`${t}\`\u3002`,stoppedEarly:(e,t)=>`> \u26A0\uFE0F \u5B9F\u884C\u304C\u9014\u4E2D\u3067\u505C\u6B62\u3057\u307E\u3057\u305F \u2014 ${e}\u3002\u4EE5\u4E0B\u306E\u7D50\u679C\u306F\u4E00\u90E8\u306E\u307F\u3067\u3059\u3002${t}`,viewInSkyramp:e=>` [Skyramp \u3067\u8868\u793A](${e})`,testsPr:{summaryHeader:"### \u6982\u8981",targets:"\u30C6\u30B9\u30C8\u306E\u5BFE\u8C61:",moreItems:e=>`\u307B\u304B ${e} \u4EF6`,counts:(e,t)=>`\u65B0\u898F\u30C6\u30B9\u30C8 ${e} \u4EF6\u3001\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\u3057\u305F\u30C6\u30B9\u30C8 ${t} \u4EF6\u3002`,types:e=>`\u30C6\u30B9\u30C8\u7A2E\u5225: ${e}\u3002`,statusHeader:"### \u691C\u8A3C\u30B9\u30C6\u30FC\u30BF\u30B9",noChange:"\u2139\uFE0F \u30D9\u30FC\u30B9\u30E9\u30A4\u30F3\u4EE5\u964D\u306B\u5909\u66F4\u306F\u3042\u308A\u307E\u305B\u3093\u3002",noTestRan:"\u5B9F\u884C\u3057\u305F\u30C6\u30B9\u30C8\u306F\u306A\u304F\u3001\u65E2\u5B58\u306E\u8A3C\u62E0\u3082\u63A1\u7528\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",noLiveApp:"\u7A3C\u50CD\u4E2D\u306E\u30A2\u30D7\u30EA\uFF08SUT\uFF09\u304C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30C6\u30B9\u30C8\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",resultCounts:(e,t,n)=>`\u30C6\u30B9\u30C8\u7D50\u679C: \u5408\u683C ${e} \u4EF6\u3001\u4E0D\u5408\u683C ${t} \u4EF6\u3001\u672A\u5B9F\u884C ${n} \u4EF6\u3002`,limitations:"\u91CD\u8981\u306A\u5931\u6557\u3068\u5236\u9650:",verdict:e=>`\u5B9F\u884C\u306E\u5224\u5B9A\u306F[\u5B9F\u884C\u306E\u8A73\u7D30](${e})\u306B\u3042\u308A\u307E\u3059\u3002`,runningHeader:"### \u30C6\u30B9\u30C8\u306E\u5B9F\u884C\u65B9\u6CD5",environment:e=>`\u30C6\u30B9\u30C8\u306F\u6B21\u306E\u74B0\u5883\u5909\u6570\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3059\u308B\u30B8\u30E7\u30D6\u3067\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044: ${e}\u3002`,filesChanged:"\u5404\u30C6\u30B9\u30C8\u306F **Files changed** \u30BF\u30D6\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},descriptionCut:(e,t,n)=>`_\u2026 \u6B8B\u308A\u306F\u7701\u7565\u3057\u307E\u3057\u305F${t===void 0?"\uFF08\u30C6\u30B9\u30C8\u7D50\u679C\u3092\u542B\u3080\uFF09":t?`\uFF08\u30C6\u30B9\u30C8\u7D50\u679C ${t} \u4EF6\u3092\u542B\u3080\uFF09`:""}\u3002Azure DevOps \u306E\u8AAC\u660E\u306F ${e} \u6587\u5B57\u307E\u3067\u3067\u3059\u3002${n?` [\u5B8C\u5168\u306A\u30EC\u30DD\u30FC\u30C8](${n})`:""}_`,testsReplaced:(e,t,n)=>[t?`Skyramp Testbot \u304C\u3053\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30C6\u30B9\u30C8\u3092[\u3053\u306E\u5B9F\u884C](${e})\u306E\u30C6\u30B9\u30C8\uFF08\u30B3\u30DF\u30C3\u30C8 \`${t}\`\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](${e})\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:e=>`Skyramp \u306E Web \u30A2\u30D7\u30EA\uFF08${e}\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:e=>`Skyramp Testbot \u3092\u958B\u59CB\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${e}`,assembledAfterFailedChecks:e=>`> \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${e} \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:(e,t,n)=>`Testbot PR${e?`\uFF08${e}\uFF09`:""}: [${t}](${n})`,viewRun:e=>`_[\u5B9F\u884C\u3092\u8868\u793A](${e})_`,testsPrNotOpened:(e,t)=>`\u30C6\u30B9\u30C8 PR \u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${e}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30D6\u30E9\u30F3\u30C1 \`${t}\` \u306B\u30D7\u30C3\u30B7\u30E5\u3055\u308C\u3066\u3044\u307E\u3059\u3002`,testsNotDelivered:e=>`\u30C6\u30B9\u30C8\u3092\u914D\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: ${e}`,testsPinnedNotDelivered:(e,t,n)=>`${e}: ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u3092\u4F5C\u6210\u3057\u3001${n} \u4EF6\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F\u3002\u30EA\u30DD\u30B8\u30C8\u30EA\u306F\u30B3\u30DF\u30C3\u30C8\u306B\u56FA\u5B9A\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u3053\u308C\u3089\u306E\u5909\u66F4\u306F\u914D\u4FE1\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,testsNotPushed:(e,t)=>`\u30C6\u30B9\u30C8\u3092\u30D7\u30C3\u30B7\u30E5\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\uFF08${e}\uFF09\u3002\u30C6\u30B9\u30C8\u306F\u30ED\u30FC\u30AB\u30EB\u30D6\u30E9\u30F3\u30C1 \`${t}\` \u306B\u6B8B\u3063\u3066\u3044\u307E\u3059\u3002`,testsPrRetargeted:e=>`\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${e?`\uFF08\`${e}\`\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:e=>`\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: ${e}\u3002`,testsHeldBack:(e,t,n,s)=>`${e?"\u4E00\u90E8\u306E\u30C6\u30B9\u30C8\u306E\u307F\u63D0\u51FA\u3057\u307E\u3057\u305F":"\u30C6\u30B9\u30C8\u3092\u63D0\u51FA\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}\u3002\u6B21\u306E\u30C6\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F ${t} \u306B\u307E\u3060\u306A\u3044\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5FC5\u8981\u3068\u3059\u308B\u305F\u3081\u4FDD\u7559\u3057\u307E\u3057\u305F: ${n}\u3002\u5909\u66F4\u5185\u5BB9\u306F\u5B9F\u884C\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306E ${s} \u306B\u3042\u308A\u307E\u3059\u3002`,testsNotProposed:e=>`\u30C6\u30B9\u30C8\u306F PR \u3068\u3057\u3066\u63D0\u6848\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F: ${e}\u3002`}};var Nf=(n=>(n.En="en",n.Ja="ja",n))(Nf||{}),Sle={en:Xy,ja:lG},kle="en";function CR(e){let t=e.trim().toLowerCase();if(t==="")return"en";let n=Object.values(Nf);return n.includes(t)?t:(Dt(`Invalid language '${e}'. Supported: ${n.join(", ")}. Falling back to 'en'.`),"en")}function ta(e,t){return(Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0)??t}function ne(){return Sle[kle]}var eE=(a=>(a.ProviderOutage="provider_outage",a.ProviderRateLimit="provider_rate_limit",a.ProviderUsageLimit="provider_usage_limit",a.ProviderAuthExpired="provider_auth_expired",a.Timeout="timeout",a.NoReport="no_report",a.RenderFailure="render_failure",a))(eE||{});(t=>{function e(n,s){switch(n){case"provider_outage":return{headline:ne().providerOutageHeadline(s.provider.name,s.maxRetries),action:ne().providerOutageActionStatusPage(s.provider.statusUrl)};case"provider_rate_limit":return{headline:ne().providerRateLimitHeadline(s.provider.name),action:ne().providerRateLimitAction};case"provider_usage_limit":return{headline:ne().providerUsageLimitHeadline(s.provider.name),action:ne().providerUsageLimitAction};case"provider_auth_expired":return{headline:ne().providerAuthExpiredHeadline(s.provider.name),action:ne().providerAuthExpiredAction};case"timeout":return{headline:ne().providerTimeoutHeadline(s.timeoutMinutes),action:ne().providerTimeoutAction};case"no_report":case"render_failure":return}}t.buildNotice=e})(eE||={});var SR=(n=>(n.SameBranch="same-branch",n.SeparateBranch="separate-branch",n))(SR||{});var dG=(n=>(n.Sonnet="sonnet",n.Opus="opus",n))(dG||{}),Rle="opus";function kR(e){return Object.values(dG).includes(e)}function pG(e){let t=(e??"").trim();if(t==="")return Rle;let n=t.toLowerCase();return kR(n)?n:t}var tE=(i=>(i.Low="low",i.Medium="medium",i.High="high",i.XHigh="xhigh",i.Max="max",i))(tE||{}),nE="high";function fG(e){return Object.values(tE).includes(e)}var hG=5;function Ble(e){let t=e.split(/\r?\n/).map(n=>n.trim()).filter(Boolean);if(t.length>hG)throw new Error(`relatedRepoPaths supports at most ${hG} entries (got ${t.length}); the cap limits how much cross-repo context is loaded to avoid overflowing Testbot's context window.`);return t}function xle(e){let t=e.trim().toLowerCase();return t===""?"separate-branch":Object.values(SR).includes(t)?t:(Dt(`Invalid generatedTestsMode '${e}'. Falling back to 'separate-branch'.`),"separate-branch")}function $le(e){let t=(e??"").trim();if(t!==""){if(/^(?:[1-9]|10)$/.test(t))return Number(t);Dt(`Ignoring perTestMaxFixAttempts="${e}": expected a whole number from 1 to 10; the Skyramp MCP default applies`)}}function Tle(e){let t=(e??"").trim().toLowerCase();return t===""?nE:fG(t)?t:(Dt(`Ignoring effort="${e}": expected one of ${Object.values(tE).join(", ")}; using "${nE}"`),nE)}function gG(){let e=pG(je("model"));return kR(e)||Dt(`model '${e}' is not a tested alias (sonnet, opus); passing it to the agent verbatim as a raw model id.`),{skyrampLicenseFile:je("skyrampLicenseFile"),cursorApiKey:je("cursorApiKey"),copilotApiKey:je("copilotApiKey"),anthropicApiKey:je("anthropicApiKey"),useBedrock:Yo("useBedrock"),awsRegion:je("awsRegion"),useLocalAuth:je("useLocalAuth").toLowerCase()==="true",model:e,effort:Tle(je("effort")),targetSetupCommand:je("targetSetupCommand"),authTokenCommand:je("authTokenCommand"),uiCredentials:je("uiCredentials"),targetTeardownCommand:je("targetTeardownCommand"),skipTargetTeardown:Yo("skipTargetTeardown"),skyrampMcpVersion:je("skyrampMcpVersion"),skyrampMcpSource:je("skyrampMcpSource"),skyrampMcpGithubToken:je("skyrampMcpGithubToken"),skyrampMcpGithubRef:je("skyrampMcpGithubRef"),nodeVersion:je("nodeVersion"),skipTargetSetup:Yo("skipTargetSetup"),targetReadyCheckCommand:je("targetReadyCheckCommand"),targetReadyCheckTimeout:(()=>{let n=parseInt(je("targetReadyCheckTimeout"),10)||1800;return n<1?(Dt(`targetReadyCheckTimeout must be at least 1 second, got ${n}. Using 1s.`),1):n})(),targetReadyCheckInterval:(()=>{let n=parseInt(je("targetReadyCheckInterval"),10),s=isNaN(n)?30:n;return s<1?(Dt(`targetReadyCheckInterval must be at least 1 second, got ${s}. Using 1s.`),1):s})(),targetReadyCheckDiagnosticsCommand:(()=>{let n=je("targetReadyCheckDiagnosticsCommand");return n.trim().toLowerCase()==="none"?"":n})(),workingDirectory:je("workingDirectory"),autoCommit:Yo("autoCommit"),commitMessage:je("commitMessage"),generatedTestsMode:xle(je("generatedTestsMode")),postPrComment:Yo("postPrComment"),testExecutionTimeout:parseInt(je("testExecutionTimeout"),10)||300,maxRecommendations:(()=>{let n=parseInt(je("maxRecommendations"),10);return isNaN(n)?void 0:Math.max(0,n)})(),maxGenerate:(()=>{let n=parseInt(je("maxGenerate"),10);return isNaN(n)?void 0:Math.max(0,n)})(),perTestMaxFixAttempts:$le(je("perTestMaxFixAttempts")),testbotMaxRetries:parseInt(je("testbotMaxRetries"),10)||3,testbotRetryDelay:parseInt(je("testbotRetryDelay"),10)||10,testbotTimeout:parseInt(je("testbotTimeout"),10)||60,targetSetupRetries:parseInt(je("targetSetupRetries"),10)||3,targetSetupRetryDelay:parseInt(je("targetSetupRetryDelay"),10)||10,authTokenRetries:(()=>{let n=parseInt(je("authTokenRetries"),10);return Number.isFinite(n)&&n>=1?n:6})(),authTokenRetryDelay:(()=>{let n=parseInt(je("authTokenRetryDelay"),10);return Number.isFinite(n)&&n>=0?n:10})(),reportCollapsed:Yo("reportCollapsed"),language:CR(je("language")),enableDebug:Yo("enableDebug"),testRepoPath:je("testRepoPath")||void 0,relatedRepoPaths:Ble(je("relatedRepoPaths")),allowedAuthors:je("allowedAuthors").split(/\r?\n/).map(n=>n.trim()).filter(Boolean)}}var Qle={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 mG(e=process.env){for(let[t,n]of Object.entries(Qle)){let s=`INPUT_${t.replace(/ /g,"_").toUpperCase()}`;(e[s]??"").trim()===""&&(e[s]=n)}}On();async function AG(e){let t=e.targetSetupCommand,n=e.skyrampMcpVersion;n||(n="latest"),t||(t="docker compose up -d --build");let s={targetSetupCommand:t,authTokenCommand:e.authTokenCommand,targetTeardownCommand:e.targetTeardownCommand,skipTargetTeardown:e.skipTargetTeardown,skyrampMcpVersion:n,skyrampMcpSource:e.skyrampMcpSource,skyrampMcpGithubRef:e.skyrampMcpGithubRef,nodeVersion:e.nodeVersion,skipTargetSetup:e.skipTargetSetup,targetReadyCheckCommand:e.targetReadyCheckCommand,targetReadyCheckTimeout:e.targetReadyCheckTimeout,targetReadyCheckInterval:e.targetReadyCheckInterval,targetReadyCheckDiagnosticsCommand:e.targetReadyCheckDiagnosticsCommand,autoCommit:e.autoCommit,commitMessage:e.commitMessage,generatedTestsMode:e.generatedTestsMode,postPrComment:e.postPrComment,testExecutionTimeout:e.testExecutionTimeout,maxRecommendations:e.maxRecommendations,maxGenerate:e.maxGenerate,perTestMaxFixAttempts:e.perTestMaxFixAttempts,testbotMaxRetries:e.testbotMaxRetries,testbotRetryDelay:e.testbotRetryDelay,testbotTimeout:e.testbotTimeout,targetSetupRetries:e.targetSetupRetries,targetSetupRetryDelay:e.targetSetupRetryDelay,authTokenRetries:e.authTokenRetries,authTokenRetryDelay:e.authTokenRetryDelay,reportCollapsed:e.reportCollapsed,language:e.language,enableDebug:e.enableDebug,testRepoPath:e.testRepoPath,relatedRepoPaths:e.relatedRepoPaths};Ly("Resolved configuration");for(let[r,i]of Object.entries(s))r==="authTokenCommand"?ls(` ${r}: [REDACTED]`):ls(` ${r}: ${i}`);return jy(),s}On();On();fR();var EG=G(require("child_process")),RR=class extends Error{constructor(t){super(t),this.name="ExecTimeoutError"}},rE=class extends Error{constructor(t){super(t),this.name="ExecAbortedError"}};function yG(e,t){if(!(!e||e.destroyed||e.writableEnded))try{e.write(t)}catch(n){Dt(`stream write failed: ${n instanceof Error?n.message:String(n)}`)}}async function vG(e,t=[],n={}){let s="",r="",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:a=>{s+=a.toString(),yG(n.stdoutStream,a)},stderr:a=>{r+=a.toString()}}};if(n.timeout||n.signal){let a=n.signal;return a?.aborted?Promise.reject(new rE(`Command aborted before start: ${e}`)):new Promise((c,u)=>{let l=EG.spawn(e,t,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:process.env,stdio:["pipe","pipe","pipe"],shell:!1});l.stdout?.on("data",y=>{s+=y.toString(),n.silent||process.stdout.write(y),yG(n.stdoutStream,y)}),l.stderr?.on("data",y=>{r+=y.toString(),n.silent||process.stderr.write(y)}),n.input&&l.stdin?.end(n.input);let p=()=>{m&&clearTimeout(m),a?.removeEventListener("abort",g)},h=y=>{p();try{l.kill("SIGTERM")}catch{}u(y)},g=()=>h(new rE(`Command aborted: ${e}`)),m=n.timeout?setTimeout(()=>h(new RR(`Command timed out after ${Math.round(n.timeout/6e4)}m: ${e}`)),n.timeout):void 0;a?.addEventListener("abort",g,{once:!0}),l.on("close",y=>{p();let v=y??1;v!==0&&!n.ignoreReturnCode?u(new Error(`The process '${e}' failed with exit code ${v}`)):c({exitCode:v,stdout:s,stderr:r})}),l.on("error",y=>{p(),u(y)})})}return{exitCode:await UV(e,t,i),stdout:s,stderr:r}}async function bG(e,t){Ly(e);try{return await t()}finally{jy()}}function BR(e){return e.toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")}async function wG(e,t){await bG("Tearing down services",async()=>{if(e.skipTargetTeardown){mR("Skipping service teardown (skipTargetTeardown=true)");return}if(!e.targetTeardownCommand){ls("No targetTeardownCommand configured, skipping teardown");return}ls(`Running teardown command: ${e.targetTeardownCommand}`);try{await vG("bash",["-c",e.targetTeardownCommand],{cwd:t}),mR("Services torn down successfully")}catch(n){let s=n instanceof Error?n.message:String(n);Dt(`Service teardown command failed (non-fatal): ${s}`)}})}var le=G(require("fs")),$G=require("crypto"),Se=G(require("path")),TG=require("child_process");var sE=G(require("fs")),CG=G(require("path")),_le=/[;|`$<>(){}\n\r]|(?<!&)&(?!&)|\|\|/,Dle=/`|\$[\w{(@*#?!$-]|\\[$`"\\\n]/;function Nle(e){let t="";for(let s=0;s<e.length;){let r=e[s];if(r==="\\"&&(e[s+1]==='"'||e[s+1]==="'"))return{syntax:"a backslash before a quote",quoted:!1};if(r!=='"'&&r!=="'"){t+=r,s++;continue}let i=e.indexOf(r,s+1);if(i<0)return;let o=r==='"'?Dle.exec(e.slice(s+1,i+(e[i-1]==="\\"?1:0))):null;if(o)return{syntax:`${IG(o[0])} inside double quotes`,quoted:!0};t+=" ",s=i+1}let n=_le.exec(t);return n?{syntax:IG(n[0]),quoted:!1}:void 0}var IG=e=>e==="`"?"a backtick":/[\n\r]/.test(e)?"a line break":`\`${e}\``;function Qc(e){let t=(e??"").trim();if(!t)return{kind:"empty",reason:"the command is empty"};let n=Nle(t);if(n)return{kind:"shell-syntax",reason:`it uses shell syntax (${n.syntax}), and this is re-executed WITHOUT a shell so the recorded string cannot be interpreted \u2014 put the logic in a script and record the script invocation instead, or put an argument that holds such characters in ${n.quoted?"single quotes":"quotes"}`};let s=[],r=[],i="",o,a=!1,c=()=>{(i||a)&&r.push(i),i="",a=!1},u=()=>{c(),r.length>0&&s.push(r),r=[]};for(let p=0;p<t.length;p++){let h=t[p];if(o){h===o?o=void 0:i+=h;continue}if(h==='"'||h==="'"){o=h,a=!0;continue}if(h==="&"&&t[p+1]==="&"){u(),p+=1;continue}if(/\s/.test(h)){c();continue}i+=h}if(o)return{kind:"unterminated-quote",reason:"it has an unterminated quote"};if(u(),s.length===0)return{kind:"empty",reason:"the command is empty"};if(s.some(p=>p.length===0))return{kind:"empty-step",reason:"it has an empty step between && operators"};let l=s.find(p=>["cd","export","source","."].includes(p[0]));return l?{kind:"builtin",reason:`it runs the shell builtin "${l[0]}", which cannot be executed as a program \u2014 record a script that does this instead`}:{argv:s[0],steps:s}}function iE(e,t,n){let s=(e??"").trim(),{steps:r,kind:i}=Qc(s);if(!r&&!(i!=="shell-syntax"&&i!=="builtin")){try{sE.mkdirSync(CG.dirname(t),{recursive:!0}),sE.writeFileSync(t,`#!/usr/bin/env bash
52
52
  # Written by ${n}: the recorded command, which needed a shell to run.
53
53
  set -euo pipefail
54
54
  ${s}
@@ -254,20 +254,20 @@ health check cancelled`,u(1)},h=setTimeout(l,Math.max(1,t.deadlineMs-Date.now())
254
254
  %{http_code}
255
255
  %{redirect_url}`,...EIe(i),r],{cwd:n,deadlineMs:Math.min(e,Date.now()+25e3),signal:t});if(a.exitCode!==0)return{error:(a.stderr||"curl failed").trim()};let c=a.stdout??"",u=c.lastIndexOf(`
256
256
  `),l=c.lastIndexOf(`
257
- `,u-1),p=Number(c.slice(l+1,u).trim()),h=c.slice(u+1);return{status:Number.isFinite(p)?p:0,body:c.slice(0,l),...h?{redirect:h}:{}}},async runCommand(r,i){let{steps:o,reason:a}=Qc(r);if(!o)return{exitCode:1,output:`${aK}${a}`};let c="";for(let u of o){if(Date.now()>=e)return{exitCode:1,output:"health check time limit reached"};let l=await iK(u,{cwd:i,deadlineMs:Math.min(e,Date.now()+6e4),env:pt(),signal:t});if(c+=`${l.stdout??""}${l.stderr??""}`,l.exitCode!==0)return{exitCode:l.exitCode,output:c}}return{exitCode:0,output:c}}}}function EIe(e){return e?Object.entries(e).flatMap(([t,n])=>["-H",`${t}: ${n}`]):[]}function cK(e){return e.trim().replace(/^\.\//,"").replace(/\/+$/,"")}function vIe(e){if(!e.inputs)return[];let t=Gs(e),n=r=>{let i=typeof r=="string"?r:r?.path??r?.file;return typeof i=="string"&&i.trim()?cK(i):void 0},s=(r,i)=>r?(i??[]).flatMap(o=>{let a=n(o);return a?[{repository:r,path:a}]:[]}):[];return[...s(Si(e.inputs).slug,[...t?.changedFiles??[],...t?.newFiles??[]]),...(t?.relatedChanges??[]).flatMap(r=>s(r.repository,r.changedFiles))]}function bIe(e,t){let n=Ta.resolve(e.inputs.repositoryPath,t.trim()),s=IB(e.inputs,n),r=s&&Ta.relative(s.path,n);return s&&r?{repository:s.slug,path:r.split(Ta.sep).join("/")}:void 0}function _w(e,t={}){let n=t.budgetMs??pIe,s=t.intervalMs??fIe;return{name:"deploy-health",async verify(r,i){if(r.signal?.aborted)return{name:this.name,passed:!1,details:"health check cancelled"};let o=e??Qw(r.deadlineMs??1/0,r.signal,r.inputs.repositoryPath),{deploy:a,errors:c}=Ru(i,r.inputs?.repositoryPath,r.secretValues);if(!a)return{name:this.name,passed:!1,details:c.slice(0,6).join("; ")};if(a.outcome==="bringup-failed")return{name:this.name,passed:!0};if(a.outcome==="change-broke-bringup"){let I=vIe(r),C=(a.suspectFiles??[]).map(cK),w=C.filter(x=>{let S=bIe(r,x);return!!S&&GE(I,S.repository,S.path)});return I.length>0&&w.length===0?{name:this.name,passed:!1,details:`change-broke-bringup claimed, but none of suspectFiles [${C.slice(0,4).join(", ")}] is a file this PR changed \u2014 that is not attributable to the PR. Re-run bring-up; if it still fails for a reason outside the diff, record outcome "bringup-failed" (with bringupError) instead.`}:{name:this.name,passed:!0}}let u=a.health;if(!u)return{name:this.name,passed:!1,details:"health is missing although the app is recorded as up"};let l=AIe(u.headers),p=(I,C=!1)=>({ok:!1,details:I,transient:C}),h=async()=>{if(!kw(u.url,mD(r)))return p(`health url ${u.url} is not the app under test \u2014 this gate probes only loopback, the Test Environment's address or an address the Target's settings give, never an arbitrary destination. Record the URL the deployed app actually answers on.`);let I=await o.httpGet(u.url,u.headers);if("error"in I)return p(`health url ${u.url} unreachable: ${I.error}`,!0);let C=Number(u.status??200);if(I.status!==C)return p(`health url returned ${I.status}, expected ${C}`,!0);if(!I.body.trim())return p("health url returned empty body \u2014 must return data",!0);let w=(u.output??"").trim();if(w){let x=rK(w,I.body);if(!x.ok)return p(`health url ${u.url} no longer answers as recorded \u2014 ${x.why}. Either the app is not answering as it did at deploy time, or health.output is not verbatim: record ONLY the response body, with no commentary appended.`)}return{ok:!0}},g=async()=>{let I=await o.runCommand(u.command,r.inputs.repositoryPath),C=I.output.startsWith(aK);if(I.exitCode!==0)return p(`health command exited ${I.exitCode}: ${I.output.slice(0,200)}`,!C);if(!I.output.trim())return p("health command produced no output",!0);let w=(u.output??"").trim();if(w.length<16)return p(`health command output "${w}" is too thin to be a data check \u2014 the check must return real application data, not a status token`);let x=rK(w,I.output);return x.ok?{ok:!0}:p(`health command did not reproduce its recorded check \u2014 ${x.why}. Either the app is not answering as it did at deploy time, or health.output is not verbatim: record ONLY what the command wrote, with no commentary appended.`)},m;if(u.command&&(l||!u.url))m=g;else{if(u.url&&l)return{name:this.name,passed:!1,details:`health.headers contains a documented placeholder (${Object.entries(u.headers??{}).filter(([,I])=>/<[^>]+>/.test(String(I))).map(([I])=>I).join(", ")}), and this gate RE-EXECUTES the probe \u2014 a placeholder cannot authenticate. Record a health.command instead (a script that fetches its own token and hits the URL); do not put a real credential in the artifact.`};u.url?m=h:u.command&&(m=g)}if(!m)return{name:this.name,passed:!1,details:"health has neither url nor command"};let y=Date.now(),v=y+n,E=await m();for(;!E.ok&&E.transient&&!r.signal?.aborted&&Date.now()+s<v&&(await new Promise((I,C)=>{let w,x=Y=>{clearTimeout(w),r.signal?.removeEventListener("abort",S),Y?C(Y):I()},S=()=>x();if(r.signal?.addEventListener("abort",S,{once:!0}),r.signal?.aborted){x();return}t.sleep?t.sleep(s).then(()=>x(),x):w=setTimeout(()=>x(),s)}),!r.signal?.aborted);)E=await m();if(r.signal?.aborted)return{name:this.name,passed:!1,details:"health check cancelled"};if(E.ok)return{name:this.name,passed:!0};let b=Math.round((Date.now()-y)/1e3);return{name:this.name,passed:!1,details:E.transient&&b>0?`${E.details} (still failing after ${b}s)`:E.details}}}}function kD(e){return uK(e)&&Yg(e).length===0&&SD(e.inputs?.sharedEnvironment).length===0}function uK(e){let t=wIe(e);if(!t&&e.state.stages.deploy?.status!=="passed")return!1;let n=Ae(e,"deploy.json");return n?lK(n):!t}function lK(e){return e?.outcome==="clean"||e?.outcome==="recipe-drift"}function wIe(e){let t=e.state.stages.plan,n=e.state.stages.deploy;return!(e.inputs?.pipeline?e.inputs.pipeline==="two-step":!n)||t?.status!=="passed"?!1:!n||n.updatedAt<=t.updatedAt}async function IIe(e,t,n){let s=new URL(t.url).origin;return(URL.canParse(e.url)?new URL(e.url).origin:e.url)===s?xw(e.url,n):{error:`${e.url} is not on ${s}, where ${t.name} runs`}}async function CIe(e,t,n){let s=$w(e.inputs??{}),r=[];for(let i of t){let o=s.find(l=>l.name===i.component);if(!o){r.push(`revisions names "${i.component}", which is not a shared component listed for a revision check`);continue}let a=await IIe(i,o,n);if("error"in a){r.push(`the revision check of ${o.name} could not be re-run: ${Hs(a.error,e.secretValues??[]).slice(0,200)}`);continue}let c=Bw(o.expectedRevision,{body:i.output}),u=Bw(o.expectedRevision,a);c.observedRevision!==u.observedRevision&&r.push(`the revision check of ${o.name} names ${u.observedRevision??"no commit"} when re-run, but its recorded output names ${c.observedRevision??"no commit"} \u2014 record what the check returned, verbatim, or leave the component out`)}return r}function dK(e,t=1/0,n){return async(s,r)=>{if(!Vr(e))throw new Error("the guarded setup network boundary is unavailable");let i=n&&r?.signal?AbortSignal.any([n,r.signal]):n??r?.signal??void 0,o=await Qw(t,i,e).httpGet(String(s));if("error"in o)throw new Error(o.error);return new Response([204,205,304].includes(o.status)?null:o.body,{status:o.status,headers:o.redirect?{Location:o.redirect}:void 0})}}function pK(e){let t=e.inputs;return t?.setupEvents&&!t.recheck&&En(t)?dK(t.repositoryPath,e.deadlineMs,e.signal):void 0}function fK(e){return{name:"shared-revisions",async verify(t,n){let{deploy:s}=Ru(n,t.inputs?.repositoryPath,t.secretValues),r=await CIe(t,s?.revisions??[],e??pK(t));return r.length?{name:this.name,passed:!1,details:r.join("; ")}:{name:this.name,passed:!0}}}}async function hK(e,t,n){let s=e.inputs?.sharedEnvironment;if(!ID(s))return{};let{deploy:r}=Ru(t,e.inputs.repositoryPath,e.secretValues),i=await YZ(s,r?.revisions??[],n??pK(e),e.secretValues??[]);return Ln(e,np,Hs(i,e.secretValues??[]),[])}function gK(e,t){let{deploy:n,errors:s}=Ru(t,e.inputs?.repositoryPath,e.secretValues),r=n?.health?.headers?{...n,health:{...n.health,headers:Object.fromEntries(Object.keys(n.health.headers).map(a=>[a,"<redacted>"]))}}:n,i=e.secretValues??[],o=r&&SIe(r,Hs(r,i),i.filter(a=>a.length>=Sh));return Ln(e,"deploy",o,s)}function SIe(e,t,n){let s=r=>Lt(r,n);return{...t,teardown:s(e.teardown),...e.baseUrls?{baseUrls:Object.fromEntries(Object.entries(e.baseUrls).map(([r,i])=>[r,s(i)]))}:{},...e.health&&t.health?{health:{...t.health,...e.health.url!==void 0?{url:s(e.health.url)}:{},...e.health.command!==void 0?{command:s(e.health.command)}:{}}}:{},...e.revisions&&t.revisions?{revisions:t.revisions.map((r,i)=>({...r,url:s(e.revisions[i].url)}))}:{}}}var yK=G(require("path"));var QIe="test-execution-contexts.json";var m1e=10*6e4;function BD(e){let t=Vs(yK.join(e.outputsDir,QIe));return Array.isArray(t)?t:[]}var xD=(e,t)=>e.file===t.file&&(e.repository??"")===(t.repository??"");function $D(e){return e.filter((t,n)=>!e.slice(n+1).some(s=>xD(t,s)))}var Dw=(r=>(r.RestApi="rest-api",r.Frontend="frontend",r.FullStack="full-stack",r.Other="other",r))(Dw||{}),Qa=(r=>(r.Critical="critical",r.High="high",r.Medium="medium",r.Low="low",r))(Qa||{}),Bu=(s=>(s.Suspected="suspected",s.Latent="latent",s.Refuted="refuted",s))(Bu||{}),QD=(s=>(s.Skyramp="skyramp",s.External="external",s.Unknown="unknown",s))(QD||{}),_D=(r=>(r.Cascade="cascade",r.Restrict="restrict",r.Orphan="orphan",r.Unknown="unknown",r))(_D||{}),ks=(r=>(r.RequirementReference="requirement-reference",r.Spec="spec",r.PrDescription="pr-description",r.CouldBreak="could-break",r))(ks||{}),It=d.string().trim().min(1),rp=It.describe("file:line"),EK=e=>It.refine(t=>t.length<=400,t=>({message:`is ${t.length} characters, over the 400 cap \u2014 ${e}`})),Zg=It.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'),TD=d.object({method:It,path:It,service:d.string().optional(),evidence:rp,repository:Zg}),_Ie=d.object({id:It.describe("short-slug, e.g. R9"),statement:It.max(400,"exceeds 400 characters \u2014 state the requirement, do not paste the spec section").describe("a testable obligation, not a summary"),source:d.nativeEnum(ks).describe("spec outranks pr-description when both state it"),evidence:It.describe("spec: file:line or a section locator. pr-description: the quoted phrase it comes from.")}),DIe=d.object({id:It.describe("short-slug"),statement:It.max(400,"exceeds 400 characters \u2014 state the behaviour, do not paste the code").describe("what the change makes true"),surface:It.describe("METHOD /path, or a component/page name"),evidence:It.describe("file:line from the diff that introduces it"),repository:Zg,satisfies:d.array(It).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)")}),NIe=d.object({id:It.describe("short-slug"),file:It,line:d.number().optional(),claim:EK("shorten it to the one sentence that states the defect, and move the supporting detail into `evidence`"),severity:d.nativeEnum(Qa),evidence:EK("cite the file:line and the one line that shows it, rather than reproducing the surrounding code").describe("quoted diff/code line"),status:d.nativeEnum(Bu),repository:Zg,conflictsWith:d.array(It).optional().describe("requirement ids (from `requirements`) this defect contradicts or leaves unimplemented \u2014 a lower-precedence source (the diff, or the PR description) lost")}),PIe=d.object({name:It,language:d.string().optional(),framework:d.string().optional(),evidence:rp,repository:Zg}),OIe=d.object({dir:It,framework:d.string().optional(),kind:d.nativeEnum(QD),evidence:rp,repository:Zg}),UIe=d.object({from:It,to:It,onDelete:d.nativeEnum(_D),evidence:rp}),FIe=d.object({entity:It,field:It,values:d.array(d.string()),evidence:rp}),MIe=d.object({entities:d.array(d.object({name:It,evidence:rp})),references:d.array(UIe).describe("INBOUND references \u2014 what still points at an entity when it is deleted"),stateFields:d.array(FIe)}),DD=d.object({schemaVersion:d.literal(1),repository:d.object({path:It.describe("absolute repo path"),currentBranch:It,baseBranch:It}),project:d.object({type:d.nativeEnum(Dw),primaryLanguage:It,languages:d.array(d.string()),frameworks:d.array(d.string())}),services:d.array(PIe),infrastructure:d.object({containerized:d.boolean(),hasDockerCompose:d.boolean(),composeFiles:d.array(d.string()),hasCiCd:d.boolean()}),diff:d.object({changedFiles:d.array(d.string()).describe("as git reports them; a file in another checkout may carry that repo's name"),nonApplicationOnly:d.boolean(),summary:It.describe("\u2264400 chars")}),endpoints:d.object({new:d.array(TD),modified:d.array(TD),removed:d.array(TD)}),existingTests:d.object({locations:d.array(OIe)}),entityMap:MIe,requirements:d.array(_Ie).describe("from a spec (attached or linked) and/or the PR description; empty when neither states a testable obligation"),behaviors:d.array(DIe),findings:d.array(NIe),unexamined:d.array(d.string()).describe("files or areas outside this change you did not open"),summary:It.describe("one paragraph on what this change does and its test-relevant risk")});var VIe=d.object({route:d.string().describe('the page this step happens on, e.g. "/products/:id"'),action:d.string().describe('what the user does there, through the UI, e.g. "clicks Add to cart"'),clauses:d.array(d.string()).optional().describe("the plan clause ids this step exercises"),check:d.string().optional().describe("what the user then sees that shows the step worked; the test asserts it")}),Kg=(n=>(n.InProcess="in-process",n.Browser="browser",n))(Kg||{}),bK=(s=>(s.Spec="spec",s.PrDescription="pr-description",s.Inferred="inferred",s))(bK||{}),wK=d.object({id:d.string().describe('e.g. "J1"'),name:d.string().describe(`the flow in a user's words, e.g. "buy a product with a coupon"`),entry:d.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:d.array(VIe).describe("every step, in order, from the entry page to the outcome: at least two"),outcome:d.string().describe("what the user sees at the end that shows the flow worked: every part of it"),finishes:d.string().optional().describe('the user action that completes the task, verb first, e.g. "places the order"; the journey walks on to it'),kind:d.nativeEnum(Kg).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:d.nativeEnum(bK).optional().describe("spec or pr-description when one describes this flow (quote it under evidence), else inferred"),evidence:d.string().optional().describe("for spec or pr-description: its words that describe the flow"),testFile:d.string().describe("the browser test file it goes in, beside the repo's existing e2e tests")}),Nw=d.object({journey:d.string().describe("the plan's journey id"),file:d.string().describe("the browser test file that walks it"),brokeAt:d.object({step:d.number().int().describe("the 1-based step whose check failed first"),expected:d.string(),actual:d.string().describe("what the app did instead, from the runner's output"),notReached:d.array(d.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:d.string().describe("the title of the one test in that file that walks it end to end")});var T1e=Object.fromEntries([...["ts","tsx","mts","cts","js","jsx","mjs","cjs"].map(e=>[e,"node"]),...["java","kt","kts","groovy","scala"].map(e=>[e,"jvm"]),["py","python"],["go","go"]]);var Q1e=["stale_test","open_question"],_1e=["low","medium","high","critical"];var IK=String.raw`(?:\[[^\]]*\]|\([^)]*\))`,GIe=String.raw`(?:["'\u201c\u2018\x60]|\*{1,2})?[^\s:"'\u201c\u201d\u2018\u2019\x60*()[\],]+(?:["'\u201d\u2019\x60]|\*{1,2})?`,CK=String.raw`(?:${IK}|${GIe}(?:\s*${IK})?)`,SK=String.raw`(?:\s*:|\s+[\u2014\u2013-])`,P1e=new RegExp(String.raw`^\s*(?:${CK}(?:,\s*${CK})*(?::L?\d+(?:[-\u2013]\d+)?${SK}?|${SK})|\[[^\]\s]+\]|\([^)\s]+\))\s+`);var op=G(require("fs")),nn=G(require("path"));var yo=d.string().trim().min(1),Eo=72,zIe=d.object({repository:yo.optional().describe("owner/repo of the checkout this lint ran in, when the run has several; omit for the working checkout"),tool:d.string(),command:d.string().describe("the exact command you ran, scoped to the changed files"),clean:d.boolean(),notRun:d.string().optional().describe("why no linter checked the files, when none could (SKYR-5827): then `clean` is false and does not hold the tests back"),fixed:d.array(d.string()).optional().describe("files you fixed"),uncovered:d.array(d.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.")});var ND=d.object({schemaVersion:d.literal(1),lint:d.array(zIe).min(1).describe("one entry per checkout this run wrote tests in, each run from that checkout"),fileConventions:d.object({ok:d.boolean(),notes:d.string().optional()}),ciReadiness:d.object({covered:d.boolean().describe("will the repo's CI run these tests?"),notes:d.string().optional(),unrecorded:d.array(d.string()).optional().describe("tests with no record of whether CI runs them: not covered, and not known to be left out")}),dependencies:d.object({added:d.array(d.object({package:d.string(),manifest:d.string(),repository:yo.optional().describe("owner/repo of the manifest's checkout; omit for the working checkout"),reason:yo.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:d.array(d.object({file:yo,repository:yo.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:d.object({message:yo.refine(e=>e.split(`
258
- `)[0].length<=Eo,{message:`subject line must be <= ${Eo} chars`})}),pr:d.object({title:yo.max(Eo,`must be <= ${Eo} chars`),body:yo}),ready:d.boolean().describe("a statement of fact: true only if the tests are fit to commit as they stand"),blockers:d.array(d.string()).describe("what blocks the commit \u2014 required non-empty when ready is false"),summary:yo.describe("one paragraph")});function Xg(e){return(e?.blockers??[]).slice(0,3).join("; ")}var Da=G(require("fs")),ip=G(require("path"));var zn="{junit}",Pw=(i=>(i.Junit="junit",i.Trx="trx",i.GoTestJson="go-test-json",i.JestJson="jest-json",i.PlaywrightList="playwright-list",i))(Pw||{}),PD=(t=>(t.Minitest="minitest",t))(PD||{}),kK=d.string().trim().min(1),xu=d.object({cwd:kK.describe('repo-relative directory the command starts in ("." for the root)'),argv:d.array(kK).min(1).describe(`the command as separate arguments, run without a shell; for a junit or trx report an argument or env value holds ${zn}, where the report is written (not for Maven or Gradle, whose build writes its own)`),env:d.record(d.string(),d.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:d.object({format:d.nativeEnum(Pw).describe(`junit (JUnit XML to ${zn}), trx (to ${zn}), jest-json (Jest's --json or Vitest's --reporter=json, --outputFile=${zn}), or go-test-json (go test -json on the command's output)`),reporter:d.nativeEnum(PD).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 sp="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)";var j1e=`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 ${zn} in the reporter's argument or env setting), trx (a TRX file to ${zn}, which every dotnet test writes with its built-in logger), jest-json (Jest's --json --outputFile=${zn}, or Vitest's --reporter=json --outputFile=${zn}: built in, no reporter package), or go-test-json (go test -json, read from the command's output). A Maven or Gradle command names no ${zn}: 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 ${zn} itself. A setting the tests or reporter read goes in "env" (RAILS_ENV=test, or PLAYWRIGHT_JUNIT_OUTPUT_FILE=${zn} with playwright test --reporter=junit): the run sets it, so never wrap the command in a shell to set one. The run sets CI=1, as a CI job does: if your own run needed CI unset or set otherwise, give CI that value in "env" (empty when unset). The run replaces ${zn} in argv and env with its report path, executes the command, and reads that report.`;var vo=(r=>(r.ExistingEvidenceSufficient="existing_evidence_sufficient",r.TargetedUnit="targeted_unit",r.RuntimeRequired="runtime_required",r.BlockedPreflight="blocked_preflight",r))(vo||{}),bo=(i=>(i.ExistingEvidence="existing_evidence",i.Unaffected="unaffected",i.ExistingUnit="existing_unit",i.NewUnit="new_unit",i.Runtime="runtime",i))(bo||{}),OD=(n=>(n.Repository="repository",n.Testbot="testbot",n))(OD||{}),UD=(s=>(s.Identified="identified",s.Passed="passed",s.Failed="failed",s))(UD||{}),xr=d.string().trim().min(1),qIe=d.string().regex(/^[a-z0-9][a-z0-9-]*$/,"must be a short lowercase slug").describe("short-slug");var HIe=d.object({id:qIe,source:d.nativeEnum(OD),kind:d.nativeEnum(ua),outcome:d.nativeEnum(UD),summary:xr.max(400).describe("one line: what it shows"),tests:d.array(xr).optional().describe("source repository: the existing tests, as repo-relative paths, optionally path::test-name"),repository:xr.optional().describe("source repository: owner/repo the tests live in, when the run has several checkouts; omit for the working checkout"),command:xr.optional().describe("source testbot: the exact command you ran, as you ran it"),run:xu.optional().describe(`source repository, for tests in ${sp}: how the run executes the whole of each of these test files, all of them in one command, never narrowed to the named tests and never only listed, with the repository's own runner writing JUnit XML to {junit}. A test is credited to a file only by its name or by a report that names the file`)}),JIe=d.object({behaviorId:xr.describe("an id from analyze's behaviors"),mechanism:d.nativeEnum(bo),evidenceIds:d.array(xr).default([]).describe("existing_evidence: the ci-<n> or evidence ids that establish it; existing_unit: the evidence id naming the tests to run"),covers:d.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')}),FD=(s=>(s.Browser="browser",s.RunningApp="running-app",s.Outside="outside",s))(FD||{}),WIe=d.object({behaviorId:d.string().trim().optional().describe("an id from analyze's behaviors, when it is about one"),missing:xr.max(600).describe("the evidence that is required and cannot be obtained in this run"),needs:d.nativeEnum(FD).optional().describe("what that evidence needs: browser (only a real browser shows it), running-app (only the running app or its server shows it: its real requests, sign-in and permissions, what it saves), or outside (something the running app here could not give either: a third-party service it calls, hardware)")}),YIe=d.object({file:xr.describe("the changed file the failure is in"),repository:xr.optional().describe("owner/repo the file is in, when the run has several checkouts; omit for the working checkout"),reason:xr.max(300).describe("what prerequisite the change fails"),evidence:xr.max(400).describe("the error line, quoted")}),ZIe=d.object({behaviorId:xr.describe("an id from analyze's behaviors"),reason:xr.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)")}),em=d.object({schemaVersion:d.literal(1),decision:d.nativeEnum(vo),evidence:d.array(HIe).describe("evidence this session found or produced; CI results are the ci-<n> items and are not restated here"),plan:d.array(JIe).describe("how each changed behavior's evidence is obtained"),gaps:d.array(WIe),outOfScope:d.array(ZIe).optional().describe("behaviors analyze found that this change neither changes nor states"),blocked:YIe.optional().describe("only for blocked_preflight"),rationale:xr.max(1200).describe("\u22641200 characters: why this evidence is enough, or what it still lacks \u2014 the scope you chose and why")});function _a(e){let t=Ae(e,"recommend.json");if(!t||!Array.isArray(t.generate)||!Array.isArray(t.maintenance))return;let n=t;return{...n,maintenance:n.maintenance.map(({repository:s,...r})=>({...r,test:r.test.trim().replace(/^\.\//,""),...s?.trim()?{repository:s.trim()}:{}}))}}var jD=".skyramp/staged";function tCe(e){return jn(ZR,e).errors}function nCe(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=tCe(n);return r.length>0?{errors:r}:{generate:n,errors:[]}}function Ow(e,t=[]){return nCe(e.stdout,t)}function rCe(e){return e.generate.filter(t=>t.type!=="ui").map(t=>t.id)}function VD(e){return e.generate.filter(t=>t.type==="ui").map(t=>t.id)}var Uw={backend:{stage:"generate",cases:rCe,noRecommendCoverage:"recommend.json missing or malformed \u2014 cannot check coverage",noRecommendIntent:"recommend.json missing or malformed \u2014 cannot check intent",uncovered:e=>`recommend case "${e}" is not covered by any generated test`,unknownCovered:e=>`test covers unknown recommend id "${e}"`,unasserted:e=>`case "${e}" has no verified assertion enforcing its expected_observable`,usedCodegen:X4,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:VD,noRecommendCoverage:"recommend.json not found \u2014 cannot check UI coverage",noRecommendIntent:"recommend.json not found \u2014 cannot check UI intent",uncovered:e=>`UI case "${e}" is not covered by any generated UI test`,unknownCovered:e=>`test covers "${e}" which is not a recommend UI case`,unasserted:e=>`UI case "${e}" has no verified assertion enforcing its expected_observable`,usedCodegen:eZ,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."}},bVe=wr("generate-schema",(e,t)=>Ow(t,e.secretValues));function sCe(e){let t=Uw[e];return{name:`${t.stage}-coverage`,verify(n,s){let{generate:r,errors:i}=Ow(s,n.secretValues);if(!r)return An(this.name,i);let o=_a(n);if(!o)return An(this.name,[t.noRecommendCoverage]);let a=new Set(r.tests.flatMap(p=>p.covers)),c=[],u=t.cases(o);for(let p of u)a.has(p)||c.push(t.uncovered(p));let l=new Set(e==="ui"?u:o.generate.map(p=>p.id));for(let p of a)l.has(p)||c.push(t.unknownCovered(p));if(e==="backend"){let p=new Set(r.deferredUi),h=new Set(VD(o));for(let g of h)!p.has(g)&&!a.has(g)&&c.push(`UI case "${g}" is neither covered nor deferred to the UI stage`);for(let g of p)h.has(g)||c.push(`deferredUi lists "${g}" which is not a UI case`)}return c.length===0?{name:this.name,passed:!0}:An(this.name,c)}}}function iCe(e){let t=Uw[e];return{name:`${t.stage}-intent`,verify(n,s){let{generate:r,errors:i}=Ow(s,n.secretValues);if(!r)return An(this.name,i);let o=_a(n);if(!o)return An(this.name,[t.noRecommendIntent]);let{asserted:a,errors:c,badFiles:u}=pCe(r,n.inputs.repositoryPath),l=c.length;for(let h of t.cases(o))a.has(h)||c.push(t.unasserted(h));if(c.length===0)return{name:this.name,passed:!0};let p=An(this.name,c);return l>0&&l===c.length&&u.size>0?{...p,droppable:[...u]}:p}}}function oCe(e){let t=Uw[e];return n=>{if(!n.inputs.skyrampMcp?.command||e==="backend"&&!kD(n))return;let s=ip.join(n.outputsDir,`${t.stage}-stream.ndjson`);if(!(!Da.existsSync(s)||t.usedCodegen(s)))return tZ(s)?t.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 wVe=sCe("backend"),IVe=iCe("backend"),CVe=oCe("backend");var RK=e=>e.replace(/\s+/g,"");var MD={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[e,t]of[["javascript","typescript"],["kotlin","java"]])MD[e]=MD[t];function aCe(e,t){if(e.includes(wh(t))||RK(e).includes(RK(t)))return!0;let n=t.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!/^(\/\/|#|\*|\/\*)/.test(s));return n.length>0&&n.every(s=>e.includes(wh(s)))?!0:dCe(e,t)}var cCe=/\bassert\w*\b|\bexpect\s*\(|\.should\b|\brequire\s*\(/i,uCe=12,lCe=/,\s*\(\s*#|,\s*f?["'`]|\s+#\s|\s+\/\/|\s*\((?:line|lines|at line)\b|\s*,\s*$/i;function dCe(e,t){let n=t.split(/\s*;\s*|\s*\.\.\.\s*|\r?\n/),s=0;for(let r of n){let i=cCe.exec(r);if(!i)continue;let o=r.slice(i.index),a=lCe.exec(o);if(a&&(o=o.slice(0,a.index)),o=wh(o).replace(/[,\s]+$/,""),o.length<uCe||!e.includes(o))return!1;s++}return s>0}function pCe(e,t){let n=new Set,s=[],r=new Set;for(let i of e.tests){let o=ip.resolve(t,i.file);if(!Da.existsSync(o))continue;let a=wh(Da.readFileSync(o,"utf-8"));for(let c of i.assertions??[]){if(!aCe(a,c.evidence)){s.push(`assertion evidence for "${c.case}" not found in ${i.file} \u2014 cite the real assertion line`),r.add(i.file);continue}i.covers.includes(c.case)?n.add(c.case):(s.push(`assertion cites case "${c.case}" not in that test's covers[]`),r.add(i.file))}}return{asserted:n,errors:s,badFiles:r}}var fCe=/\.(spec|test)\.[cm]?[jt]sx?$/i;function BK(e){let t;try{t=Gt([...Zn,"status","--porcelain","--untracked-files=all"],{env:pt(),cwd:e,encoding:"utf-8",stdio:["ignore","pipe","ignore"]})}catch{return}let n=r=>/_scaffold/i.test(r)||Ih.test(r),s=[];for(let r of t.split(`
259
- `)){if(!r.trim()||r.length>1&&r[1]==="D")continue;let i=r.slice(3).trim(),o=i.indexOf(" -> ");if(o!==-1&&(i=i.slice(o+4).trim()),i=i.replace(/^"|"$/g,""),!i)continue;let a=i.replace(/^\.\//,"");a.startsWith(".skyramp/")||!n(a)||s.push(a)}return s}function hCe(e){let t=Uw[e],n=e==="ui";return{name:`${t.stage}-no-litter`,verify(s){let r=BK(s.inputs.repositoryPath);if(r===void 0)return{name:this.name,passed:!0};let i=r.filter(o=>fCe.test(o)===n);return i.length===0?{name:this.name,passed:!0}:An(this.name,[`${t.stage} left files outside .skyramp/ \u2014 move the staged test into .skyramp/staged/ and delete any codegen draft (e.g. *_scaffold.*): ${i.slice(0,6).join(", ")}`])}}}var SVe=hCe("backend");var ACe="write-stale-updates",yCe={[ACe]:"stale test updates"};var tm=G(require("fs")),$u=G(require("path"));function QK(e){return jn(XR,e).errors}function bCe(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=QK(n);return r.length>0?{errors:r}:{adapt:n,errors:[]}}var wCe="adapt-scratch",$K=`${wCe}/adapt-result.json`;function _K(e,t){let n=$u.join(e.outputsDir,$K),s;try{s=tm.readFileSync(n,"utf-8")}catch{s=void 0}if(s!==void 0&&(e.secretValues??[]).some(o=>s.includes(o)))return{errors:[`${$K} contains a secret value (token / credential) \u2014 never write it anywhere`]};let r=bCe(t.stdout,e.secretValues);if(r.adapt)return r;let i=s!==void 0?Vs(n):void 0;return i!==void 0&&QK(i).length===0?{adapt:i,errors:[]}:r}var KVe=wr("adapt-schema",_K);function DK(e){return nm(e).map(t=>t.path)}function nm(e){return GD(e)??[]}function GD(e){let t;try{t=Gt([...Zn,"status","--porcelain","-z","--untracked-files=all"],{env:pt(),cwd:e,encoding:"utf-8",maxBuffer:16*1024*1024})}catch{return}let n=t.split("\0"),s=[];for(let r=0;r<n.length;r++){let i=n[r];if(i.length<4)continue;let o=i.slice(0,2);s.push({code:o,path:i.slice(3)}),(o[0]==="R"||o[0]==="C")&&r++}return s}var cGe=2*1024*1024;var zD=(n=>(n.Patch="PATCH",n.Put="PUT",n))(zD||{});var rm=d.lazy(()=>d.union([d.string(),d.number().finite(),d.boolean(),d.null(),d.array(rm),d.record(rm)])),fn=d.string().trim().min(1),PK=d.string().regex(/^[A-Za-z_]\w*$/).optional(),qD=d.number().int().refine(e=>e>=200&&e<300||e>=400&&e<500,"Expected an explicit success or client rejection status").optional(),NK=d.array(fn).min(1).max(20).optional(),ICe=d.object({environmentId:d.string().uuid(),environmentAddress:d.string().url(),targetId:fn.optional(),appOrigin:d.string().url().optional(),persistenceRevision:dh.optional(),offLimits:d.array(fn),bearerTokenEnv:PK,route:d.object({kind:d.literal("persistence")}).strict()}).strict().refine(e=>!e.persistenceRevision||!e.targetId&&!e.appOrigin,"A generated persistence decision cannot include legacy policy lookup fields"),OK=d.array(d.discriminatedUnion("op",[d.object({op:d.literal("create"),collection:fn,body:d.record(rm),uniqueField:fn,expectedStatus:qD,responseIdPath:NK,responseUniqueFieldPath:NK,as:fn}).strict(),d.object({op:d.literal("read"),resource:fn,as:fn,expectedStatus:qD,query:d.record(d.string()).optional()}).strict(),d.object({op:d.literal("update"),resource:fn,method:d.nativeEnum(zD).optional(),expectedStatus:qD,body:d.record(rm),as:fn}).strict(),d.object({op:d.literal("assert"),resource:fn,path:d.array(fn),equals:rm}).strict(),d.object({op:d.literal("assertStatus"),resource:fn,equals:d.number().int().min(200).max(499)}).strict(),d.object({op:d.literal("assertHeader"),resource:fn,name:d.string().regex(/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/),equals:d.string().nullable()}).strict()])).min(1).refine(e=>e.some(t=>t.op==="assert"||t.op==="assertStatus"||t.op==="assertHeader"),"A runnable test must retain a planned assertion"),Fw=d.object({name:fn,bearerTokenEnv:PK,steps:OK.describe("ordered objects with op: create (collection, body, uniqueField, as; optional expectedStatus, responseIdPath, responseUniqueFieldPath), read (resource, as; optional expectedStatus, query), update (resource, body, as; optional expectedStatus, method PUT or PATCH), assert (resource, path, equals), assertStatus (resource, equals), or assertHeader (resource, name, equals). Resource names an earlier request alias and paths are arrays of JSON keys")}).strict(),UK=d.union([d.object({name:fn,definition:ICe,steps:OK}).strict(),d.object({name:fn,restriction:fn,sourceAsset:d.object({path:fn.regex(/^(?!\/)(?!.*(?:^|\/)\.\.?(?:\/|$))[^\\]+\.source$/),sha256:d.string().regex(/^[a-f0-9]{64}$/)}).strict()}).strict()]),HD=`"use strict";
257
+ `,u-1),p=Number(c.slice(l+1,u).trim()),h=c.slice(u+1);return{status:Number.isFinite(p)?p:0,body:c.slice(0,l),...h?{redirect:h}:{}}},async runCommand(r,i){let{steps:o,reason:a}=Qc(r);if(!o)return{exitCode:1,output:`${aK}${a}`};let c="";for(let u of o){if(Date.now()>=e)return{exitCode:1,output:"health check time limit reached"};let l=await iK(u,{cwd:i,deadlineMs:Math.min(e,Date.now()+6e4),env:pt(),signal:t});if(c+=`${l.stdout??""}${l.stderr??""}`,l.exitCode!==0)return{exitCode:l.exitCode,output:c}}return{exitCode:0,output:c}}}}function EIe(e){return e?Object.entries(e).flatMap(([t,n])=>["-H",`${t}: ${n}`]):[]}function cK(e){return e.trim().replace(/^\.\//,"").replace(/\/+$/,"")}function vIe(e){if(!e.inputs)return[];let t=Gs(e),n=r=>{let i=typeof r=="string"?r:r?.path??r?.file;return typeof i=="string"&&i.trim()?cK(i):void 0},s=(r,i)=>r?(i??[]).flatMap(o=>{let a=n(o);return a?[{repository:r,path:a}]:[]}):[];return[...s(Si(e.inputs).slug,[...t?.changedFiles??[],...t?.newFiles??[]]),...(t?.relatedChanges??[]).flatMap(r=>s(r.repository,r.changedFiles))]}function bIe(e,t){let n=Ta.resolve(e.inputs.repositoryPath,t.trim()),s=IB(e.inputs,n),r=s&&Ta.relative(s.path,n);return s&&r?{repository:s.slug,path:r.split(Ta.sep).join("/")}:void 0}function _w(e,t={}){let n=t.budgetMs??pIe,s=t.intervalMs??fIe;return{name:"deploy-health",async verify(r,i){if(r.signal?.aborted)return{name:this.name,passed:!1,details:"health check cancelled"};let o=e??Qw(r.deadlineMs??1/0,r.signal,r.inputs.repositoryPath),{deploy:a,errors:c}=Ru(i,r.inputs?.repositoryPath,r.secretValues);if(!a)return{name:this.name,passed:!1,details:c.slice(0,6).join("; ")};if(a.outcome==="bringup-failed")return{name:this.name,passed:!0};if(a.outcome==="change-broke-bringup"){let I=vIe(r),C=(a.suspectFiles??[]).map(cK),w=C.filter(x=>{let S=bIe(r,x);return!!S&&GE(I,S.repository,S.path)});return I.length>0&&w.length===0?{name:this.name,passed:!1,details:`change-broke-bringup claimed, but none of suspectFiles [${C.slice(0,4).join(", ")}] is a file this PR changed \u2014 that is not attributable to the PR. Re-run bring-up; if it still fails for a reason outside the diff, record outcome "bringup-failed" (with bringupError) instead.`}:{name:this.name,passed:!0}}let u=a.health;if(!u)return{name:this.name,passed:!1,details:"health is missing although the app is recorded as up"};let l=AIe(u.headers),p=(I,C=!1)=>({ok:!1,details:I,transient:C}),h=async()=>{if(!kw(u.url,mD(r)))return p(`health url ${u.url} is not the app under test \u2014 this gate probes only loopback, the Test Environment's address or an address the Target's settings give, never an arbitrary destination. Record the URL the deployed app actually answers on.`);let I=await o.httpGet(u.url,u.headers);if("error"in I)return p(`health url ${u.url} unreachable: ${I.error}`,!0);let C=Number(u.status??200);if(I.status!==C)return p(`health url returned ${I.status}, expected ${C}`,!0);if(!I.body.trim())return p("health url returned empty body \u2014 must return data",!0);let w=(u.output??"").trim();if(w){let x=rK(w,I.body);if(!x.ok)return p(`health url ${u.url} no longer answers as recorded \u2014 ${x.why}. Either the app is not answering as it did at deploy time, or health.output is not verbatim: record ONLY the response body, with no commentary appended.`)}return{ok:!0}},g=async()=>{let I=await o.runCommand(u.command,r.inputs.repositoryPath),C=I.output.startsWith(aK);if(I.exitCode!==0)return p(`health command exited ${I.exitCode}: ${I.output.slice(0,200)}`,!C);if(!I.output.trim())return p("health command produced no output",!0);let w=(u.output??"").trim();if(w.length<16)return p(`health command output "${w}" is too thin to be a data check \u2014 the check must return real application data, not a status token`);let x=rK(w,I.output);return x.ok?{ok:!0}:p(`health command did not reproduce its recorded check \u2014 ${x.why}. Either the app is not answering as it did at deploy time, or health.output is not verbatim: record ONLY what the command wrote, with no commentary appended.`)},m;if(u.command&&(l||!u.url))m=g;else{if(u.url&&l)return{name:this.name,passed:!1,details:`health.headers contains a documented placeholder (${Object.entries(u.headers??{}).filter(([,I])=>/<[^>]+>/.test(String(I))).map(([I])=>I).join(", ")}), and this gate RE-EXECUTES the probe \u2014 a placeholder cannot authenticate. Record a health.command instead (a script that fetches its own token and hits the URL); do not put a real credential in the artifact.`};u.url?m=h:u.command&&(m=g)}if(!m)return{name:this.name,passed:!1,details:"health has neither url nor command"};let y=Date.now(),v=y+n,E=await m();for(;!E.ok&&E.transient&&!r.signal?.aborted&&Date.now()+s<v&&(await new Promise((I,C)=>{let w,x=Y=>{clearTimeout(w),r.signal?.removeEventListener("abort",S),Y?C(Y):I()},S=()=>x();if(r.signal?.addEventListener("abort",S,{once:!0}),r.signal?.aborted){x();return}t.sleep?t.sleep(s).then(()=>x(),x):w=setTimeout(()=>x(),s)}),!r.signal?.aborted);)E=await m();if(r.signal?.aborted)return{name:this.name,passed:!1,details:"health check cancelled"};if(E.ok)return{name:this.name,passed:!0};let b=Math.round((Date.now()-y)/1e3);return{name:this.name,passed:!1,details:E.transient&&b>0?`${E.details} (still failing after ${b}s)`:E.details}}}}function kD(e){return uK(e)&&Yg(e).length===0&&SD(e.inputs?.sharedEnvironment).length===0}function uK(e){let t=wIe(e);if(!t&&e.state.stages.deploy?.status!=="passed")return!1;let n=Ae(e,"deploy.json");return n?lK(n):!t}function lK(e){return e?.outcome==="clean"||e?.outcome==="recipe-drift"}function wIe(e){let t=e.state.stages.plan,n=e.state.stages.deploy;return!(e.inputs?.pipeline?e.inputs.pipeline==="two-step":!n)||t?.status!=="passed"?!1:!n||n.updatedAt<=t.updatedAt}async function IIe(e,t,n){let s=new URL(t.url).origin;return(URL.canParse(e.url)?new URL(e.url).origin:e.url)===s?xw(e.url,n):{error:`${e.url} is not on ${s}, where ${t.name} runs`}}async function CIe(e,t,n){let s=$w(e.inputs??{}),r=[];for(let i of t){let o=s.find(l=>l.name===i.component);if(!o){r.push(`revisions names "${i.component}", which is not a shared component listed for a revision check`);continue}let a=await IIe(i,o,n);if("error"in a){r.push(`the revision check of ${o.name} could not be re-run: ${Hs(a.error,e.secretValues??[]).slice(0,200)}`);continue}let c=Bw(o.expectedRevision,{body:i.output}),u=Bw(o.expectedRevision,a);c.observedRevision!==u.observedRevision&&r.push(`the revision check of ${o.name} names ${u.observedRevision??"no commit"} when re-run, but its recorded output names ${c.observedRevision??"no commit"} \u2014 record what the check returned, verbatim, or leave the component out`)}return r}function dK(e,t=1/0,n){return async(s,r)=>{if(!Vr(e))throw new Error("the guarded setup network boundary is unavailable");let i=n&&r?.signal?AbortSignal.any([n,r.signal]):n??r?.signal??void 0,o=await Qw(t,i,e).httpGet(String(s));if("error"in o)throw new Error(o.error);return new Response([204,205,304].includes(o.status)?null:o.body,{status:o.status,headers:o.redirect?{Location:o.redirect}:void 0})}}function pK(e){let t=e.inputs;return t?.setupEvents&&!t.recheck&&En(t)?dK(t.repositoryPath,e.deadlineMs,e.signal):void 0}function fK(e){return{name:"shared-revisions",async verify(t,n){let{deploy:s}=Ru(n,t.inputs?.repositoryPath,t.secretValues),r=await CIe(t,s?.revisions??[],e??pK(t));return r.length?{name:this.name,passed:!1,details:r.join("; ")}:{name:this.name,passed:!0}}}}async function hK(e,t,n){let s=e.inputs?.sharedEnvironment;if(!ID(s))return{};let{deploy:r}=Ru(t,e.inputs.repositoryPath,e.secretValues),i=await YZ(s,r?.revisions??[],n??pK(e),e.secretValues??[]);return Ln(e,np,Hs(i,e.secretValues??[]),[])}function gK(e,t){let{deploy:n,errors:s}=Ru(t,e.inputs?.repositoryPath,e.secretValues),r=n?.health?.headers?{...n,health:{...n.health,headers:Object.fromEntries(Object.keys(n.health.headers).map(a=>[a,"<redacted>"]))}}:n,i=e.secretValues??[],o=r&&SIe(r,Hs(r,i),i.filter(a=>a.length>=Sh));return Ln(e,"deploy",o,s)}function SIe(e,t,n){let s=r=>Lt(r,n);return{...t,teardown:s(e.teardown),...e.baseUrls?{baseUrls:Object.fromEntries(Object.entries(e.baseUrls).map(([r,i])=>[r,s(i)]))}:{},...e.health&&t.health?{health:{...t.health,...e.health.url!==void 0?{url:s(e.health.url)}:{},...e.health.command!==void 0?{command:s(e.health.command)}:{}}}:{},...e.revisions&&t.revisions?{revisions:t.revisions.map((r,i)=>({...r,url:s(e.revisions[i].url)}))}:{}}}var yK=G(require("path"));var QIe="test-execution-contexts.json";var A1e=10*6e4;function BD(e){let t=Vs(yK.join(e.outputsDir,QIe));return Array.isArray(t)?t:[]}var xD=(e,t)=>e.file===t.file&&(e.repository??"")===(t.repository??"");function $D(e){return e.filter((t,n)=>!e.slice(n+1).some(s=>xD(t,s)))}var Dw=(r=>(r.RestApi="rest-api",r.Frontend="frontend",r.FullStack="full-stack",r.Other="other",r))(Dw||{}),Qa=(r=>(r.Critical="critical",r.High="high",r.Medium="medium",r.Low="low",r))(Qa||{}),Bu=(s=>(s.Suspected="suspected",s.Latent="latent",s.Refuted="refuted",s))(Bu||{}),QD=(s=>(s.Skyramp="skyramp",s.External="external",s.Unknown="unknown",s))(QD||{}),_D=(r=>(r.Cascade="cascade",r.Restrict="restrict",r.Orphan="orphan",r.Unknown="unknown",r))(_D||{}),ks=(r=>(r.RequirementReference="requirement-reference",r.Spec="spec",r.PrDescription="pr-description",r.CouldBreak="could-break",r))(ks||{}),It=d.string().trim().min(1),rp=It.describe("file:line"),EK=e=>It.refine(t=>t.length<=400,t=>({message:`is ${t.length} characters, over the 400 cap \u2014 ${e}`})),Zg=It.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'),TD=d.object({method:It,path:It,service:d.string().optional(),evidence:rp,repository:Zg}),_Ie=d.object({id:It.describe("short-slug, e.g. R9"),statement:It.max(400,"exceeds 400 characters \u2014 state the requirement, do not paste the spec section").describe("a testable obligation, not a summary"),source:d.nativeEnum(ks).describe("spec outranks pr-description when both state it"),evidence:It.describe("spec: file:line or a section locator. pr-description: the quoted phrase it comes from.")}),DIe=d.object({id:It.describe("short-slug"),statement:It.max(400,"exceeds 400 characters \u2014 state the behaviour, do not paste the code").describe("what the change makes true"),surface:It.describe("METHOD /path, or a component/page name"),evidence:It.describe("file:line from the diff that introduces it"),repository:Zg,satisfies:d.array(It).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)")}),NIe=d.object({id:It.describe("short-slug"),file:It,line:d.number().optional(),claim:EK("shorten it to the one sentence that states the defect, and move the supporting detail into `evidence`"),severity:d.nativeEnum(Qa),evidence:EK("cite the file:line and the one line that shows it, rather than reproducing the surrounding code").describe("quoted diff/code line"),status:d.nativeEnum(Bu),repository:Zg,conflictsWith:d.array(It).optional().describe("requirement ids (from `requirements`) this defect contradicts or leaves unimplemented \u2014 a lower-precedence source (the diff, or the PR description) lost")}),PIe=d.object({name:It,language:d.string().optional(),framework:d.string().optional(),evidence:rp,repository:Zg}),OIe=d.object({dir:It,framework:d.string().optional(),kind:d.nativeEnum(QD),evidence:rp,repository:Zg}),UIe=d.object({from:It,to:It,onDelete:d.nativeEnum(_D),evidence:rp}),FIe=d.object({entity:It,field:It,values:d.array(d.string()),evidence:rp}),MIe=d.object({entities:d.array(d.object({name:It,evidence:rp})),references:d.array(UIe).describe("INBOUND references \u2014 what still points at an entity when it is deleted"),stateFields:d.array(FIe)}),DD=d.object({schemaVersion:d.literal(1),repository:d.object({path:It.describe("absolute repo path"),currentBranch:It,baseBranch:It}),project:d.object({type:d.nativeEnum(Dw),primaryLanguage:It,languages:d.array(d.string()),frameworks:d.array(d.string())}),services:d.array(PIe),infrastructure:d.object({containerized:d.boolean(),hasDockerCompose:d.boolean(),composeFiles:d.array(d.string()),hasCiCd:d.boolean()}),diff:d.object({changedFiles:d.array(d.string()).describe("as git reports them; a file in another checkout may carry that repo's name"),nonApplicationOnly:d.boolean(),summary:It.describe("\u2264400 chars")}),endpoints:d.object({new:d.array(TD),modified:d.array(TD),removed:d.array(TD)}),existingTests:d.object({locations:d.array(OIe)}),entityMap:MIe,requirements:d.array(_Ie).describe("from a spec (attached or linked) and/or the PR description; empty when neither states a testable obligation"),behaviors:d.array(DIe),findings:d.array(NIe),unexamined:d.array(d.string()).describe("files or areas outside this change you did not open"),summary:It.describe("one paragraph on what this change does and its test-relevant risk")});var VIe=d.object({route:d.string().describe('the page this step happens on, e.g. "/products/:id"'),action:d.string().describe('what the user does there, through the UI, e.g. "clicks Add to cart"'),clauses:d.array(d.string()).optional().describe("the plan clause ids this step exercises"),check:d.string().optional().describe("what the user then sees that shows the step worked; the test asserts it")}),Kg=(n=>(n.InProcess="in-process",n.Browser="browser",n))(Kg||{}),bK=(s=>(s.Spec="spec",s.PrDescription="pr-description",s.Inferred="inferred",s))(bK||{}),wK=d.object({id:d.string().describe('e.g. "J1"'),name:d.string().describe(`the flow in a user's words, e.g. "buy a product with a coupon"`),entry:d.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:d.array(VIe).describe("every step, in order, from the entry page to the outcome: at least two"),outcome:d.string().describe("what the user sees at the end that shows the flow worked: every part of it"),finishes:d.string().optional().describe('the user action that completes the task, verb first, e.g. "places the order"; the journey walks on to it'),kind:d.nativeEnum(Kg).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:d.nativeEnum(bK).optional().describe("spec or pr-description when one describes this flow (quote it under evidence), else inferred"),evidence:d.string().optional().describe("for spec or pr-description: its words that describe the flow"),testFile:d.string().describe("the browser test file it goes in, beside the repo's existing e2e tests")}),Nw=d.object({journey:d.string().describe("the plan's journey id"),file:d.string().describe("the browser test file that walks it"),brokeAt:d.object({step:d.number().int().describe("the 1-based step whose check failed first"),expected:d.string(),actual:d.string().describe("what the app did instead, from the runner's output"),notReached:d.array(d.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:d.string().describe("the title of the one test in that file that walks it end to end")});var Q1e=Object.fromEntries([...["ts","tsx","mts","cts","js","jsx","mjs","cjs"].map(e=>[e,"node"]),...["java","kt","kts","groovy","scala"].map(e=>[e,"jvm"]),["py","python"],["go","go"]]);var _1e=["stale_test","open_question"],D1e=["low","medium","high","critical"];var IK=String.raw`(?:\[[^\]]*\]|\([^)]*\))`,GIe=String.raw`(?:["'\u201c\u2018\x60]|\*{1,2})?[^\s:"'\u201c\u201d\u2018\u2019\x60*()[\],]+(?:["'\u201d\u2019\x60]|\*{1,2})?`,CK=String.raw`(?:${IK}|${GIe}(?:\s*${IK})?)`,SK=String.raw`(?:\s*:|\s+[\u2014\u2013-])`,O1e=new RegExp(String.raw`^\s*(?:${CK}(?:,\s*${CK})*(?::L?\d+(?:[-\u2013]\d+)?${SK}?|${SK})|\[[^\]\s]+\]|\([^)\s]+\))\s+`);var op=G(require("fs")),nn=G(require("path"));var yo=d.string().trim().min(1),Eo=72,zIe=d.object({repository:yo.optional().describe("owner/repo of the checkout this lint ran in, when the run has several; omit for the working checkout"),tool:d.string(),command:d.string().describe("the exact command you ran, scoped to the changed files"),clean:d.boolean(),notRun:d.string().optional().describe("why no linter checked the files, when none could (SKYR-5827): then `clean` is false and does not hold the tests back"),fixed:d.array(d.string()).optional().describe("files you fixed"),uncovered:d.array(d.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.")});var ND=d.object({schemaVersion:d.literal(1),lint:d.array(zIe).min(1).describe("one entry per checkout this run wrote tests in, each run from that checkout"),fileConventions:d.object({ok:d.boolean(),notes:d.string().optional()}),ciReadiness:d.object({covered:d.boolean().describe("will the repo's CI run these tests?"),notes:d.string().optional(),unrecorded:d.array(d.string()).optional().describe("tests with no record of whether CI runs them: not covered, and not known to be left out")}),dependencies:d.object({added:d.array(d.object({package:d.string(),manifest:d.string(),repository:yo.optional().describe("owner/repo of the manifest's checkout; omit for the working checkout"),reason:yo.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:d.array(d.object({file:yo,repository:yo.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:d.object({message:yo.refine(e=>e.split(`
258
+ `)[0].length<=Eo,{message:`subject line must be <= ${Eo} chars`})}),pr:d.object({title:yo.max(Eo,`must be <= ${Eo} chars`),body:yo}),ready:d.boolean().describe("a statement of fact: true only if the tests are fit to commit as they stand"),blockers:d.array(d.string()).describe("what blocks the commit \u2014 required non-empty when ready is false"),summary:yo.describe("one paragraph")});function Xg(e){return(e?.blockers??[]).slice(0,3).join("; ")}var Da=G(require("fs")),ip=G(require("path"));var zn="{junit}",Pw=(i=>(i.Junit="junit",i.Trx="trx",i.GoTestJson="go-test-json",i.JestJson="jest-json",i.PlaywrightList="playwright-list",i))(Pw||{}),PD=(t=>(t.Minitest="minitest",t))(PD||{}),kK=d.string().trim().min(1),xu=d.object({cwd:kK.describe('repo-relative directory the command starts in ("." for the root)'),argv:d.array(kK).min(1).describe(`the command as separate arguments, run without a shell; for a junit or trx report an argument or env value holds ${zn}, where the report is written (not for Maven or Gradle, whose build writes its own)`),env:d.record(d.string(),d.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:d.object({format:d.nativeEnum(Pw).describe(`junit (JUnit XML to ${zn}), trx (to ${zn}), jest-json (Jest's --json or Vitest's --reporter=json, --outputFile=${zn}), or go-test-json (go test -json on the command's output)`),reporter:d.nativeEnum(PD).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 sp="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)";var V1e=`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 ${zn} in the reporter's argument or env setting), trx (a TRX file to ${zn}, which every dotnet test writes with its built-in logger), jest-json (Jest's --json --outputFile=${zn}, or Vitest's --reporter=json --outputFile=${zn}: built in, no reporter package), or go-test-json (go test -json, read from the command's output). A Maven or Gradle command names no ${zn}: 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 ${zn} itself. A setting the tests or reporter read goes in "env" (RAILS_ENV=test, or PLAYWRIGHT_JUNIT_OUTPUT_FILE=${zn} with playwright test --reporter=junit): the run sets it, so never wrap the command in a shell to set one. The run sets CI=1, as a CI job does: if your own run needed CI unset or set otherwise, give CI that value in "env" (empty when unset). The run replaces ${zn} in argv and env with its report path, executes the command, and reads that report.`;var vo=(r=>(r.ExistingEvidenceSufficient="existing_evidence_sufficient",r.TargetedUnit="targeted_unit",r.RuntimeRequired="runtime_required",r.BlockedPreflight="blocked_preflight",r))(vo||{}),bo=(i=>(i.ExistingEvidence="existing_evidence",i.Unaffected="unaffected",i.ExistingUnit="existing_unit",i.NewUnit="new_unit",i.Runtime="runtime",i))(bo||{}),OD=(n=>(n.Repository="repository",n.Testbot="testbot",n))(OD||{}),UD=(s=>(s.Identified="identified",s.Passed="passed",s.Failed="failed",s))(UD||{}),xr=d.string().trim().min(1),qIe=d.string().regex(/^[a-z0-9][a-z0-9-]*$/,"must be a short lowercase slug").describe("short-slug");var HIe=d.object({id:qIe,source:d.nativeEnum(OD),kind:d.nativeEnum(ua),outcome:d.nativeEnum(UD),summary:xr.max(400).describe("one line: what it shows"),tests:d.array(xr).optional().describe("source repository: the existing tests, as repo-relative paths, optionally path::test-name"),repository:xr.optional().describe("source repository: owner/repo the tests live in, when the run has several checkouts; omit for the working checkout"),command:xr.optional().describe("source testbot: the exact command you ran, as you ran it"),run:xu.optional().describe(`source repository, for tests in ${sp}: how the run executes the whole of each of these test files, all of them in one command, never narrowed to the named tests and never only listed, with the repository's own runner writing JUnit XML to {junit}. A test is credited to a file only by its name or by a report that names the file`)}),JIe=d.object({behaviorId:xr.describe("an id from analyze's behaviors"),mechanism:d.nativeEnum(bo),evidenceIds:d.array(xr).default([]).describe("existing_evidence: the ci-<n> or evidence ids that establish it; existing_unit: the evidence id naming the tests to run"),covers:d.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')}),FD=(s=>(s.Browser="browser",s.RunningApp="running-app",s.Outside="outside",s))(FD||{}),WIe=d.object({behaviorId:d.string().trim().optional().describe("an id from analyze's behaviors, when it is about one"),missing:xr.max(600).describe("the evidence that is required and cannot be obtained in this run"),needs:d.nativeEnum(FD).optional().describe("what that evidence needs: browser (only a real browser shows it), running-app (only the running app or its server shows it: its real requests, sign-in and permissions, what it saves), or outside (something the running app here could not give either: a third-party service it calls, hardware)")}),YIe=d.object({file:xr.describe("the changed file the failure is in"),repository:xr.optional().describe("owner/repo the file is in, when the run has several checkouts; omit for the working checkout"),reason:xr.max(300).describe("what prerequisite the change fails"),evidence:xr.max(400).describe("the error line, quoted")}),ZIe=d.object({behaviorId:xr.describe("an id from analyze's behaviors"),reason:xr.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)")}),em=d.object({schemaVersion:d.literal(1),decision:d.nativeEnum(vo),evidence:d.array(HIe).describe("evidence this session found or produced; CI results are the ci-<n> items and are not restated here"),plan:d.array(JIe).describe("how each changed behavior's evidence is obtained"),gaps:d.array(WIe),outOfScope:d.array(ZIe).optional().describe("behaviors analyze found that this change neither changes nor states"),blocked:YIe.optional().describe("only for blocked_preflight"),rationale:xr.max(1200).describe("\u22641200 characters: why this evidence is enough, or what it still lacks \u2014 the scope you chose and why")});function _a(e){let t=Ae(e,"recommend.json");if(!t||!Array.isArray(t.generate)||!Array.isArray(t.maintenance))return;let n=t;return{...n,maintenance:n.maintenance.map(({repository:s,...r})=>({...r,test:r.test.trim().replace(/^\.\//,""),...s?.trim()?{repository:s.trim()}:{}}))}}var jD=".skyramp/staged";function tCe(e){return jn(ZR,e).errors}function nCe(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=tCe(n);return r.length>0?{errors:r}:{generate:n,errors:[]}}function Ow(e,t=[]){return nCe(e.stdout,t)}function rCe(e){return e.generate.filter(t=>t.type!=="ui").map(t=>t.id)}function VD(e){return e.generate.filter(t=>t.type==="ui").map(t=>t.id)}var Uw={backend:{stage:"generate",cases:rCe,noRecommendCoverage:"recommend.json missing or malformed \u2014 cannot check coverage",noRecommendIntent:"recommend.json missing or malformed \u2014 cannot check intent",uncovered:e=>`recommend case "${e}" is not covered by any generated test`,unknownCovered:e=>`test covers unknown recommend id "${e}"`,unasserted:e=>`case "${e}" has no verified assertion enforcing its expected_observable`,usedCodegen:X4,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:VD,noRecommendCoverage:"recommend.json not found \u2014 cannot check UI coverage",noRecommendIntent:"recommend.json not found \u2014 cannot check UI intent",uncovered:e=>`UI case "${e}" is not covered by any generated UI test`,unknownCovered:e=>`test covers "${e}" which is not a recommend UI case`,unasserted:e=>`UI case "${e}" has no verified assertion enforcing its expected_observable`,usedCodegen:eZ,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."}},wVe=wr("generate-schema",(e,t)=>Ow(t,e.secretValues));function sCe(e){let t=Uw[e];return{name:`${t.stage}-coverage`,verify(n,s){let{generate:r,errors:i}=Ow(s,n.secretValues);if(!r)return An(this.name,i);let o=_a(n);if(!o)return An(this.name,[t.noRecommendCoverage]);let a=new Set(r.tests.flatMap(p=>p.covers)),c=[],u=t.cases(o);for(let p of u)a.has(p)||c.push(t.uncovered(p));let l=new Set(e==="ui"?u:o.generate.map(p=>p.id));for(let p of a)l.has(p)||c.push(t.unknownCovered(p));if(e==="backend"){let p=new Set(r.deferredUi),h=new Set(VD(o));for(let g of h)!p.has(g)&&!a.has(g)&&c.push(`UI case "${g}" is neither covered nor deferred to the UI stage`);for(let g of p)h.has(g)||c.push(`deferredUi lists "${g}" which is not a UI case`)}return c.length===0?{name:this.name,passed:!0}:An(this.name,c)}}}function iCe(e){let t=Uw[e];return{name:`${t.stage}-intent`,verify(n,s){let{generate:r,errors:i}=Ow(s,n.secretValues);if(!r)return An(this.name,i);let o=_a(n);if(!o)return An(this.name,[t.noRecommendIntent]);let{asserted:a,errors:c,badFiles:u}=pCe(r,n.inputs.repositoryPath),l=c.length;for(let h of t.cases(o))a.has(h)||c.push(t.unasserted(h));if(c.length===0)return{name:this.name,passed:!0};let p=An(this.name,c);return l>0&&l===c.length&&u.size>0?{...p,droppable:[...u]}:p}}}function oCe(e){let t=Uw[e];return n=>{if(!n.inputs.skyrampMcp?.command||e==="backend"&&!kD(n))return;let s=ip.join(n.outputsDir,`${t.stage}-stream.ndjson`);if(!(!Da.existsSync(s)||t.usedCodegen(s)))return tZ(s)?t.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 IVe=sCe("backend"),CVe=iCe("backend"),SVe=oCe("backend");var RK=e=>e.replace(/\s+/g,"");var MD={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[e,t]of[["javascript","typescript"],["kotlin","java"]])MD[e]=MD[t];function aCe(e,t){if(e.includes(wh(t))||RK(e).includes(RK(t)))return!0;let n=t.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!/^(\/\/|#|\*|\/\*)/.test(s));return n.length>0&&n.every(s=>e.includes(wh(s)))?!0:dCe(e,t)}var cCe=/\bassert\w*\b|\bexpect\s*\(|\.should\b|\brequire\s*\(/i,uCe=12,lCe=/,\s*\(\s*#|,\s*f?["'`]|\s+#\s|\s+\/\/|\s*\((?:line|lines|at line)\b|\s*,\s*$/i;function dCe(e,t){let n=t.split(/\s*;\s*|\s*\.\.\.\s*|\r?\n/),s=0;for(let r of n){let i=cCe.exec(r);if(!i)continue;let o=r.slice(i.index),a=lCe.exec(o);if(a&&(o=o.slice(0,a.index)),o=wh(o).replace(/[,\s]+$/,""),o.length<uCe||!e.includes(o))return!1;s++}return s>0}function pCe(e,t){let n=new Set,s=[],r=new Set;for(let i of e.tests){let o=ip.resolve(t,i.file);if(!Da.existsSync(o))continue;let a=wh(Da.readFileSync(o,"utf-8"));for(let c of i.assertions??[]){if(!aCe(a,c.evidence)){s.push(`assertion evidence for "${c.case}" not found in ${i.file} \u2014 cite the real assertion line`),r.add(i.file);continue}i.covers.includes(c.case)?n.add(c.case):(s.push(`assertion cites case "${c.case}" not in that test's covers[]`),r.add(i.file))}}return{asserted:n,errors:s,badFiles:r}}var fCe=/\.(spec|test)\.[cm]?[jt]sx?$/i;function BK(e){let t;try{t=Gt([...Zn,"status","--porcelain","--untracked-files=all"],{env:pt(),cwd:e,encoding:"utf-8",stdio:["ignore","pipe","ignore"]})}catch{return}let n=r=>/_scaffold/i.test(r)||Ih.test(r),s=[];for(let r of t.split(`
259
+ `)){if(!r.trim()||r.length>1&&r[1]==="D")continue;let i=r.slice(3).trim(),o=i.indexOf(" -> ");if(o!==-1&&(i=i.slice(o+4).trim()),i=i.replace(/^"|"$/g,""),!i)continue;let a=i.replace(/^\.\//,"");a.startsWith(".skyramp/")||!n(a)||s.push(a)}return s}function hCe(e){let t=Uw[e],n=e==="ui";return{name:`${t.stage}-no-litter`,verify(s){let r=BK(s.inputs.repositoryPath);if(r===void 0)return{name:this.name,passed:!0};let i=r.filter(o=>fCe.test(o)===n);return i.length===0?{name:this.name,passed:!0}:An(this.name,[`${t.stage} left files outside .skyramp/ \u2014 move the staged test into .skyramp/staged/ and delete any codegen draft (e.g. *_scaffold.*): ${i.slice(0,6).join(", ")}`])}}}var kVe=hCe("backend");var ACe="write-stale-updates",yCe={[ACe]:"stale test updates"};var tm=G(require("fs")),$u=G(require("path"));function QK(e){return jn(XR,e).errors}function bCe(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=QK(n);return r.length>0?{errors:r}:{adapt:n,errors:[]}}var wCe="adapt-scratch",$K=`${wCe}/adapt-result.json`;function _K(e,t){let n=$u.join(e.outputsDir,$K),s;try{s=tm.readFileSync(n,"utf-8")}catch{s=void 0}if(s!==void 0&&(e.secretValues??[]).some(o=>s.includes(o)))return{errors:[`${$K} contains a secret value (token / credential) \u2014 never write it anywhere`]};let r=bCe(t.stdout,e.secretValues);if(r.adapt)return r;let i=s!==void 0?Vs(n):void 0;return i!==void 0&&QK(i).length===0?{adapt:i,errors:[]}:r}var XVe=wr("adapt-schema",_K);function DK(e){return nm(e).map(t=>t.path)}function nm(e){return GD(e)??[]}function GD(e){let t;try{t=Gt([...Zn,"status","--porcelain","-z","--untracked-files=all"],{env:pt(),cwd:e,encoding:"utf-8",maxBuffer:16*1024*1024})}catch{return}let n=t.split("\0"),s=[];for(let r=0;r<n.length;r++){let i=n[r];if(i.length<4)continue;let o=i.slice(0,2);s.push({code:o,path:i.slice(3)}),(o[0]==="R"||o[0]==="C")&&r++}return s}var uGe=2*1024*1024;var zD=(n=>(n.Patch="PATCH",n.Put="PUT",n))(zD||{});var rm=d.lazy(()=>d.union([d.string(),d.number().finite(),d.boolean(),d.null(),d.array(rm),d.record(rm)])),fn=d.string().trim().min(1),PK=d.string().regex(/^[A-Za-z_]\w*$/).optional(),qD=d.number().int().refine(e=>e>=200&&e<300||e>=400&&e<500,"Expected an explicit success or client rejection status").optional(),NK=d.array(fn).min(1).max(20).optional(),ICe=d.object({environmentId:d.string().uuid(),environmentAddress:d.string().url(),targetId:fn.optional(),appOrigin:d.string().url().optional(),persistenceRevision:dh.optional(),offLimits:d.array(fn),bearerTokenEnv:PK,route:d.object({kind:d.literal("persistence")}).strict()}).strict().refine(e=>!e.persistenceRevision||!e.targetId&&!e.appOrigin,"A generated persistence decision cannot include legacy policy lookup fields"),OK=d.array(d.discriminatedUnion("op",[d.object({op:d.literal("create"),collection:fn,body:d.record(rm),uniqueField:fn,expectedStatus:qD,responseIdPath:NK,responseUniqueFieldPath:NK,as:fn}).strict(),d.object({op:d.literal("read"),resource:fn,as:fn,expectedStatus:qD,query:d.record(d.string()).optional()}).strict(),d.object({op:d.literal("update"),resource:fn,method:d.nativeEnum(zD).optional(),expectedStatus:qD,body:d.record(rm),as:fn}).strict(),d.object({op:d.literal("assert"),resource:fn,path:d.array(fn),equals:rm}).strict(),d.object({op:d.literal("assertStatus"),resource:fn,equals:d.number().int().min(200).max(499)}).strict(),d.object({op:d.literal("assertHeader"),resource:fn,name:d.string().regex(/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/),equals:d.string().nullable()}).strict()])).min(1).refine(e=>e.some(t=>t.op==="assert"||t.op==="assertStatus"||t.op==="assertHeader"),"A runnable test must retain a planned assertion"),Fw=d.object({name:fn,bearerTokenEnv:PK,steps:OK.describe("ordered objects with op: create (collection, body, uniqueField, as; optional expectedStatus, responseIdPath, responseUniqueFieldPath), read (resource, as; optional expectedStatus, query), update (resource, body, as; optional expectedStatus, method PUT or PATCH), assert (resource, path, equals), assertStatus (resource, equals), or assertHeader (resource, name, equals). Resource names an earlier request alias and paths are arrays of JSON keys")}).strict(),UK=d.union([d.object({name:fn,definition:ICe,steps:OK}).strict(),d.object({name:fn,restriction:fn,sourceAsset:d.object({path:fn.regex(/^(?!\/)(?!.*(?:^|\/)\.\.?(?:\/|$))[^\\]+\.source$/),sha256:d.string().regex(/^[a-f0-9]{64}$/)}).strict()}).strict()]),HD=`"use strict";
260
260
  const spec = `,JD=`;
261
261
  let runtime;
262
262
  try { runtime = require("@skyramp/testbot-core/dist/shared-environment-test.cjs"); } catch {}
263
263
  if (runtime && typeof runtime.sharedEnvironmentTest === "function") runtime.sharedEnvironmentTest(spec, __filename);
264
264
  else require("node:test").test(spec.name, () => { throw new Error("required shared-environment guard runtime is unavailable"); });
265
265
  `;function sm(e){return HD+JSON.stringify(UK.parse(e),null,2)+JD}function wo(e){if(e.includes("\r")){if(/(?:^|[^\r])\n|\r(?!\n)/.test(e))return;e=e.replace(/\r\n/g,`
266
- `)}if(!(!e.startsWith(HD)||!e.endsWith(JD)))try{let t=UK.safeParse(JSON.parse(e.slice(HD.length,-JD.length)));return t.success&&sm(t.data)===e?t.data:void 0}catch{return}}var im=d.string().trim().min(1),CCe=d.object({cwd:im.describe(`directory the command starts in, relative to the test's checkout ("." for its root)`),argv:d.array(im).min(1).describe("the command as separate arguments, run without a shell"),env:d.record(d.string(),d.string()).optional().describe("plain settings the listing needs beyond the CI step's own; never a credential or PATH")}),FK=d.object({file:im.describe("a file of the test's checkout, relative to its root"),line:im.describe("a line of that file, quoted exactly from where its command starts to its end")}),MK=d.object({collected:d.boolean().describe("whether the repo's CI runs this test as it is"),steps:d.array(FK).optional().describe("when collected: the line in a CI file that starts the tests, then each line it runs on the way to the test runner"),runner:d.string().optional().describe("when collected: the test runner the last of those lines starts, by the name that line and the list command both use"),list:CCe.optional().describe("when collected: a command that lists the tests that runner collects without running them; Testbot runs it, and its output must name this file"),why:d.string().optional().describe("when not collected: why the repo's CI will not run it"),needs:d.array(im).optional().describe("what the test needs running outside its own process (the app, a database, another service), one entry each; omit when it needs none"),starts:d.array(FK).optional().describe("when collected and it needs any: the line that starts each of those in the CI job that runs it, in a file of ci.steps")});var pe=d.string().trim().min(1),_Ce=e=>{if(!e||typeof e!="object")return e;let t=e;return typeof t.skip=="string"&&t.skip.trim()&&(t.expected===void 0||t.expected===null)?{...t,expected:"(not tested)"}:e},DCe=d.preprocess(_Ce,d.object({id:pe.describe(`its requirement's id plus a letter, e.g. "R1a", "AC-3a"`),clause:pe.describe("one testable part of the requirement"),expected:pe.describe("the outcome the requirement calls for \u2014 taken from the requirement, never from what the code does"),skip:d.string().optional().describe("only when no test can check this clause here: why"),type:d.nativeEnum(Zs).optional().describe("the test that checks this clause: contract / integration (the API, or code called directly in-process: a function, hook or module) or ui (a page)"),target:d.string().optional().describe('its "METHOD /path", or the page / flow'),steps:d.string().optional().describe("what that test does; its expected outcome is this clause's"),finding:d.string().optional().describe("the finding id, when this clause's test also catches that defect (the defect still gets a case of its own)"),code:d.string().optional().describe("path:line of the code that decides this clause, when there is one; in another repo of the change, that repo's directory name then its path"),stated:d.string().optional().describe("the description's or spec's own words that state this clause, copied exactly, when they do"),mutates:d.boolean().optional().describe("true when its test changes state, in the test or its setup: an API POST, PUT, PATCH or DELETE, or a UI flow that submits, creates, edits or deletes"),browserOnly:d.boolean().optional().describe("true when its behaviour happens only in a browser: real clicks or keys driving page script, client-side sorting or filtering, script-driven DOM updates, focus, drag-and-drop, navigation, rendering that depends on CSS or JavaScript"),browserHarness:d.string().optional().describe("browserOnly, off the runtime path: the path of the repo's in-process browser suite its test goes in (e.g. a Django StaticLiveServerTestCase test that drives Selenium)"),quote:d.string().optional().describe("the words of the spec, plan, ticket, PR description or a test the change adds or edits that state this clause, copied exactly; a file of the repository: its path:line first. Leave it out when no source states it"),inferred:d.boolean().optional().describe("leave it out: Testbot sets it when no source states this clause (contracts/clause-grounding.ts)")})),jK=d.object({spec:d.string().optional().describe("file:line of a spec in the repository"),prDescription:d.boolean().optional().describe("or true when a pull request description says otherwise"),reference:d.string().optional().describe("or the key of an item the run was given, as listed"),says:pe.describe("what it says there, in its own words, copied exactly"),criterion:d.number().int().positive().optional().describe("an item's only: leave it out; Testbot numbers it")}).refine(e=>[!!e.prDescription,!!e.spec?.trim(),!!e.reference?.trim()].filter(Boolean).length===1,{message:`names no source, or more than one: give "spec" its file:line or "reference" an item's key, or set "prDescription", one of them; list each source as its own entry`}),NCe=d.object({id:pe.describe('the label its source gives it ("AC-3", "REQ-12"; item 4 of a numbered list is "R4"), else "R1", "R2"\u2026 in order'),statement:pe,source:d.nativeEnum(ks).describe("requirement-reference (an item the run was given), spec, pr-description (also for what the change is evidently meant to do when nothing is written down), or could-break (what the change could break that no requirement mentions)"),reference:d.string().optional().describe('requirement-reference only: the key of its item as listed, e.g. "PAY-184", or a Confluence page id such as "3021"'),evidence:pe.describe("where it is stated: for requirement-reference, the item's own words, copied exactly; else file:line, a doc section, or the quoted phrase"),criterion:d.number().int().positive().optional().describe("requirement-reference only: leave it out; Testbot numbers each criterion by the item's own label (AC2, 2.), else after the item's labels"),alsoFrom:d.array(d.object({reference:pe.regex(io).describe("the key of another uploaded document stating the same obligation"),says:pe.describe("that document's own words, copied exactly; never infer equivalence from a shared criterion number"),criterion:d.number().int().positive().optional().describe("leave out; Testbot grounds and numbers this source separately")})).optional().describe("equivalent uploaded source criteria sharing this requirement's planned cases; retain every source with its own quote. Different conditions or boundaries need distinct requirements"),notInChange:d.string().optional().describe("requirement-reference only: when the PR description or the item defers this criterion to a later change, the words that defer it, copied exactly; give it no clauses. Never for words that only say what this change covers, or only because no changed file holds its code"),unchanged:d.boolean().optional().describe("true when it asks only that behaviour stay as it was (an update or refactor that must not change how something works), whatever its source"),overrules:d.array(jK).optional().describe("requirement-reference only: each lower-ranked source that says otherwise, a spec in the repository, a PR description or another item; this requirement wins, so test what it says"),clauses:d.array(DCe)}),VK=(r=>(r.ServerError="server-error",r.DataLost="data-lost",r.FinalState="final-state",r.DerivedValues="derived-values",r))(VK||{}),PCe=d.object({id:pe.describe('e.g. "F1"'),file:pe,line:d.number().optional(),claim:pe.describe("the defect, in one sentence"),severity:d.nativeEnum(Qa),evidence:pe.describe("the code line, or the probe request and response, that shows it"),conflictsWith:d.array(pe).optional().describe("requirement or clause ids it violates"),keeps:d.string().optional().describe("for a defect no requirement or clause states: path:line of the code beside the change that keeps the rule it breaks"),rule:d.nativeEnum(VK).optional().describe("for a defect that breaks a rule every app keeps, which nothing needs to state: which one"),existing:d.string().optional().describe("only when the base already does this, in code the change left as it was, and the change does not say it fixes it: where the base does it (its file:line); such a defect gets no case"),needsApp:d.enum(["browser","live-api"]).optional().describe("only when the running app alone can show this defect and the repo has no in-process test that can: browser (page script, what the user sees after a click or a save) or live-api (code the repo tests only against the running app's API)")}),OCe=d.object({id:pe.describe('e.g. "Q1"'),question:pe.describe("what is unsettled, as a question the PR author can answer"),readings:d.array(pe).min(2).describe("each reasonable behaviour, with what points to it (file:line, or the words that suggest it)"),about:d.string().optional().describe("the requirement or clause id it is about, when there is one"),sources:d.array(jK).optional().describe("when sources of the same rank disagree on it: each of them")}),UCe=d.object({id:pe.describe('unique, a short kebab-case name for what the case checks, e.g. "ship-twice-409"'),type:d.nativeEnum(Zs).describe("contract / integration: checks the API, or calls code directly in-process (a function, hook or module); ui: checks what a user sees or does on a page"),target:pe.describe('"METHOD /path", or the page / flow'),clause:d.string().optional().describe("the clause id this case checks"),finding:d.string().optional().describe("the finding id this case catches"),steps:pe.describe("what the test does"),expected:pe.describe("the expected outcome, from the clause"),mutates:d.boolean().optional().describe("true when its test changes state, in the test or its setup: an API POST, PUT, PATCH or DELETE, or a UI flow that submits, creates, edits or deletes")}),FCe=d.object({test:pe.describe("existing test file"),action:d.nativeEnum(Qi),reason:pe,mutates:d.boolean().optional().describe("true when the maintained test changes state"),clauses:d.array(pe).optional().describe("the clause ids this test checks"),staleOnBase:d.boolean().optional().describe("true when the test's own expectation was already wrong before this change: it fails the same way on the base branch, where the app does what it should. Not one the base app's own bug fails (that is an existing defect). It is verify, never update: re-run as it is, its failure the test's own. A delete the change justifies stays a delete")}),LK=d.array(EE).optional(),MCe=d.object({components:d.preprocess(e=>LK.safeParse(e).success?e:void 0,LK).describe("when saving a new or changed recipe: every app and backing service actually brought up, its source repository, and whether it is healthy"),outcome:d.nativeEnum(zr).describe("clean | recipe-drift (you had to fix the recipe) | change-broke-bringup (this PR broke start-up) | bringup-failed (the environment, not the PR)"),baseUrls:d.record(d.string()).optional().describe("service \u2192 base URL of the running app"),health:d.object({url:d.string().optional(),command:d.string().optional(),output:d.string().optional()}).optional().describe("the check that shows the app serves real data, and what it returned"),teardown:d.string().optional().describe("command that stops the app"),dependencies:d.record(d.boolean()).optional().describe("every backing service: true = really running, false = mocked"),recipeFixes:d.array(d.string()).optional().describe("what you changed in the recipe"),error:d.string().optional().describe("when it did not come up: the failing command and what it printed"),suspectFiles:d.array(d.string()).optional().describe("change-broke-bringup: the changed files to blame"),missingSecrets:d.array(d.string().regex(Wf)).optional().describe("bringup-failed only: each secret, key, token or password the app cannot start without that this run has no value for, by its environment variable name; never a value"),login:d.object({username:pe,password:d.string()}).optional().describe("the account the tests sign in as, when they sign in: each a literal value the recipe seeds, or $VARIABLE when a secret in the environment holds it"),revisions:MR.optional()}),HGe=d.object({schemaVersion:d.literal(1),requirements:d.array(NCe),findings:d.array(PCe),cases:d.array(UCe).describe("a second test for a clause, and one case per finding that fails on this branch"),questions:d.array(OCe).optional().describe("behaviours the change leaves unsettled; no case asserts any of them"),maintenance:d.array(FCe),journeys:d.array(wK).optional().describe("the user journeys that, together, pass through everything the change alters that a user sees or does; empty when it alters nothing a user sees"),notInJourney:d.array(d.object({clause:pe,why:pe})).optional().describe("a clause a user sees or does that no journey walks, and why: none can reach it through the UI, or it is downstream of this change and not walked here"),browserSuites:d.array(d.object({repository:pe.optional().describe("owner/repo, for a checkout other than the working one"),path:pe.describe("the folder its browser tests are in, relative to that checkout"),framework:pe.describe("what runs them")})).default([]).describe("the repository's own browser test suites; empty when it has none"),unplannedComponents:d.array(d.object({components:d.array(pe).min(1).describe("changed components, as the change lists them"),why:pe})).optional().describe("changed components no clause reaches, and why their change needs no test; several may share one reason"),triage:em.optional().describe("the validation triage decision, made before the app is started; its behaviorIds are clause ids"),app:MCe.optional().describe("omit when no app was needed or none was started"),summary:pe.describe("one paragraph: what the change does and where the risk is")});var om=(n=>(n.Backend="backend",n.Ui="ui",n))(om||{});var Xr=(r=>(r.Added="added",r.Updated="updated",r.Deleted="deleted",r.Unchanged="unchanged",r))(Xr||{}),LCe=d.object({file:pe.describe("repo-relative path; in another repo of the change, that repo's directory name then its path"),kind:d.nativeEnum(om),change:d.nativeEnum(Xr).describe("added: a file you created; updated / deleted / unchanged: an existing test"),covers:d.array(d.string()).describe("the plan case or maintenance clause ids this file tests, each with its own result under result.cases"),guardedDelivery:Fw.optional().describe("for a new test that calls the shared app: supply equivalent ordered HTTP requests and assertions for its one test function (which can check several planned cases) in a .test.cjs file that node --test runs. The destination package must declare the exact released version of @skyramp/testbot-core used by this run. Use only CI variable names for credentials. Omit when the setup or steps cannot preserve the test; Testbot retains the source without a CI entry. The entry reaches only the deployed Test Environment and makes no request to Testbot: name nothing under ci.needs for it. Where CI does not collect it yet, still give ci.steps, ci.runner and a ci.list whose output does not name it"),defect:d.boolean().optional().describe("true when a case of it fails because the app is wrong and the test is right \u2014 kept failing on purpose"),staleBecause:d.object({requirement:pe.describe("a stated requirement or clause id"),line:pe.describe("path:line (or path) of the application code the change altered that makes this test's old expectation wrong")}).optional().describe("for an existing test you updated or deleted: why it is out of date"),staleOnBase:d.boolean().optional().describe("for an existing test that fails: true when it fails the same way on the base branch because its own expectation is wrong (the app there does what it should), so this change did not make it wrong. Not when the base app's own bug fails it: that is an existing defect. Leave it as it is (unchanged): its failure is the test's own"),failsOnBase:d.array(d.object({test:pe.describe("its name, as its framework reports it"),failure:pe.describe("the failure message it gave on the base branch")})).optional().describe("for a file that was there before this run, which you left as it was or only added tests to: the tests already in it that fail here and fail the same way on the base branch, so this change did not make them fail. Never a test you wrote or changed"),result:d.object({started:d.boolean().optional().describe("with exit null: true if this file's test command started (it was interrupted or timed out), false if it never started. Left out, Testbot counts it as possibly started, with its cleanup unknown"),exit:d.number().nullable().describe("exit code of your last run of this file; null if it could not be run"),cases:d.array(d.object({case:pe,status:d.nativeEnum(er),environmentRestriction:pe.optional().describe("for a skipped case whose test you wrote and could not run here: what this run lacks to run it (a build, a service, a database, a browser, an app). The test is still written; Testbot reports the case as not run. Never set it on a case that ran or for a time limit."),runtimeTargets:lh.optional().describe("HTTP(S) URLs this case actually exercised in its current run, from its request or browser evidence; omit for local in-process/mocked checks, never list the shared app merely because it is configured"),defect:d.boolean().optional().describe("for a failing case: true when the app is wrong and the test is right; false when the test is at fault and you could not fix it"),testProblem:BE.optional().describe("for a failing case marked defect: false: what in the test is at fault"),failure:d.string().optional().describe("for a failing case: the runner's failure for it as printed (the error and the line it was raised at), not a summary"),cause:d.string().optional().describe("for a case you keep as a defect: path:line of the application code that makes it fail"),requires:d.string().optional().describe("for a case you keep as a defect: the words of the PR description, a requirement or clause of the plan, or the code a finding's keeps names, that state what its failing check expects, quoted exactly")}).refine(e=>!e.environmentRestriction||e.status==="skip"&&!e.runtimeTargets?.length,{message:"an environment-restricted case must be skipped and have no runtimeTargets"})).describe("one entry per covered case, from the runner's own output; a case you could not run here has none: record it as skipped with its environmentRestriction"),details:d.string().optional().describe("what failed and why, or why it was not run"),noCases:d.string().optional().describe("for a failed run whose runner reported none of this file's tests (it failed to compile, import or collect): why")}),assertions:d.array(d.object({case:pe,evidence:pe})).optional().describe("per covered case, the assertion line that checks its expected outcome"),functions:d.array(d.object({name:pe.describe("the test function as the runner names it within its file, without the file (test_x, TestClass::test_x, TestSuite/TestCase)"),cases:d.array(pe).describe("the plan case or maintenance clause ids it checks"),testProblem:BE.optional().describe("for a function that fails because of the test itself, while another function keeps a case it checks as a defect: what in it is at fault")})).optional().describe("for a file you added or updated, or an existing test to maintain that lists clauses: each test function in it and the plan case or maintenance clause ids it checks"),skyramp:d.object({draft:d.union([d.string(),d.array(d.string())]).optional().describe("the draft path the Skyramp helper returned for this test, or each path when the test was made from several drafts"),handWritten:d.string().optional().describe("why it is written by hand: the helper call you made and what it returned")}).optional().describe("only for a test of a case the Skyramp API block lists: where it came from"),context:d.array(uh).optional().describe("what the test sets up outside its own process that another test could run into: data it creates in the app, a Skyramp mock, an env override; omit when none"),isolatedRun:pe.optional().describe("for a test with a context: the command, from its checkout's root and without a shell, that runs only this file"),ci:MK.optional().describe("for a file you added or updated: whether the repo's CI will run it, and how you know"),run:xu.optional().describe(`for a file in ${sp}, added, updated or re-run: how the run executes only this file's tests, with the repository's own runner and the report it writes (junit, trx or jest-json to ${zn}, or go-test-json); Testbot runs it before write ends and re-runs the tests with it`)}),jCe=e=>{if(!e||typeof e!="object")return e;let{test:t,...n}=e;return typeof t=="string"&&t.trim()&&n.tests===void 0?{...n,tests:[t]}:e},VCe=d.preprocess(jCe,d.object({description:pe.describe("what is wrong and how to reproduce it: endpoint or page, input, what you got vs what was expected"),severity:d.nativeEnum(Qa).optional(),sourceFile:d.string().optional().describe("the app file at fault"),sourceLine:d.number().optional(),tests:d.array(pe).optional().describe("every test file that fails because of it: a defect several tests show is one issue"),finding:d.string().optional().describe("the plan's finding id, when it is one"),requirements:d.array(pe).optional().describe("the plan's requirement or clause ids it violates")})),JGe=d.object({schemaVersion:d.literal(1),tests:d.array(LCe),notWritten:d.array(d.object({case:pe,reason:pe,coveredBy:d.object({file:pe.describe("the test file, relative to the working checkout; prefix a related checkout as for tests[].file"),name:pe.describe("the test function as the runner names it within its file, without the file (test_x, TestClass::test_x, TestSuite/TestCase)")}).optional().describe("only for an existing test triage independently linked to this exact case: its exact runner name (including class or describe titles). Testbot must finish re-running it with every result passed. If your own test covers the case, include the case in its covers and function cases instead")})).describe("every plan case no test covers, and why; also a maintenance clause that no function of its existing test asserts (it stays unproven)"),journeys:d.array(Nw).optional().describe("one entry per planned user journey: the browser test that walks it end to end"),checks:d.array(d.object({command:d.string().describe("the exact command you ran on your files, with their paths, as run from the repository root: cd <folder> && first when you ran it in a folder"),source:d.string().describe("where the repository runs or configures this check: path:line, then its words copied exactly"),clean:d.boolean().describe("false when it still reports something in your files, or stopped before checking any")})).optional().describe("each lint, format or type check the repository runs or keeps a config for on files like yours; Testbot runs each again"),dependenciesAdded:d.array(d.object({package:pe,manifest:pe.describe("the manifest file's path relative to its checkout (e.g. package.json, pom.xml or pyproject.toml), and nothing else; name another checkout in repository"),repository:pe.optional().describe("owner/repo of the manifest's checkout; omit for the repo under test"),reason:pe.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")})).optional().describe("every package you added to an APPLICATION manifest (an exception, surfaced in the report); never the Testbot test package's own"),supportFiles:d.array(pe).optional().describe("every file that is not a test you created or changed for your tests, which they need to compile or run (a helper module, page object, fixture, or a snapshot the runner wrote for them), named as you name a test; Testbot delivers only the tests you list and the files under supportFiles"),ciNotes:d.string().optional().describe("for each test whose ci says the repo's CI will not run it: the test, and the exact change the author must make for CI to run it"),importerRun:xu.optional().describe("when you changed a module other test files import: the repository's own command for running its test files (its runner, its config, its folder); Testbot loads the files that reach your change with it and reports each; omit when you changed none"),commit:d.object({message:pe.describe("subject line at most 72 characters, following the repository's commit-message checks"),prTitle:pe.describe("at most 72 characters, following the repository's PR-title checks"),prBody:pe.describe("what the tests cover and what they found")}),report:d.object({summary:pe.describe("1-2 sentences for the PR author: does the change do what it says? No count of tests: the report gives it"),issues:d.array(VCe).describe("every defect the tests found"),nextSteps:d.array(d.string()),noTests:d.array(d.object({repository:pe,reason:pe.max(4096)})).max(1e3).optional().describe("each Change Set repository where no test was added or updated: its owner/repo and why, naming the other repository when its tests went there"),notesDeviation:d.string().trim().max(4096).optional().describe("when the Target notes say where tests go and a test you added went elsewhere: where it went, and why; omit otherwise")})});var WGe={added:"place",updated:"update",deleted:"delete",unchanged:"verify"};function es(e){return e.rel!==""&&!e.rel.startsWith("..")&&!nn.isAbsolute(e.rel)}function vn(e,t,n=DK){let s=t.map(l=>({name:CB(l),root:nn.resolve(l.path),slug:l.slug})),r=new Map([...s].reverse().map(l=>[l.name,l])),i=t.length?[{real:qE(nn.resolve(e))},...s.map(l=>({...l,real:qE(l.root)}))].sort((l,p)=>p.real.length-l.real.length):[],o=new Map,a=l=>o.get(l)??o.set(l,new Set(n(l))).get(l),c=l=>{let p=nn.resolve(e,l),h=op.existsSync(p),g=C=>({root:e,rel:Ci(e,l),ambiguous:C,exists:h});if(!t.length)return g(!1);let m=!1,y=l.replace(/^\.\//,""),v=y.split("/")[0],E=r.get(v);if(E){let C=y.slice(v.length+1),w=op.existsSync(nn.join(E.root,C)),x=!op.existsSync(nn.join(e,v))||!h&&w;if(w&&h&&nn.join(E.root,C)!==p){let S=a(E.root).has(Ci(E.root,C)),Y=a(e).has(Ci(e,l));S&&!Y?x=!0:S===Y&&(m=!0)}if(x)return{root:E.root,rel:Ci(E.root,C),repository:E.slug,dir:E.name,ambiguous:m,exists:w}}if(!h&&!nn.isAbsolute(y)){let C=s.filter(w=>op.existsSync(nn.join(w.root,y)));if(C.length===1){let[w]=C;return{root:w.root,rel:Ci(w.root,y),repository:w.slug,dir:w.name,ambiguous:m,exists:!0}}}let b=nn.join(qE(nn.dirname(p)),nn.basename(p)),I=i.find(C=>es({rel:nn.relative(C.real,b)}));return I?"slug"in I?{root:I.root,rel:nn.relative(I.real,b),repository:I.slug,dir:I.name,ambiguous:m,exists:h}:{...g(m),rel:nn.relative(I.real,b)}:g(m)},u=new Map;return l=>u.get(l)??u.set(l,c(l)).get(l)}var HK=(s=>(s.Requirement="requirement",s.PrDescription="pr_description",s.Code="code",s))(HK||{}),Qn=d.string().trim().min(1),qCe=d.object({expectation:Qn.max(300).describe("the behavior this assertion pins, in words"),source:d.nativeEnum(HK),expected:Qn.max(200).describe("the exact value or outcome asserted, as the test asserts it")}),HCe=d.object({file:Qn.describe("path of the NEW test file you wrote, relative to its repository"),repository:Qn.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),framework:Qn.describe("the framework the repository runs this file with: pytest, jest, vitest, node-test, or the name of any other"),run:xu.optional().describe(`for ${sp}: how the run executes only the tests in names, with the repository's own runner writing JUnit XML to {junit}`),covers:d.array(Qn).length(1).describe("the ONE behavior id, or defect id, from the plan that the tests in names provide evidence for; a file covering several is listed once per id"),names:d.array(Qn).min(1).describe("the test functions/cases in the file that provide evidence for that behavior, as the framework names them"),assertions:d.array(qCe).min(1)}),am=(n=>(n.Updated="updated",n.Deleted="deleted",n))(am||{}),qK=300,JCe=d.object({file:Qn.describe("path of the EXISTING test file you updated or deleted, relative to its repository"),repository:Qn.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),change:d.nativeEnum(am),staleBecause:d.object({requirement:Qn.describe("a stated requirement or clause id"),line:Qn.describe("path:line (or path) of the application code the change altered that makes this test's old expectation wrong")}).optional().describe("for an existing test you updated or deleted: why it is out of date"),reason:d.preprocess(e=>typeof e=="string"?e.trim().slice(0,qK):e,Qn.max(qK)).describe("what the change deliberately altered that made the test wrong")}),WD=d.object({schemaVersion:d.literal(1),tests:d.array(HCe),maintained:d.array(JCe).optional().describe("existing tests the change made stale that you updated or deleted; omit when there were none"),defectsNotTested:d.array(d.object({id:Qn,reason:Qn.max(300)})).optional().describe("defects the plan found that no in-process test can reach, each with why; omit when every defect has a test"),journeys:d.array(Nw).optional().describe("one entry per planned user journey: the in-process test that walks it end to end"),journeysNotWritten:d.array(d.object({journey:Qn,missing:Qn.transform(e=>e.length>300?`${e.slice(0,299)}\u2026`:e)})).optional().describe("a planned journey no in-process test can walk here, with what it needs that is missing; it is reported as not covered"),lint:d.object({command:d.string(),clean:d.boolean()}).optional().describe("the linter/formatter you ran on your test files, if the repository has one you can run; omit otherwise"),commitMessage:Qn.optional().describe("the commit message for your tests: a subject line of at most 72 characters, then what they cover")});var Na=G(require("path"));var pze={"application/pdf":"PDF","text/csv":"CSV","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOCX","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLSX"};var YD=e=>new Map((e??[]).flatMap(t=>t.file?[[Xc(t.key),t.file.name]]:[])),WCe=10*1024*1024,WK=e=>e?.mediaType==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||e?.mediaType==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",YK=(e,t)=>Na.join(Na.dirname(e),`${Na.basename(e,Na.extname(e))}${t}`),ZK=e=>YK(e,".extracted.txt");var YCe=e=>YK(e,".quotes.txt");function KK(e){return WK(e.file)?ZK(e.path):e.file?.mediaType==="application/pdf"?YCe(e.path):e.path}var e6=G(require("fs"));var t6=2*1024*1024;function n6(e){let t=[];for(let n of e??[])if(n.state==="read")try{t.push({item:n,text:e6.readFileSync(KK(n),"utf-8")})}catch{}return t}var cm=6,ZCe=/[\p{L}\p{N}]+/gu,KCe=new RegExp("(?<=\\p{Ll})(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}\\p{Ll})","u");function ZD(e){let t=[];for(let n of e.matchAll(ZCe)){let s=n.index;for(let r of n[0].split(KCe))t.push({word:r.toLowerCase(),start:s,end:s+r.length}),s+=r.length}return t}var r6=(e,t)=>e.slice(t,t+cm).map(n=>n.word).join(" ");function XK(e){let t=ZD(e),n=new Set;for(let s=0;s+cm<=t.length;s++)n.add(r6(t,s));return n}function s6(e,t=[]){let n=new Set(t.flatMap(s=>[...XK(s)]));return n6(e).map(({item:s,text:r})=>{let i=s.source==="other"?r:r.slice(r.indexOf(`
267
- `)+1||r.length),o=XK(i);for(let a of n)o.delete(a);return{name:lz(s.key,YD([s])),key:s.key,runs:o,words:ZD(i).map(a=>a.word)}})}var mze=cm/2;var XCe=e=>e.criteria.size?`${e.text.name} ${[...e.criteria].sort((t,n)=>t-n).map(t=>`AC${t}`).join(", ")}`:e.text.name,eSe=new RegExp("(?<![\\p{L}\\p{N}])\\p{L}[\\p{L}\\p{N}+.-]*:\\/\\/(?:[^\\s\"'`<>|\\u2018\\u2019\\u201C\\u201D\\u3000-\\u303F\\uFF01-\\uFF0F\\uFF1A-\\uFF20]|<[\\p{L}\\p{N}_-]+>)*(?:[^\\s\"'`<>|\\u2018\\u2019\\u201C\\u201D\\u3000-\\u303F\\uFF01-\\uFF0F\\uFF1A-\\uFF20.,;:!?)\\]]|<[\\p{L}\\p{N}_-]+>)","gu");function tSe(e){let t=[...e.matchAll(eSe)].map(s=>({start:s.index,end:s.index+s[0].length})),n=[[]];for(let s of ZD(e))t.some(r=>s.start>=r.start&&s.start<r.end)?n.at(-1).length&&n.push([]):n.at(-1).push(s);return n}function nSe(e,t){if(t.length===0)return[];let n=[];for(let s of tSe(e))for(let r=0;r+cm<=s.length;r++){let i=r6(s,r),o=t.find(p=>p.runs.has(i));if(!o)continue;let a=s[r].start,c=s[r+cm-1].end,u=o.criteria?.get(i)??[],l=n.at(-1);if(l&&a<=l.end){if(l.end=Math.max(l.end,c),l.text===o)for(let p of u)l.criteria.add(p)}else n.push({start:a,end:c,text:o,criteria:new Set(u)})}return n.map(s=>({start:s.start,end:s.end,name:XCe(s)}))}function ap(e,t,n=!1){let s=e;for(let r of nSe(e,t).reverse()){let i=s.slice(0,r.start).trimEnd(),o=i===""||/[.!?\n]$/.test(s.slice(0,r.start).replace(/[ \t]+$/,"")),c=n&&(o||/[:;—–-]$/.test(i))&&/^\s+[\p{L}\d]/u.test(s.slice(r.end))?`${o?"The":"the"} case (see ${r.name})`:`(see ${r.name})`;s=`${s.slice(0,r.start)}${c}${s.slice(r.end)}`}return s}function rSe(e,t,n){for(let s=t+1;s<e.length;s++){let r=e[s];if(r==="\\")s++;else{if(r===n)return s+1;if(r===`
266
+ `)}if(!(!e.startsWith(HD)||!e.endsWith(JD)))try{let t=UK.safeParse(JSON.parse(e.slice(HD.length,-JD.length)));return t.success&&sm(t.data)===e?t.data:void 0}catch{return}}var im=d.string().trim().min(1),CCe=d.object({cwd:im.describe(`directory the command starts in, relative to the test's checkout ("." for its root)`),argv:d.array(im).min(1).describe("the command as separate arguments, run without a shell"),env:d.record(d.string(),d.string()).optional().describe("plain settings the listing needs beyond the CI step's own; never a credential or PATH")}),FK=d.object({file:im.describe("a file of the test's checkout, relative to its root"),line:im.describe("a line of that file, quoted exactly from where its command starts to its end")}),MK=d.object({collected:d.boolean().describe("whether the repo's CI runs this test as it is"),steps:d.array(FK).optional().describe("when collected: the line in a CI file that starts the tests, then each line it runs on the way to the test runner"),runner:d.string().optional().describe("when collected: the test runner the last of those lines starts, by the name that line and the list command both use"),list:CCe.optional().describe("when collected: a command that lists the tests that runner collects without running them; Testbot runs it, and its output must name this file"),why:d.string().optional().describe("when not collected: why the repo's CI will not run it"),needs:d.array(im).optional().describe("what the test needs running outside its own process (the app, a database, another service), one entry each; omit when it needs none"),starts:d.array(FK).optional().describe("when collected and it needs any: the line that starts each of those in the CI job that runs it, in a file of ci.steps")});var pe=d.string().trim().min(1),_Ce=e=>{if(!e||typeof e!="object")return e;let t=e;return typeof t.skip=="string"&&t.skip.trim()&&(t.expected===void 0||t.expected===null)?{...t,expected:"(not tested)"}:e},DCe=d.preprocess(_Ce,d.object({id:pe.describe(`its requirement's id plus a letter, e.g. "R1a", "AC-3a"`),clause:pe.describe("one testable part of the requirement"),expected:pe.describe("the outcome the requirement calls for \u2014 taken from the requirement, never from what the code does"),skip:d.string().optional().describe("only when no test can check this clause here: why"),type:d.nativeEnum(Zs).optional().describe("the test that checks this clause: contract / integration (the API, or code called directly in-process: a function, hook or module) or ui (a page)"),target:d.string().optional().describe('its "METHOD /path", or the page / flow'),steps:d.string().optional().describe("what that test does; its expected outcome is this clause's"),finding:d.string().optional().describe("the finding id, when this clause's test also catches that defect (the defect still gets a case of its own)"),code:d.string().optional().describe("path:line of the code that decides this clause, when there is one; in another repo of the change, that repo's directory name then its path"),stated:d.string().optional().describe("the description's or spec's own words that state this clause, copied exactly, when they do"),mutates:d.boolean().optional().describe("true when its test changes state, in the test or its setup: an API POST, PUT, PATCH or DELETE, or a UI flow that submits, creates, edits or deletes"),browserOnly:d.boolean().optional().describe("true when its behaviour happens only in a browser: real clicks or keys driving page script, client-side sorting or filtering, script-driven DOM updates, focus, drag-and-drop, navigation, rendering that depends on CSS or JavaScript"),browserHarness:d.string().optional().describe("browserOnly, off the runtime path: the path of the repo's in-process browser suite its test goes in (e.g. a Django StaticLiveServerTestCase test that drives Selenium)"),quote:d.string().optional().describe("the words of the spec, plan, ticket, PR description or a test the change adds or edits that state this clause, copied exactly; a file of the repository: its path:line first. Leave it out when no source states it"),inferred:d.boolean().optional().describe("leave it out: Testbot sets it when no source states this clause (contracts/clause-grounding.ts)")})),jK=d.object({spec:d.string().optional().describe("file:line of a spec in the repository"),prDescription:d.boolean().optional().describe("or true when a pull request description says otherwise"),reference:d.string().optional().describe("or the key of an item the run was given, as listed"),says:pe.describe("what it says there, in its own words, copied exactly"),criterion:d.number().int().positive().optional().describe("an item's only: leave it out; Testbot numbers it")}).refine(e=>[!!e.prDescription,!!e.spec?.trim(),!!e.reference?.trim()].filter(Boolean).length===1,{message:`names no source, or more than one: give "spec" its file:line or "reference" an item's key, or set "prDescription", one of them; list each source as its own entry`}),NCe=d.object({id:pe.describe('the label its source gives it ("AC-3", "REQ-12"; item 4 of a numbered list is "R4"), else "R1", "R2"\u2026 in order'),statement:pe,source:d.nativeEnum(ks).describe("requirement-reference (an item the run was given), spec, pr-description (also for what the change is evidently meant to do when nothing is written down), or could-break (what the change could break that no requirement mentions)"),reference:d.string().optional().describe('requirement-reference only: the key of its item as listed, e.g. "PAY-184", or a Confluence page id such as "3021"'),evidence:pe.describe("where it is stated: for requirement-reference, the item's own words, copied exactly; else file:line, a doc section, or the quoted phrase"),criterion:d.number().int().positive().optional().describe("requirement-reference only: leave it out; Testbot numbers each criterion by the item's own label (AC2, 2.), else after the item's labels"),alsoFrom:d.array(d.object({reference:pe.regex(io).describe("the key of another uploaded document stating the same obligation"),says:pe.describe("that document's own words, copied exactly; never infer equivalence from a shared criterion number"),criterion:d.number().int().positive().optional().describe("leave out; Testbot grounds and numbers this source separately")})).optional().describe("equivalent uploaded source criteria sharing this requirement's planned cases; retain every source with its own quote. Different conditions or boundaries need distinct requirements"),notInChange:d.string().optional().describe("requirement-reference only: when the PR description or the item defers this criterion to a later change, the words that defer it, copied exactly; give it no clauses. Never for words that only say what this change covers, or only because no changed file holds its code"),unchanged:d.boolean().optional().describe("true when it asks only that behaviour stay as it was (an update or refactor that must not change how something works), whatever its source"),overrules:d.array(jK).optional().describe("requirement-reference only: each lower-ranked source that says otherwise, a spec in the repository, a PR description or another item; this requirement wins, so test what it says"),clauses:d.array(DCe)}),VK=(r=>(r.ServerError="server-error",r.DataLost="data-lost",r.FinalState="final-state",r.DerivedValues="derived-values",r))(VK||{}),PCe=d.object({id:pe.describe('e.g. "F1"'),file:pe,line:d.number().optional(),claim:pe.describe("the defect, in one sentence"),severity:d.nativeEnum(Qa),evidence:pe.describe("the code line, or the probe request and response, that shows it"),conflictsWith:d.array(pe).optional().describe("requirement or clause ids it violates"),keeps:d.string().optional().describe("for a defect no requirement or clause states: path:line of the code beside the change that keeps the rule it breaks"),rule:d.nativeEnum(VK).optional().describe("for a defect that breaks a rule every app keeps, which nothing needs to state: which one"),existing:d.string().optional().describe("only when the base already does this, in code the change left as it was, and the change does not say it fixes it: where the base does it (its file:line); such a defect gets no case"),needsApp:d.enum(["browser","live-api"]).optional().describe("only when the running app alone can show this defect and the repo has no in-process test that can: browser (page script, what the user sees after a click or a save) or live-api (code the repo tests only against the running app's API)")}),OCe=d.object({id:pe.describe('e.g. "Q1"'),question:pe.describe("what is unsettled, as a question the PR author can answer"),readings:d.array(pe).min(2).describe("each reasonable behaviour, with what points to it (file:line, or the words that suggest it)"),about:d.string().optional().describe("the requirement or clause id it is about, when there is one"),sources:d.array(jK).optional().describe("when sources of the same rank disagree on it: each of them")}),UCe=d.object({id:pe.describe('unique, a short kebab-case name for what the case checks, e.g. "ship-twice-409"'),type:d.nativeEnum(Zs).describe("contract / integration: checks the API, or calls code directly in-process (a function, hook or module); ui: checks what a user sees or does on a page"),target:pe.describe('"METHOD /path", or the page / flow'),clause:d.string().optional().describe("the clause id this case checks"),finding:d.string().optional().describe("the finding id this case catches"),steps:pe.describe("what the test does"),expected:pe.describe("the expected outcome, from the clause"),mutates:d.boolean().optional().describe("true when its test changes state, in the test or its setup: an API POST, PUT, PATCH or DELETE, or a UI flow that submits, creates, edits or deletes")}),FCe=d.object({test:pe.describe("existing test file"),action:d.nativeEnum(Qi),reason:pe,mutates:d.boolean().optional().describe("true when the maintained test changes state"),clauses:d.array(pe).optional().describe("the clause ids this test checks"),staleOnBase:d.boolean().optional().describe("true when the test's own expectation was already wrong before this change: it fails the same way on the base branch, where the app does what it should. Not one the base app's own bug fails (that is an existing defect). It is verify, never update: re-run as it is, its failure the test's own. A delete the change justifies stays a delete")}),LK=d.array(EE).optional(),MCe=d.object({components:d.preprocess(e=>LK.safeParse(e).success?e:void 0,LK).describe("when saving a new or changed recipe: every app and backing service actually brought up, its source repository, and whether it is healthy"),outcome:d.nativeEnum(zr).describe("clean | recipe-drift (you had to fix the recipe) | change-broke-bringup (this PR broke start-up) | bringup-failed (the environment, not the PR)"),baseUrls:d.record(d.string()).optional().describe("service \u2192 base URL of the running app"),health:d.object({url:d.string().optional(),command:d.string().optional(),output:d.string().optional()}).optional().describe("the check that shows the app serves real data, and what it returned"),teardown:d.string().optional().describe("command that stops the app"),dependencies:d.record(d.boolean()).optional().describe("every backing service: true = really running, false = mocked"),recipeFixes:d.array(d.string()).optional().describe("what you changed in the recipe"),error:d.string().optional().describe("when it did not come up: the failing command and what it printed"),suspectFiles:d.array(d.string()).optional().describe("change-broke-bringup: the changed files to blame"),missingSecrets:d.array(d.string().regex(Wf)).optional().describe("bringup-failed only: each secret, key, token or password the app cannot start without that this run has no value for, by its environment variable name; never a value"),login:d.object({username:pe,password:d.string()}).optional().describe("the account the tests sign in as, when they sign in: each a literal value the recipe seeds, or $VARIABLE when a secret in the environment holds it"),revisions:MR.optional()}),JGe=d.object({schemaVersion:d.literal(1),requirements:d.array(NCe),findings:d.array(PCe),cases:d.array(UCe).describe("a second test for a clause, and one case per finding that fails on this branch"),questions:d.array(OCe).optional().describe("behaviours the change leaves unsettled; no case asserts any of them"),maintenance:d.array(FCe),journeys:d.array(wK).optional().describe("the user journeys that, together, pass through everything the change alters that a user sees or does; empty when it alters nothing a user sees"),notInJourney:d.array(d.object({clause:pe,why:pe})).optional().describe("a clause a user sees or does that no journey walks, and why: none can reach it through the UI, or it is downstream of this change and not walked here"),browserSuites:d.array(d.object({repository:pe.optional().describe("owner/repo, for a checkout other than the working one"),path:pe.describe("the folder its browser tests are in, relative to that checkout"),framework:pe.describe("what runs them")})).default([]).describe("the repository's own browser test suites; empty when it has none"),unplannedComponents:d.array(d.object({components:d.array(pe).min(1).describe("changed components, as the change lists them"),why:pe})).optional().describe("changed components no clause reaches, and why their change needs no test; several may share one reason"),triage:em.optional().describe("the validation triage decision, made before the app is started; its behaviorIds are clause ids"),app:MCe.optional().describe("omit when no app was needed or none was started"),summary:pe.describe("one paragraph: what the change does and where the risk is")});var om=(n=>(n.Backend="backend",n.Ui="ui",n))(om||{});var Xr=(r=>(r.Added="added",r.Updated="updated",r.Deleted="deleted",r.Unchanged="unchanged",r))(Xr||{}),LCe=d.object({file:pe.describe("repo-relative path; in another repo of the change, that repo's directory name then its path"),kind:d.nativeEnum(om),change:d.nativeEnum(Xr).describe("added: a file you created; updated / deleted / unchanged: an existing test"),covers:d.array(d.string()).describe("the plan case or maintenance clause ids this file tests, each with its own result under result.cases"),guardedDelivery:Fw.optional().describe("for a new test that calls the shared app: supply equivalent ordered HTTP requests and assertions for its one test function (which can check several planned cases) in a .test.cjs file that node --test runs. The destination package must declare the exact released version of @skyramp/testbot-core used by this run. Use only CI variable names for credentials. Omit when the setup or steps cannot preserve the test; Testbot retains the source without a CI entry. The entry reaches only the deployed Test Environment and makes no request to Testbot: name nothing under ci.needs for it. Where CI does not collect it yet, still give ci.steps, ci.runner and a ci.list whose output does not name it"),defect:d.boolean().optional().describe("true when a case of it fails because the app is wrong and the test is right \u2014 kept failing on purpose"),staleBecause:d.object({requirement:pe.describe("a stated requirement or clause id"),line:pe.describe("path:line (or path) of the application code the change altered that makes this test's old expectation wrong")}).optional().describe("for an existing test you updated or deleted: why it is out of date"),staleOnBase:d.boolean().optional().describe("for an existing test that fails: true when it fails the same way on the base branch because its own expectation is wrong (the app there does what it should), so this change did not make it wrong. Not when the base app's own bug fails it: that is an existing defect. Leave it as it is (unchanged): its failure is the test's own"),failsOnBase:d.array(d.object({test:pe.describe("its name, as its framework reports it"),failure:pe.describe("the failure message it gave on the base branch")})).optional().describe("for a file that was there before this run, which you left as it was or only added tests to: the tests already in it that fail here and fail the same way on the base branch, so this change did not make them fail. Never a test you wrote or changed"),result:d.object({started:d.boolean().optional().describe("with exit null: true if this file's test command started (it was interrupted or timed out), false if it never started. Left out, Testbot counts it as possibly started, with its cleanup unknown"),exit:d.number().nullable().describe("exit code of your last run of this file; null if it could not be run"),cases:d.array(d.object({case:pe,status:d.nativeEnum(er),environmentRestriction:pe.optional().describe("for a skipped case whose test you wrote and could not run here: what this run lacks to run it (a build, a service, a database, a browser, an app). The test is still written; Testbot reports the case as not run. Never set it on a case that ran or for a time limit."),runtimeTargets:lh.optional().describe("HTTP(S) URLs this case actually exercised in its current run, from its request or browser evidence; omit for local in-process/mocked checks, never list the shared app merely because it is configured"),defect:d.boolean().optional().describe("for a failing case: true when the app is wrong and the test is right; false when the test is at fault and you could not fix it"),testProblem:BE.optional().describe("for a failing case marked defect: false: what in the test is at fault"),failure:d.string().optional().describe("for a failing case: the runner's failure for it as printed (the error and the line it was raised at), not a summary"),cause:d.string().optional().describe("for a case you keep as a defect: path:line of the application code that makes it fail"),requires:d.string().optional().describe("for a case you keep as a defect: the words of the PR description, a requirement or clause of the plan, or the code a finding's keeps names, that state what its failing check expects, quoted exactly")}).refine(e=>!e.environmentRestriction||e.status==="skip"&&!e.runtimeTargets?.length,{message:"an environment-restricted case must be skipped and have no runtimeTargets"})).describe("one entry per covered case, from the runner's own output; a case you could not run here has none: record it as skipped with its environmentRestriction"),details:d.string().optional().describe("what failed and why, or why it was not run"),noCases:d.string().optional().describe("for a failed run whose runner reported none of this file's tests (it failed to compile, import or collect): why")}),assertions:d.array(d.object({case:pe,evidence:pe})).optional().describe("per covered case, the assertion line that checks its expected outcome"),functions:d.array(d.object({name:pe.describe("the test function as the runner names it within its file, without the file (test_x, TestClass::test_x, TestSuite/TestCase)"),cases:d.array(pe).describe("the plan case or maintenance clause ids it checks"),testProblem:BE.optional().describe("for a function that fails because of the test itself, while another function keeps a case it checks as a defect: what in it is at fault")})).optional().describe("for a file you added or updated, or an existing test to maintain that lists clauses: each test function in it and the plan case or maintenance clause ids it checks"),skyramp:d.object({draft:d.union([d.string(),d.array(d.string())]).optional().describe("the draft path the Skyramp helper returned for this test, or each path when the test was made from several drafts"),handWritten:d.string().optional().describe("why it is written by hand: the helper call you made and what it returned")}).optional().describe("only for a test of a case the Skyramp API block lists: where it came from"),context:d.array(uh).optional().describe("what the test sets up outside its own process that another test could run into: data it creates in the app, a Skyramp mock, an env override; omit when none"),isolatedRun:pe.optional().describe("for a test with a context: the command, from its checkout's root and without a shell, that runs only this file"),ci:MK.optional().describe("for a file you added or updated: whether the repo's CI will run it, and how you know"),run:xu.optional().describe(`for a file in ${sp}, added, updated or re-run: how the run executes only this file's tests, with the repository's own runner and the report it writes (junit, trx or jest-json to ${zn}, or go-test-json); Testbot runs it before write ends and re-runs the tests with it`)}),jCe=e=>{if(!e||typeof e!="object")return e;let{test:t,...n}=e;return typeof t=="string"&&t.trim()&&n.tests===void 0?{...n,tests:[t]}:e},VCe=d.preprocess(jCe,d.object({description:pe.describe("what is wrong and how to reproduce it: endpoint or page, input, what you got vs what was expected"),severity:d.nativeEnum(Qa).optional(),sourceFile:d.string().optional().describe("the app file at fault"),sourceLine:d.number().optional(),tests:d.array(pe).optional().describe("every test file that fails because of it: a defect several tests show is one issue"),finding:d.string().optional().describe("the plan's finding id, when it is one"),requirements:d.array(pe).optional().describe("the plan's requirement or clause ids it violates")})),WGe=d.object({schemaVersion:d.literal(1),tests:d.array(LCe),notWritten:d.array(d.object({case:pe,reason:pe,coveredBy:d.object({file:pe.describe("the test file, relative to the working checkout; prefix a related checkout as for tests[].file"),name:pe.describe("the test function as the runner names it within its file, without the file (test_x, TestClass::test_x, TestSuite/TestCase)")}).optional().describe("only for an existing test triage independently linked to this exact case: its exact runner name (including class or describe titles). Testbot must finish re-running it with every result passed. If your own test covers the case, include the case in its covers and function cases instead")})).describe("every plan case no test covers, and why; also a maintenance clause that no function of its existing test asserts (it stays unproven)"),journeys:d.array(Nw).optional().describe("one entry per planned user journey: the browser test that walks it end to end"),checks:d.array(d.object({command:d.string().describe("the exact command you ran on your files, with their paths, as run from the repository root: cd <folder> && first when you ran it in a folder"),source:d.string().describe("where the repository runs or configures this check: path:line, then its words copied exactly"),clean:d.boolean().describe("false when it still reports something in your files, or stopped before checking any")})).optional().describe("each lint, format or type check the repository runs or keeps a config for on files like yours; Testbot runs each again"),dependenciesAdded:d.array(d.object({package:pe,manifest:pe.describe("the manifest file's path relative to its checkout (e.g. package.json, pom.xml or pyproject.toml), and nothing else; name another checkout in repository"),repository:pe.optional().describe("owner/repo of the manifest's checkout; omit for the repo under test"),reason:pe.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")})).optional().describe("every package you added to an APPLICATION manifest (an exception, surfaced in the report); never the Testbot test package's own"),supportFiles:d.array(pe).optional().describe("every file that is not a test you created or changed for your tests, which they need to compile or run (a helper module, page object, fixture, or a snapshot the runner wrote for them), named as you name a test; Testbot delivers only the tests you list and the files under supportFiles"),ciNotes:d.string().optional().describe("for each test whose ci says the repo's CI will not run it: the test, and the exact change the author must make for CI to run it"),importerRun:xu.optional().describe("when you changed a module other test files import: the repository's own command for running its test files (its runner, its config, its folder); Testbot loads the files that reach your change with it and reports each; omit when you changed none"),commit:d.object({message:pe.describe("subject line at most 72 characters, following the repository's commit-message checks"),prTitle:pe.describe("at most 72 characters, following the repository's PR-title checks"),prBody:pe.describe("what the tests cover and what they found")}),report:d.object({summary:pe.describe("1-2 sentences for the PR author: does the change do what it says? No count of tests: the report gives it"),issues:d.array(VCe).describe("every defect the tests found"),nextSteps:d.array(d.string()),noTests:d.array(d.object({repository:pe,reason:pe.max(4096)})).max(1e3).optional().describe("each Change Set repository where no test was added or updated: its owner/repo and why, naming the other repository when its tests went there"),notesDeviation:d.string().trim().max(4096).optional().describe("when the Target notes say where tests go and a test you added went elsewhere: where it went, and why; omit otherwise")})});var YGe={added:"place",updated:"update",deleted:"delete",unchanged:"verify"};function es(e){return e.rel!==""&&!e.rel.startsWith("..")&&!nn.isAbsolute(e.rel)}function vn(e,t,n=DK){let s=t.map(l=>({name:CB(l),root:nn.resolve(l.path),slug:l.slug})),r=new Map([...s].reverse().map(l=>[l.name,l])),i=t.length?[{real:qE(nn.resolve(e))},...s.map(l=>({...l,real:qE(l.root)}))].sort((l,p)=>p.real.length-l.real.length):[],o=new Map,a=l=>o.get(l)??o.set(l,new Set(n(l))).get(l),c=l=>{let p=nn.resolve(e,l),h=op.existsSync(p),g=C=>({root:e,rel:Ci(e,l),ambiguous:C,exists:h});if(!t.length)return g(!1);let m=!1,y=l.replace(/^\.\//,""),v=y.split("/")[0],E=r.get(v);if(E){let C=y.slice(v.length+1),w=op.existsSync(nn.join(E.root,C)),x=!op.existsSync(nn.join(e,v))||!h&&w;if(w&&h&&nn.join(E.root,C)!==p){let S=a(E.root).has(Ci(E.root,C)),Y=a(e).has(Ci(e,l));S&&!Y?x=!0:S===Y&&(m=!0)}if(x)return{root:E.root,rel:Ci(E.root,C),repository:E.slug,dir:E.name,ambiguous:m,exists:w}}if(!h&&!nn.isAbsolute(y)){let C=s.filter(w=>op.existsSync(nn.join(w.root,y)));if(C.length===1){let[w]=C;return{root:w.root,rel:Ci(w.root,y),repository:w.slug,dir:w.name,ambiguous:m,exists:!0}}}let b=nn.join(qE(nn.dirname(p)),nn.basename(p)),I=i.find(C=>es({rel:nn.relative(C.real,b)}));return I?"slug"in I?{root:I.root,rel:nn.relative(I.real,b),repository:I.slug,dir:I.name,ambiguous:m,exists:h}:{...g(m),rel:nn.relative(I.real,b)}:g(m)},u=new Map;return l=>u.get(l)??u.set(l,c(l)).get(l)}var HK=(s=>(s.Requirement="requirement",s.PrDescription="pr_description",s.Code="code",s))(HK||{}),Qn=d.string().trim().min(1),qCe=d.object({expectation:Qn.max(300).describe("the behavior this assertion pins, in words"),source:d.nativeEnum(HK),expected:Qn.max(200).describe("the exact value or outcome asserted, as the test asserts it")}),HCe=d.object({file:Qn.describe("path of the NEW test file you wrote, relative to its repository"),repository:Qn.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),framework:Qn.describe("the framework the repository runs this file with: pytest, jest, vitest, node-test, or the name of any other"),run:xu.optional().describe(`for ${sp}: how the run executes only the tests in names, with the repository's own runner writing JUnit XML to {junit}`),covers:d.array(Qn).length(1).describe("the ONE behavior id, or defect id, from the plan that the tests in names provide evidence for; a file covering several is listed once per id"),names:d.array(Qn).min(1).describe("the test functions/cases in the file that provide evidence for that behavior, as the framework names them"),assertions:d.array(qCe).min(1)}),am=(n=>(n.Updated="updated",n.Deleted="deleted",n))(am||{}),qK=300,JCe=d.object({file:Qn.describe("path of the EXISTING test file you updated or deleted, relative to its repository"),repository:Qn.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),change:d.nativeEnum(am),staleBecause:d.object({requirement:Qn.describe("a stated requirement or clause id"),line:Qn.describe("path:line (or path) of the application code the change altered that makes this test's old expectation wrong")}).optional().describe("for an existing test you updated or deleted: why it is out of date"),reason:d.preprocess(e=>typeof e=="string"?e.trim().slice(0,qK):e,Qn.max(qK)).describe("what the change deliberately altered that made the test wrong")}),WD=d.object({schemaVersion:d.literal(1),tests:d.array(HCe),maintained:d.array(JCe).optional().describe("existing tests the change made stale that you updated or deleted; omit when there were none"),defectsNotTested:d.array(d.object({id:Qn,reason:Qn.max(300)})).optional().describe("defects the plan found that no in-process test can reach, each with why; omit when every defect has a test"),journeys:d.array(Nw).optional().describe("one entry per planned user journey: the in-process test that walks it end to end"),journeysNotWritten:d.array(d.object({journey:Qn,missing:Qn.transform(e=>e.length>300?`${e.slice(0,299)}\u2026`:e)})).optional().describe("a planned journey no in-process test can walk here, with what it needs that is missing; it is reported as not covered"),lint:d.object({command:d.string(),clean:d.boolean()}).optional().describe("the linter/formatter you ran on your test files, if the repository has one you can run; omit otherwise"),commitMessage:Qn.optional().describe("the commit message for your tests: a subject line of at most 72 characters, then what they cover")});var Na=G(require("path"));var fze={"application/pdf":"PDF","text/csv":"CSV","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOCX","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLSX"};var YD=e=>new Map((e??[]).flatMap(t=>t.file?[[Xc(t.key),t.file.name]]:[])),WCe=10*1024*1024,WK=e=>e?.mediaType==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||e?.mediaType==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",YK=(e,t)=>Na.join(Na.dirname(e),`${Na.basename(e,Na.extname(e))}${t}`),ZK=e=>YK(e,".extracted.txt");var YCe=e=>YK(e,".quotes.txt");function KK(e){return WK(e.file)?ZK(e.path):e.file?.mediaType==="application/pdf"?YCe(e.path):e.path}var e6=G(require("fs"));var t6=2*1024*1024;function n6(e){let t=[];for(let n of e??[])if(n.state==="read")try{t.push({item:n,text:e6.readFileSync(KK(n),"utf-8")})}catch{}return t}var cm=6,ZCe=/[\p{L}\p{N}]+/gu,KCe=new RegExp("(?<=\\p{Ll})(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}\\p{Ll})","u");function ZD(e){let t=[];for(let n of e.matchAll(ZCe)){let s=n.index;for(let r of n[0].split(KCe))t.push({word:r.toLowerCase(),start:s,end:s+r.length}),s+=r.length}return t}var r6=(e,t)=>e.slice(t,t+cm).map(n=>n.word).join(" ");function XK(e){let t=ZD(e),n=new Set;for(let s=0;s+cm<=t.length;s++)n.add(r6(t,s));return n}function s6(e,t=[]){let n=new Set(t.flatMap(s=>[...XK(s)]));return n6(e).map(({item:s,text:r})=>{let i=s.source==="other"?r:r.slice(r.indexOf(`
267
+ `)+1||r.length),o=XK(i);for(let a of n)o.delete(a);return{name:lz(s.key,YD([s])),key:s.key,runs:o,words:ZD(i).map(a=>a.word)}})}var Aze=cm/2;var XCe=e=>e.criteria.size?`${e.text.name} ${[...e.criteria].sort((t,n)=>t-n).map(t=>`AC${t}`).join(", ")}`:e.text.name,eSe=new RegExp("(?<![\\p{L}\\p{N}])\\p{L}[\\p{L}\\p{N}+.-]*:\\/\\/(?:[^\\s\"'`<>|\\u2018\\u2019\\u201C\\u201D\\u3000-\\u303F\\uFF01-\\uFF0F\\uFF1A-\\uFF20]|<[\\p{L}\\p{N}_-]+>)*(?:[^\\s\"'`<>|\\u2018\\u2019\\u201C\\u201D\\u3000-\\u303F\\uFF01-\\uFF0F\\uFF1A-\\uFF20.,;:!?)\\]]|<[\\p{L}\\p{N}_-]+>)","gu");function tSe(e){let t=[...e.matchAll(eSe)].map(s=>({start:s.index,end:s.index+s[0].length})),n=[[]];for(let s of ZD(e))t.some(r=>s.start>=r.start&&s.start<r.end)?n.at(-1).length&&n.push([]):n.at(-1).push(s);return n}function nSe(e,t){if(t.length===0)return[];let n=[];for(let s of tSe(e))for(let r=0;r+cm<=s.length;r++){let i=r6(s,r),o=t.find(p=>p.runs.has(i));if(!o)continue;let a=s[r].start,c=s[r+cm-1].end,u=o.criteria?.get(i)??[],l=n.at(-1);if(l&&a<=l.end){if(l.end=Math.max(l.end,c),l.text===o)for(let p of u)l.criteria.add(p)}else n.push({start:a,end:c,text:o,criteria:new Set(u)})}return n.map(s=>({start:s.start,end:s.end,name:XCe(s)}))}function ap(e,t,n=!1){let s=e;for(let r of nSe(e,t).reverse()){let i=s.slice(0,r.start).trimEnd(),o=i===""||/[.!?\n]$/.test(s.slice(0,r.start).replace(/[ \t]+$/,"")),c=n&&(o||/[:;—–-]$/.test(i))&&/^\s+[\p{L}\d]/u.test(s.slice(r.end))?`${o?"The":"the"} case (see ${r.name})`:`(see ${r.name})`;s=`${s.slice(0,r.start)}${c}${s.slice(r.end)}`}return s}function rSe(e,t,n){for(let s=t+1;s<e.length;s++){let r=e[s];if(r==="\\")s++;else{if(r===n)return s+1;if(r===`
268
268
  `&&n!=="`")return s}}return e.length}function sSe(e,t){let n=e.lastIndexOf(`
269
269
  `,t-1)+1;if(e.slice(n,t).trim()!=="")return!1;let s=e.slice(0,n).trimEnd();return s===""||s.endsWith(":")}function iSe(e){let t=[],n=r=>(e.indexOf(`
270
- `,r)+1||e.length+1)-1,s=0;for(;s<e.length;){let r=e[s],i=e[s+1],o=s+1;if(r==="/"&&i==="*")o=e.indexOf("*/",s+2)<0?e.length:e.indexOf("*/",s+2)+2,t.push({start:s,end:o});else if(r==="/"&&i==="/"&&!/[:\w]/.test(e[s-1]??"")||r==="#"&&/^\s?$/.test(e[s-1]??"")&&!/[!{[]/.test(i??""))o=n(s),t.push({start:s,end:o});else if((r==='"'||r==="'")&&e.startsWith(r.repeat(3),s)){let a=e.indexOf(r.repeat(3),s+3);o=a<0?e.length:a+3,sSe(e,s)&&t.push({start:s,end:o})}else(r==='"'||r==="'"||r==="`")&&(o=rSe(e,s,r));s=o}return t}var oSe=/\b(?:test|it|describe|context|suite|scenario|specify|Run|DisplayName)(?:\.\w+)*(?:\.each\s*(?:\((?:[^()]|\([^()]*\))*\)|`[^`]*`))?\s*\(\s*("(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|`(?:[^`\\]|\\.)*`)/g;function aSe(e,t){return[...e.matchAll(oSe)].flatMap(n=>{if(t.some(r=>n.index>=r.start&&n.index<r.end))return[];let s=n.index+n[0].length;return[{start:s-n[1].length,end:s}]})}function Tu(e,t){if(t.length===0)return{content:e,cleaned:!1};let n=iSe(e),s=[];for(let a of n){let c=e.slice(a.start,a.end),u=ap(c,t);u!==c&&s.push({...a,text:u})}let r=aSe(e,n),i=new Set(r.map(a=>e.slice(a.start+1,a.end-1)));for(let a of r){let c=e[a.start],u=e.slice(a.start+1,a.end-1),l=ap(u,t);if(l===u)continue;let p=l;for(let h=2;i.has(p);h++)p=`${l} (${h})`;i.add(p),s.push({...a,text:`${c}${p}${c}`})}let o=e;for(let a of s.sort((c,u)=>u.start-c.start))o=`${o.slice(0,a.start)}${a.text}${o.slice(a.end)}`;return{content:o,cleaned:o!==e}}var Oze=new Set(["requirement-reference","spec","pr-description"]);var um="generate-unit.json";function fSe(e){let{value:t,error:n}=Wt(e);if(n)return{errors:[n]};let{value:s,errors:r}=jn(WD,t);return r.length?{errors:r}:{output:s,errors:[]}}function hSe(e){return fSe(e.stdout)}var yqe=wr("generate-unit-schema",(e,t)=>hSe(t));var Mw=String.raw`(?:node:)?(?:http|https|http2|net|tls|dgram)`,Eqe=[[/\b(localhost|127\.0\.0\.1|0\.0\.0\.0)\b/,"a local server address"],[/^\s*(import|from)\s+(requests|aiohttp|urllib3|websockets?)\b/m,"an HTTP client"],[/^\s*(?:import|from)\s+(?:urllib\.request|http\.client|http\.server|socket|ssl|ftplib|smtplib|telnetlib)\b|^\s*from\s+urllib\s+import\b[^\n]*\brequest\b|\burlopen\s*\(/m,"a standard-library network client"],[/\bfrom\s+["'](axios|node-fetch|undici|ws)["']|require\(\s*["'](axios|node-fetch|undici|ws)["']\s*\)/,"an HTTP client"],[new RegExp(String.raw`\bfrom\s+["']${Mw}["']|\bimport\s+["']${Mw}["']|require\(\s*["']${Mw}["']\s*\)|\bimport\(\s*["']${Mw}["']\s*\)`),"Node's network modules"],[/\bfetch\s*\(|\bnew\s+(XMLHttpRequest|WebSocket)\b/,"a network call (fetch, XMLHttpRequest, WebSocket)"],[/\bskyramp\b/i,"the Skyramp runtime (a runtime mock or client)"]];var Mqe=new Set(["targeted_unit","existing_evidence_sufficient"]);var vSe="triage.json";var eHe=new Set(["existing_evidence","unaffected","existing_unit","new_unit","runtime"]),tHe={existing_evidence:"existing evidence",unaffected:"showing the change cannot reach it",existing_unit:"running the existing unit tests",new_unit:"a new unit test",runtime:"tests against the running application"};function bSe(e){let{value:t,error:n}=Wt(e);if(n)return{errors:[n]};let{value:s,errors:r}=jn(em,t);return r.length?{errors:r}:{triage:s,errors:[]}}function wSe(e){return bSe(e.stdout)}var nHe=wr("triage-schema",(e,t)=>wSe(t));function ISe(e){let t=e.inputs?.pipeline;return t?e.state.stages[t==="two-step"?"plan":"triage"]:e.state.stages.triage??e.state.stages.plan}function KD(e){if(ISe(e)?.status==="passed")return Vs(d6.join(e.outputsDir,vSe))}function XD(e){if(!mw(e))return eK(CD(e.inputs,Ae(e,`${np}.json`),KD(e)?.sutRequired))}var rHe=new Set(["deploy","recommend","generate","generate-ui","adapt","generate-unit","native-run","finalize","deliver"]);On();On();function p6(e,t){return t?`<!-- skyramp-testbot-run: ${t} -->
270
+ `,r)+1||e.length+1)-1,s=0;for(;s<e.length;){let r=e[s],i=e[s+1],o=s+1;if(r==="/"&&i==="*")o=e.indexOf("*/",s+2)<0?e.length:e.indexOf("*/",s+2)+2,t.push({start:s,end:o});else if(r==="/"&&i==="/"&&!/[:\w]/.test(e[s-1]??"")||r==="#"&&/^\s?$/.test(e[s-1]??"")&&!/[!{[]/.test(i??""))o=n(s),t.push({start:s,end:o});else if((r==='"'||r==="'")&&e.startsWith(r.repeat(3),s)){let a=e.indexOf(r.repeat(3),s+3);o=a<0?e.length:a+3,sSe(e,s)&&t.push({start:s,end:o})}else(r==='"'||r==="'"||r==="`")&&(o=rSe(e,s,r));s=o}return t}var oSe=/\b(?:test|it|describe|context|suite|scenario|specify|Run|DisplayName)(?:\.\w+)*(?:\.each\s*(?:\((?:[^()]|\([^()]*\))*\)|`[^`]*`))?\s*\(\s*("(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|`(?:[^`\\]|\\.)*`)/g;function aSe(e,t){return[...e.matchAll(oSe)].flatMap(n=>{if(t.some(r=>n.index>=r.start&&n.index<r.end))return[];let s=n.index+n[0].length;return[{start:s-n[1].length,end:s}]})}function Tu(e,t){if(t.length===0)return{content:e,cleaned:!1};let n=iSe(e),s=[];for(let a of n){let c=e.slice(a.start,a.end),u=ap(c,t);u!==c&&s.push({...a,text:u})}let r=aSe(e,n),i=new Set(r.map(a=>e.slice(a.start+1,a.end-1)));for(let a of r){let c=e[a.start],u=e.slice(a.start+1,a.end-1),l=ap(u,t);if(l===u)continue;let p=l;for(let h=2;i.has(p);h++)p=`${l} (${h})`;i.add(p),s.push({...a,text:`${c}${p}${c}`})}let o=e;for(let a of s.sort((c,u)=>u.start-c.start))o=`${o.slice(0,a.start)}${a.text}${o.slice(a.end)}`;return{content:o,cleaned:o!==e}}var Uze=new Set(["requirement-reference","spec","pr-description"]);var um="generate-unit.json";function fSe(e){let{value:t,error:n}=Wt(e);if(n)return{errors:[n]};let{value:s,errors:r}=jn(WD,t);return r.length?{errors:r}:{output:s,errors:[]}}function hSe(e){return fSe(e.stdout)}var Eqe=wr("generate-unit-schema",(e,t)=>hSe(t));var Mw=String.raw`(?:node:)?(?:http|https|http2|net|tls|dgram)`,vqe=[[/\b(localhost|127\.0\.0\.1|0\.0\.0\.0)\b/,"a local server address"],[/^\s*(import|from)\s+(requests|aiohttp|urllib3|websockets?)\b/m,"an HTTP client"],[/^\s*(?:import|from)\s+(?:urllib\.request|http\.client|http\.server|socket|ssl|ftplib|smtplib|telnetlib)\b|^\s*from\s+urllib\s+import\b[^\n]*\brequest\b|\burlopen\s*\(/m,"a standard-library network client"],[/\bfrom\s+["'](axios|node-fetch|undici|ws)["']|require\(\s*["'](axios|node-fetch|undici|ws)["']\s*\)/,"an HTTP client"],[new RegExp(String.raw`\bfrom\s+["']${Mw}["']|\bimport\s+["']${Mw}["']|require\(\s*["']${Mw}["']\s*\)|\bimport\(\s*["']${Mw}["']\s*\)`),"Node's network modules"],[/\bfetch\s*\(|\bnew\s+(XMLHttpRequest|WebSocket)\b/,"a network call (fetch, XMLHttpRequest, WebSocket)"],[/\bskyramp\b/i,"the Skyramp runtime (a runtime mock or client)"]];var Lqe=new Set(["targeted_unit","existing_evidence_sufficient"]);var vSe="triage.json";var tHe=new Set(["existing_evidence","unaffected","existing_unit","new_unit","runtime"]),nHe={existing_evidence:"existing evidence",unaffected:"showing the change cannot reach it",existing_unit:"running the existing unit tests",new_unit:"a new unit test",runtime:"tests against the running application"};function bSe(e){let{value:t,error:n}=Wt(e);if(n)return{errors:[n]};let{value:s,errors:r}=jn(em,t);return r.length?{errors:r}:{triage:s,errors:[]}}function wSe(e){return bSe(e.stdout)}var rHe=wr("triage-schema",(e,t)=>wSe(t));function ISe(e){let t=e.inputs?.pipeline;return t?e.state.stages[t==="two-step"?"plan":"triage"]:e.state.stages.triage??e.state.stages.plan}function KD(e){if(ISe(e)?.status==="passed")return Vs(d6.join(e.outputsDir,vSe))}function XD(e){if(!mw(e))return eK(CD(e.inputs,Ae(e,`${np}.json`),KD(e)?.sutRequired))}var sHe=new Set(["deploy","recommend","generate","generate-ui","adapt","generate-unit","native-run","finalize","deliver"]);On();On();function p6(e,t){return t?`<!-- skyramp-testbot-run: ${t} -->
271
271
  ${e}`:e}var h6=600,jw=300;function f6(e){return typeof e=="string"?e.trim():e instanceof Buffer?e.toString("utf-8").trim():""}function SSe(e){let t=e,n=(typeof t?.message=="string"?t.message:String(e)).trim(),s=[f6(t?.stderr),f6(t?.stdout)].filter(Boolean);return s.length?[n.split(`
272
272
  `)[0],...s].join(`
273
273
  `):n}function g6(e,t,n,s=0){let r=e.join(t);if(r.length<=n)return r;let[i="",...o]=e;if(!o.length)return`${i.slice(0,n-1)}\u2026`;let a=i.length<=s?i:i.slice(0,Math.floor(n/3)),c=n-a.length-t.length-1;return`${a}${t}\u2026${o.join(t).slice(-c)}`}function m6(e,t){return g6(e.trim().split(`
@@ -289,19 +289,19 @@ ${n}`}function T6(e){let t=[],n=!1;for(let s of e.split(`
289
289
  `))/^\s*signed-off-by:/i.test(s)?n=!0:n&&s.trim()===""&&t.at(-1)?.trim()===""||(t.push(s),n=!1);return t.join(`
290
290
  `).replace(/\s+$/,"")}function tN(e){let t=/\b(claude|anthropic)\b/i;return e.split(`
291
291
  `).filter(s=>{let r=s.trim();return!(/^co-authored-by:/i.test(r)&&t.test(r))&&!(/^[^\w\s]*\s*generated (?:with|by) /i.test(r)&&t.test(r))}).join(`
292
- `).replace(/\s+$/,"")}var qw="Skyramp-Pull-Request",lp="Skyramp-Delivery-Base",nN="Skyramp-Tested-Revision",rN="Skyramp-Delivery-Run";var NHe=["%H","%P","%an","%ae","%ce",`%(trailers:key=${qw},valueonly,separator=%x2C)`,"%s",`%(trailers:key=${lp},valueonly,separator=%x2C)`,`%(trailers:key=${nN},valueonly,separator=%x2C)`,`%(trailers:key=${rN},valueonly,separator=%x2C)`];function sN(e,t){let n=e(["log","-1","--format=%B"]);if(!n.includes(`${qw}:`)&&!n.includes(`${lp}:`))return;let s=n.split(`
292
+ `).replace(/\s+$/,"")}var qw="Skyramp-Pull-Request",lp="Skyramp-Delivery-Base",nN="Skyramp-Tested-Revision",rN="Skyramp-Delivery-Run";var PHe=["%H","%P","%an","%ae","%ce",`%(trailers:key=${qw},valueonly,separator=%x2C)`,"%s",`%(trailers:key=${lp},valueonly,separator=%x2C)`,`%(trailers:key=${nN},valueonly,separator=%x2C)`,`%(trailers:key=${rN},valueonly,separator=%x2C)`];function sN(e,t){let n=e(["log","-1","--format=%B"]);if(!n.includes(`${qw}:`)&&!n.includes(`${lp}:`))return;let s=n.split(`
293
293
  `).filter(o=>!o.startsWith(`${lp}:`)).join(`
294
294
  `).trimEnd(),r=t?`${s}
295
295
  ${lp}: ${t}`:s;e(["log","-1","--format=%(trailers:key=Signed-off-by,valueonly)"]).split(`
296
- `).some(o=>o.trim().toLowerCase()===`${co} <${da}>`.toLowerCase())&&(r=zw(r,{name:co,email:da})),e(["-c",`user.name=${co}`,"-c",`user.email=${da}`,"commit","--amend","--allow-empty","-m",r])}var Fa=G(require("fs")),mN=G(require("path"));function Zt(e){let t=Math.max(0,...(e.match(/`+/g)??[]).map(r=>r.length)),n="`".repeat(t+1),s=e.startsWith("`")||e.endsWith("`")?" ":"";return`${n}${s}${e}${s}${n}`}var rI=G(require("fs")),qt=G(require("path"));var bJe=[...Gl,"AWS_REGION","AWS_DEFAULT_REGION","AWS_ENDPOINT_URL","AWS_ENDPOINT_URL_BEDROCK_RUNTIME","AWS_ENDPOINT_URL_STS","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_VERTEX","ANTHROPIC_BASE_URL","ANTHROPIC_BEDROCK_BASE_URL"].filter((e,t,n)=>n.indexOf(e)===t);var Io=G(mx());var oN=require("child_process"),dp=G(require("fs")),D6=G(require("os")),Hw=G(require("path"));var XSe={onPath:e=>(0,oN.spawnSync)("sh",["-c",`command -v ${e}`],{stdio:"ignore"}).status===0,run:(e,t)=>(0,oN.spawnSync)(e[0],e.slice(1),{cwd:t,stdio:"ignore",timeout:6e4}).status??1},fm={cleanup:()=>{}},eke=new Set(["pnpm","yarn"]);function aN(e,t=D6.tmpdir(),n=XSe,s=uD(e)){if(process.platform==="win32")return fm;try{if(Vr(e)||!eke.has(s)||n.onPath(s)||!n.onPath("corepack"))return fm;dp.mkdirSync(t,{recursive:!0});let r=dp.mkdtempSync(Hw.join(t,"testbot-pm-")),i=()=>dp.rmSync(r,{recursive:!0,force:!0});return n.run(["corepack","enable","--install-directory",r,s],e)!==0?(i(),fm):{dir:r,cleanup:i}}catch{return fm}}function N6(e,t=process.env){return e.dir?{...t,PATH:[e.dir,t.PATH].filter(Boolean).join(Hw.delimiter)}:t}var KJe={jest:"jest",vitest:"vitest"};var ake=[["target","surefire-reports"],["target","failsafe-reports"],["build","test-results"]],nYe=new Set(ake.map(([e])=>e));var rYe=["jest","vitest","npm-test","playwright"];var lke="ci-collect";var AYe=5*6e4;function Jw(e,t){let n=new Set(t.tests.map(s=>s.file));return(Ae(e,`${lke}.json`)?.checks??[]).filter(s=>n.has(s.file))}function cN(e){let t=Ae(e,"write.json");if(!Array.isArray(t?.tests))return new Set;let n=new Set(t.tests.filter(s=>s.change==="added").map(s=>s.file));return new Set(Jw(e,t).filter(s=>s.verdict==="unprovisioned"&&n.has(s.file)).map(s=>s.file))}var rn=G(require("node:fs")),Kt=G(require("node:path")),Zw=require("node:child_process");var Ww=G(require("fs")),ts=G(require("path")),dke={lf:`
296
+ `).some(o=>o.trim().toLowerCase()===`${co} <${da}>`.toLowerCase())&&(r=zw(r,{name:co,email:da})),e(["-c",`user.name=${co}`,"-c",`user.email=${da}`,"commit","--amend","--allow-empty","-m",r])}var Fa=G(require("fs")),mN=G(require("path"));function Zt(e){let t=Math.max(0,...(e.match(/`+/g)??[]).map(r=>r.length)),n="`".repeat(t+1),s=e.startsWith("`")||e.endsWith("`")?" ":"";return`${n}${s}${e}${s}${n}`}var rI=G(require("fs")),qt=G(require("path"));var wJe=[...Gl,"AWS_REGION","AWS_DEFAULT_REGION","AWS_ENDPOINT_URL","AWS_ENDPOINT_URL_BEDROCK_RUNTIME","AWS_ENDPOINT_URL_STS","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_VERTEX","ANTHROPIC_BASE_URL","ANTHROPIC_BEDROCK_BASE_URL"].filter((e,t,n)=>n.indexOf(e)===t);var Io=G(mx());var oN=require("child_process"),dp=G(require("fs")),D6=G(require("os")),Hw=G(require("path"));var XSe={onPath:e=>(0,oN.spawnSync)("sh",["-c",`command -v ${e}`],{stdio:"ignore"}).status===0,run:(e,t)=>(0,oN.spawnSync)(e[0],e.slice(1),{cwd:t,stdio:"ignore",timeout:6e4}).status??1},fm={cleanup:()=>{}},eke=new Set(["pnpm","yarn"]);function aN(e,t=D6.tmpdir(),n=XSe,s=uD(e)){if(process.platform==="win32")return fm;try{if(Vr(e)||!eke.has(s)||n.onPath(s)||!n.onPath("corepack"))return fm;dp.mkdirSync(t,{recursive:!0});let r=dp.mkdtempSync(Hw.join(t,"testbot-pm-")),i=()=>dp.rmSync(r,{recursive:!0,force:!0});return n.run(["corepack","enable","--install-directory",r,s],e)!==0?(i(),fm):{dir:r,cleanup:i}}catch{return fm}}function N6(e,t=process.env){return e.dir?{...t,PATH:[e.dir,t.PATH].filter(Boolean).join(Hw.delimiter)}:t}var XJe={jest:"jest",vitest:"vitest"};var ake=[["target","surefire-reports"],["target","failsafe-reports"],["build","test-results"]],rYe=new Set(ake.map(([e])=>e));var sYe=["jest","vitest","npm-test","playwright"];var lke="ci-collect";var yYe=5*6e4;function Jw(e,t){let n=new Set(t.tests.map(s=>s.file));return(Ae(e,`${lke}.json`)?.checks??[]).filter(s=>n.has(s.file))}function cN(e){let t=Ae(e,"write.json");if(!Array.isArray(t?.tests))return new Set;let n=new Set(t.tests.filter(s=>s.change==="added").map(s=>s.file));return new Set(Jw(e,t).filter(s=>s.verdict==="unprovisioned"&&n.has(s.file)).map(s=>s.file))}var rn=G(require("node:fs")),Kt=G(require("node:path")),Zw=require("node:child_process");var Ww=G(require("fs")),ts=G(require("path")),dke={lf:`
297
297
  `,crlf:`\r
298
298
  `,cr:"\r"},pke=5*1024*1024,O6=e=>e.replace(/[.+^$()|\\/{}[\]*?]/g,"\\$&");function fke(e,t){let n=0;for(let s=t;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]==="{")n++;else if(e[s]==="}"&&--n===0)return s;return-1}function hke(e){let t=[],n=0,s="";for(let r=0;r<e.length;r++){let i=e[r];if(i==="\\"){s+=i+(e[++r]??"");continue}i==="{"&&n++,i==="}"&&n--,i===","&&!n?(t.push(s),s=""):s+=i}return[...t,s]}function uN(e){let t="";for(let n=0;n<e.length;n++){let s=e[n];if(s==="\\")t+=O6(e[++n]??"\\");else if(s==="*"&&e[n+1]==="*"){let r=(n===0||e[n-1]==="/")&&e[n+2]==="/";t+=r?"(?:.*/)?":".*",n+=r?2:1}else if(s==="*")t+="[^/]*";else if(s==="?")t+="[^/]";else if(s==="["){let r=e.indexOf("]",n+2);if(r<0||e.slice(n,r).includes("/"))t+="\\[";else{let i=e.slice(n+1,r);t+=`[${i.replace(/^!/,"^").replace(/\\(?!\])/g,"\\\\")}]`,n=r}}else if(s==="{"){let r=fke(e,n),i=r<0?"":e.slice(n+1,r),o=/^(-?\d+)\.\.(-?\d+)$/.exec(i),a=hke(i);if(o){let[c,u]=[Number(o[1]),Number(o[2])].sort((l,p)=>l-p);t+=`(?:${Array.from({length:Math.min(u-c+1,1e4)},(l,p)=>String(c+p)).join("|")})`,n=r}else a.length>1?(t+=`(?:${a.map(uN).join("|")})`,n=r):t+="\\{"}else t+=O6(s)}return t}function gke(e){return e.includes("/")?new RegExp(`^${uN(e.replace(/^\//,""))}$`):new RegExp(`^(?:.*/)?${uN(e)}$`)}function mke(e){let t={root:!1,sections:[]},n;for(let s of e.split(/\r\n|\r|\n/)){let r=s.trim();if(!r||r.startsWith("#")||r.startsWith(";"))continue;let i=/^\[(.+)\]$/.exec(r);if(i){n={matches:gke(i[1]),props:{}},t.sections.push(n);continue}let o=r.indexOf("=");if(o<0)continue;let a=r.slice(0,o).trim().toLowerCase(),c=r.slice(o+1).trim().toLowerCase();n?n.props[a]=c:a==="root"&&(t.root=c==="true")}return t}function Ake(e,t,n){let s=[];for(let i=ts.dirname(t);;i=ts.dirname(i)){let o=n(i);if(o&&s.unshift({dir:i,config:o}),o?.root||i===e||i===ts.dirname(i))break}let r={};for(let{dir:i,config:o}of s){let a=ts.relative(i,t).split(ts.sep).join("/");for(let c of o.sections)c.matches.test(a)&&Object.assign(r,c.props)}return Object.fromEntries(Object.entries(r).filter(([,i])=>i!=="unset"))}function yke(e,t){let n=e.startsWith("#!"),s=t.end_of_line?dke[t.end_of_line]:void 0,r=s&&!(n&&s!==`
299
299
  `)?s:void 0,i=r?e.replace(/\r\n|\r|\n/g,r):e;return t.insert_final_newline==="true"&&i.length&&!/[\r\n]$/.test(i)&&(i+=r??/\r\n|\r|\n/.exec(i)?.[0]??`
300
- `),i}function pp(e,t,n){if(n.length>pke||n.includes(0))return n;let s=ts.resolve(e),r=Ake(s,ts.resolve(s,t),i=>{try{return mke(Ww.readFileSync(ts.join(i,".editorconfig"),"utf-8"))}catch{return}});return Buffer.from(yke(n.toString("latin1"),r),"latin1")}var Du=G(require("node:fs")),Nu=G(require("node:path"));function lN(e,t){let n=Nu.relative(e,t);try{let s=Du.lstatSync(t);if(s.isSymbolicLink())return"test entry is a symlink";if(!s.isFile())return"test entry is not a regular file";let r=Du.realpathSync(e),i=Du.realpathSync(t),o=Nu.relative(r,i);return!o||o.startsWith("..")||Nu.isAbsolute(o)?`test entry's real path is outside the checkout (${o})`:o!==n?`test entry's real path is ${o}, not ${n}, after canonicalisation`:void 0}catch(s){return s.code==="ENOENT"?`test entry is missing: no file is at ${n} in the checkout`:`test entry cannot be read: ${hp(s,e)}`}}function fp(e,t){let n=lN(e,t);if(n)return n;try{return Du.readFileSync(t)}catch(s){return`test entry cannot be read: ${hp(s,e)}`}}function hp(e,t){return(e instanceof Error?e.message:String(e)).split(t+Nu.sep).join("")}function Eke(e){return Ae(e,`${W_}.json`)?.guardUnavailable===!0}function U6(e){let t=Ae(e,"recommend.json"),n=Ae(e,`${W_}.json`),s=new Map(Eke(e)?(t?.generate??[]).map(({id:r})=>[r,hw]):[]);for(let{id:r,reason:i}of t?.withheld??[])s.has(r)||s.set(r,`off-limits execution (${i??"environment policy"})`);if(n?.browserWithheld)for(let r of t?.generate??[])r.type==="ui"&&!s.has(r.id)&&s.set(r.id,"the shared-environment browser guard is unavailable");return s}function F6(e,t){let n=new Set((e.covers??[]).flatMap(s=>{let r=t.get(s);return r?[r]:[]}));return n.size?`environment restriction: ${[...n].join("; ")}`:void 0}function bke(e){return!!e.guardedDelivery||!!e.context?.some(t=>t.safety?.route==="persistence")}function gp(e,t){let n=e.inputs.sharedEnvironment?.environmentAddress;return!!n&&(t.result?.cases??[]).some(s=>s.runtimeTargets?.some(r=>tu(n,r)))}function gm(e,t,n=so().version){if(!En(e.inputs))return[];let s=e.inputs.sharedEnvironment,r=s?.environmentAddress,i=Ae(e,eB),o=mz.safeParse(i),a=o.success&&o.data.environmentId===s?.environmentId&&o.data.environmentAddress===r?o.data:void 0,c=Az.safeParse(i),u=c.success?fh(c.data.refusal):o.success?fh("changed"):fh("unavailable"),l=U6(e),p=new Map(Jw(e,t).map(E=>[E.file,E.verdict])),h=$D(BD(e)),g=Ae(e,"recommend.json"),m=new Map((g?.generate??[]).map(({id:E,target:b})=>[E,b])),y=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),v=new Map;for(let E of t.tests){if(E.change==="deleted")continue;let b=y(E.file);if(!es(b)||lo(b.rel))continue;let I=uo(e.inputs,b.repository);if("error"in I)continue;let C=I.source,w=Kt.resolve(C.path,b.rel),x=F6(E,l)??wke(h,b),S=bke(E),Y=gp(e,E),ue;if(!x&&!Y&&!S){if(!w.endsWith(".test.cjs"))continue;try{if(!dN(C.path,w))continue;ue=wo(rn.readFileSync(w,"utf8"))}catch{continue}if(!ue||"restriction"in ue)continue}let J=(E.covers??[]).flatMap(Ot=>{let ut=m.get(Ot)?.match(/^(GET|HEAD|OPTIONS|POST|PUT|PATCH|DELETE)\s+(\S+?)[,;]?(?:\s|$)/i);return!ut||!r?[]:ut[2].startsWith("/")||tu(r,ut[2])?[{method:ut[1].toUpperCase(),route:ut[2]}]:[]}),be=xke(e,C.path,b.rel);if(!x&&E.change!=="added"&&(be===!1||be===void 0&&!e.inputs.deliver))continue;let Me=Ot=>`${E.file}: shared-environment delivery is blocked: ${Ot}`,Ge={repository:C.slug,file:b.rel,sourceAsset:`${b.rel}.source`},ke=fp(C.path,w);if(typeof ke=="string"){v.set(w,{record:Ge,source:C,original:Buffer.alloc(0),problems:[Me(`${ke} (planGuardedDelivery)`)]});continue}if(E.change!=="added"&&Xs(e,C.path,b.rel)){x&&(Ge.reason=x,v.set(w,{record:Ge,source:C,original:ke,problems:[]}));continue}if(be===!1||E.change!=="added"&&be!==!0){v.set(w,{record:Ge,source:C,original:ke,problems:[Me(be===!1?"the file changes an existing test; retain the assertions in a new file":"cannot prove whether the shared test already exists; use a host-pinned checkout")]});continue}if(ue??=wo(ke.toString("utf8")),!x&&ue&&"restriction"in ue)continue;let X,z=Fw.safeParse(E.guardedDelivery),Je=a&&s?{environmentId:a.environmentId,environmentAddress:a.environmentAddress,persistenceRevision:a.revision,offLimits:s.offLimits??[],route:{kind:"persistence"}}:void 0,at=`environment restriction: persistence permission was not confirmed at generation: ${u}`;if(x)X=x;else if(S&&!Je)X=at;else if(!z.success||!Je)X="no guarded HTTP representation preserves the test's assertions";else if(!E.covers?.length||(E.functions?.length??1)!==1)X="guarded HTTP delivery requires one test function";else if(!/\.test\.cjs$/.test(b.rel)||!kke(E.ci))X="the test has no compatible Node CI entry";else if(!E.ci?.collected&&p.get(E.file)!=="not-collected")X="Testbot could not confirm that the repo's CI leaves it out, and only node --test can run the entry";else if(!Rke(C.path,w,n))X=`the CI package does not declare @skyramp/testbot-core ${n}, the released guarded runtime the entry needs`;else{let{steps:Ot}=z.data,ut=Je.offLimits.length?q_(e.inputs.skyrampMcp,Je.offLimits):void 0,Dn=new Map,Ct=Ot.flatMap(vt=>{if(vt.op==="create"){let se=Ike(Je.environmentAddress,vt.collection);return se&&Dn.set(vt.as,se),[{method:"POST",url:se,child:!1}]}if(vt.op!=="read"&&vt.op!=="update")return[];let Oe=Dn.get(vt.resource);return Oe&&Dn.set(vt.as,Oe),[{method:vt.op==="read"?"GET":vt.method??"PATCH",url:Oe,child:!0}]});Ct.some(({url:vt})=>!vt)?X="the guarded HTTP steps name an unknown resource or a collection outside the Test Environment":ut&&s&&Ct.some(({url:vt,child:Oe})=>!Oe&&lZ(vt.href,s,ut))?X="the guarded HTTP steps name an off-limits collection":J.length&&!J.some(({method:vt,route:Oe})=>Ct.some(se=>se.url&&se.method===vt&&Cke(Je.environmentAddress,se.url,se.child,Oe)))&&(X="the guarded HTTP steps do not represent the planned HTTP operation")}let sn;if(X)Ge.reason=X;else if(z.success&&Je){let{bearerTokenEnv:Ot,...ut}=z.data;sn={...ut,definition:{...Je,...Ot?{bearerTokenEnv:Ot}:{}}},Ge.entry=b.rel}let Et=Kt.resolve(C.path,Ge.sourceAsset),wn=Kw(Et)&&!hm(C.path,Et,ke)?[Me("the inert source asset path already contains different bytes")]:[];v.set(w,{record:Ge,source:C,original:ke,spec:sn,problems:wn})}return[...v.values()]}function wke(e,t){return e.find(n=>xD(n,{file:t.rel,repository:t.repository}))?.environmentRestriction}function Ike(e,t){try{let n=new URL(t,`${e.replace(/\/$/,"")}/`);return!n.search&&!n.hash&&!n.username&&!n.password&&!/[\\]|%(?:2f|5c|2e|25)/i.test(t)&&tu(e,n.href)?n:void 0}catch{return}}function Cke(e,t,n,s){try{let r=new URL(s,t.origin),i=s.startsWith("/")&&!s.startsWith("//")&&!tu(e,r.href)?new URL(s.slice(1),`${e.replace(/\/$/,"")}/`):r;if(!tu(e,i.href))return!1;let o=t.pathname.replace(/\/$/,""),a=i.pathname.replace(/\/$/,"");if(!n)return a===o;if(!a.startsWith(`${o}/`))return!1;let c=decodeURIComponent(a.slice(o.length+1));return/^(:[\w-]+|\{[^/{}]+\}|<[^/<>]+>)$/.test(c)}catch{return!1}}function Ske(e){return!!e&&/^(?:node|node:test|node\s+(?:.*\s)?--test(?:\s.*)?)$/i.test(e.trim())}function kke(e){return e?.collected===!1||!!e?.collected&&Ske(e.runner)}function dN(e,t){let n=rn.realpathSync(e);return rn.lstatSync(t).isFile()&&rn.realpathSync(t)===Kt.join(n,Kt.relative(e,t))}function hm(e,t,n){try{return dN(e,t)&&rn.readFileSync(t).equals(n)}catch{return!1}}function Kw(e){try{return rn.lstatSync(e),!0}catch(t){if(t.code==="ENOENT")return!1;throw t}}function Rke(e,t,n){if(n==="unknown")return!1;for(let s=Kt.dirname(t);;s=Kt.dirname(s)){let r=Kt.join(s,"package.json");if(Kw(r))try{if(!dN(e,r))return!1;let i=JSON.parse(rn.readFileSync(r,"utf-8"));return(i.devDependencies?.["@skyramp/testbot-core"]??i.dependencies?.["@skyramp/testbot-core"])===n}catch{return!1}if(s===e)return!1}}function Bke(e){let t=Ae(e,"write.json");return t?gm(e,t):[]}function M6(e,t=Bke(e),n=[],s=[]){return t.flatMap(({record:r,source:i,original:o,spec:a,problems:c})=>{if(c.length)return c;let u=Kt.join(i.path,r.sourceAsset),l=Kt.join(i.path,r.file),p=`reading ${r.file}`;try{let h=fp(i.path,l);if(typeof h=="string")return[`${r.file}: ${h} (writeGuardedDeliveryFiles)`];if(!h.equals(o))return[`${r.file}: native source changed before guarded delivery`];p=`preparing ${r.sourceAsset}`;let g=Tu(o.toString("utf-8"),n).content;if(ki(g,e.secretValues??[])!==g)return[`${r.file}: the retained source contains a credential`];let m=pp(i.path,r.sourceAsset,Buffer.from(g));if(p=`writing ${r.sourceAsset}`,Kw(u)){if(!hm(i.path,u,o)&&!hm(i.path,u,m))return[`${r.file}: the inert source asset path already contains different bytes`];hm(i.path,u,m)||(s.push(()=>rn.writeFileSync(u,o)),rn.writeFileSync(u,m))}else rn.writeFileSync(u,m,{flag:"wx"}),s.push(()=>rn.rmSync(u,{force:!0}));if(r.entry&&a){let y=sm({...a,name:ap(a.name,n)}),v=pp(i.path,r.entry,Buffer.from(y));if(!wo(v.toString("utf-8")))return[`${r.file}: the repository's file conventions changed the guarded entry`];if(ki(v.toString("utf-8"),e.secretValues??[])!==v.toString("utf-8"))return[`${r.file}: guarded delivery steps include a credential`];p=`writing ${r.entry}`,s.push(()=>rn.writeFileSync(l,o)),rn.writeFileSync(l,v)}return[]}catch(h){return[`${r.file}: could not assemble its guarded delivery files (writeGuardedDeliveryFiles): ${p} failed: ${hp(h,i.path)}`]}})}function xke(e,t,n){let s=e.executionSafetySources?.find(r=>Kt.resolve(r.path)===Kt.resolve(t));if(s)try{return(0,Zw.execFileSync)("git",["--literal-pathspecs","ls-tree",s.head,"--",n],{cwd:t,encoding:"utf-8",stdio:["ignore","pipe","ignore"]})===""}catch{return}}function Xs(e,t,n){let s=e.executionSafetySources?.find(r=>Kt.resolve(r.path)===Kt.resolve(t));if(!s||!/^[a-f0-9]{40,64}$/.test(s.head))return!1;try{let r=Kt.join(t,n),i=rn.lstatSync(r);if(!i.isFile()||rn.realpathSync(r)!==r)return!1;let o=Xw(t,s.head,n);return!o||(i.mode&73)!==0!==o.executable?!1:rn.readFileSync(r).equals(o.bytes)}catch{return!1}}var Yw=new Map;function Xw(e,t,n){let s=`${Kt.resolve(e)}\0${t}\0${n}`,r=Yw.get(s);if(r!==void 0)return r;let i=null;try{let o=(0,Zw.execFileSync)("git",["--literal-pathspecs","ls-tree",t,"--",n],{cwd:e,encoding:"utf-8",stdio:["ignore","pipe","ignore"]});/^100(?:644|755) blob /.test(o)&&(i={executable:o.startsWith("100755"),bytes:(0,Zw.execFileSync)("git",["show",`${t}:${n}`],{cwd:e,stdio:["ignore","pipe","ignore"]})})}catch{i=null}return Yw.size>=1e4&&Yw.clear(),Yw.set(s,i),i}function L6(e,t,n,s){if(!s.size)return[...n];let r=new Map(n.map(o=>[Kt.resolve(o.source.path,o.record.file),o])),i=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]);for(let o of t.tests){if(o.change==="deleted")continue;let a=i(o.file);if(!es(a)||lo(a.rel))continue;let c=uo(e.inputs,a.repository);if("error"in c)continue;let u=c.source,l=Kt.resolve(u.path,a.rel),p=s.get(l);if(!p)continue;let h=r.get(l);if(h){if(h.record.reason)continue;let b={...h.record,reason:p};delete b.entry,r.set(l,{...h,record:b,spec:void 0});continue}let g={repository:u.slug,file:a.rel,sourceAsset:`${a.rel}.source`,reason:p},m=b=>[`${o.file}: shared-environment delivery is blocked: ${b}`],y=fp(u.path,l);if(typeof y=="string"){r.set(l,{record:g,source:u,original:Buffer.alloc(0),problems:m(`${y} (holdDependents)`)});continue}let v=Kt.resolve(u.path,g.sourceAsset),E=Kw(v)&&!hm(u.path,v,y)?m("the inert source asset path already contains different bytes"):[];r.set(l,{record:g,source:u,original:y,problems:E})}return[...r.values()]}var Rs=G(require("node:fs")),$e=G(require("node:path"));var Pu=G(require("path"));var WYe={python:"pytest",typescript:"playwright",javascript:"playwright"},YYe={pytest:"pytest",playwright:"playwright"};var Dke=new Set(["package.json","package-lock.json","npm-shrinkwrap.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","pyproject.toml","poetry.lock","uv.lock","pdm.lock","Pipfile","Pipfile.lock","setup.py","setup.cfg","go.mod","go.sum","Gemfile","Gemfile.lock","pom.xml","build.gradle","build.gradle.kts"]);function mm(e){let t=Pu.basename(e);return Dke.has(t)||/^requirements[^/\\]*\.(txt|in)$/.test(t)}var G6="shared-environment delivery cannot verify it for guarded execution",z6=(e,t)=>`${Es(e.inputs,t.source.slug)}${t.file}`;function eI(e,t,n){let s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=new Set(n.map(i=>$e.resolve(i.source.path,i.record.file)));return t.tests.filter(i=>{let o=s(i.file);return!r.has($e.resolve(o.root,o.rel))&&i.change!=="updated"&&gp(e,i)})}function tI(e,t,n,s){let r=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),i=new Map(n.map(c=>[$e.resolve(c.source.path,c.record.file),c])),o=new Set,a=[];for(let c of t.tests){let u=r(c.file),l=$e.resolve(u.root,u.rel),p=i.get(l);if(p){o.add($e.resolve(u.root,p.record.sourceAsset)),p.record.entry&&o.add(l);continue}if(c.change==="deleted"){Jke(e,u.root,u.rel)?o.add(l):a.push(`${c.file}: a deleted shared-environment test must actually be absent and be a tracked regular file in the host-pinned source`);continue}if(c.change==="updated"||!gp(e,c)){o.add(l);continue}if(Xs(e,u.root,u.rel)){o.add(l);continue}try{let h=wo(Rs.readFileSync(l,"utf-8"));if(!h)continue;if(o.add(l),"restriction"in h){let g=$e.resolve($e.dirname(l),h.sourceAsset.path);o.add(g),!s.has(g)&&!Xs(e,u.root,$e.relative(u.root,g))&&a.push(`${c.file}: its restricted source asset is missing from the actual delivery commit`)}}catch{}}return{allowed:o,problems:a}}function nI(e,t,n,s){let r=[];for(let[i,o]of t)for(let a of o)n.has($e.resolve(i.path,a))||!s.length&&!e.inputs.deliver&&so().version==="unknown"||Hke(e,i.path,a)||Xs(e,i.path,a)||r.push({source:i,file:a});return r}var q6=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".json"],H6=/(?:\bfrom\s*|\bimport(?:\s*\()?\s*|\brequire\s*\(\s*)["'`]([^"'`\n]+)["'`]/g,Nke=/^[ \t]*from[ \t]+([.\w]+)[ \t]+import[ \t]+\(?([\w\t ,*]+)/gm,Pke=/^[ \t]*import[ \t]+([\w.]+)/gm;function Oke(e,t){if(!/^\.\.?(?:\/|$)/.test(t))return[];let n=$e.resolve(e,t),s=/\.[cm]?jsx?$/.test(n)?[n.replace(/\.([cm]?)js(x?)$/,".$1ts$2")]:[];return[n,...s,...q6.flatMap(r=>[n+r,$e.join(n,`index${r}`)])]}function j6(e,t,n,s){let r=/^\.*/.exec(n)[0].length,i=n.slice(r).split(".").filter(Boolean);return(r?[$e.resolve(t,...Array(r-1).fill(".."))]:[e,t]).flatMap(a=>{let c=$e.join(a,...i);return[`${c}.py`,$e.join(c,"__init__.py"),...s.map(u=>$e.join(c,`${u}.py`))]})}function Uke(e,t,n){let s=$e.dirname(t),r=new Set;if(t.endsWith(".py")){for(let[,i,o]of n.matchAll(Nke))for(let a of j6(e,s,i,o.split(/[\s,]+/).filter(c=>/^\w+$/.test(c))))r.add(a);for(let[,i]of n.matchAll(Pke))for(let o of j6(e,s,i,[]))r.add(o)}else for(let[,i]of n.matchAll(H6))for(let o of Oke(s,i))r.add(o);return r}function Fke(e,t){let n=new Set;if(e.endsWith(".py")||e.endsWith(".go"))return n;for(let[,s]of t.matchAll(H6)){if(/^\.\.?(?:\/|$)/.test(s)||/^[a-z][\w+.-]*:/i.test(s))continue;let r=s.split("/").pop()??"";r&&n.add(r.replace(/\.[cm]?[jt]sx?$/,""))}return n}function Mke(e,t){let n=$e.extname(t);if(!q6.includes(n))return!1;let s=$e.basename(t,n);return e.has(s)||s==="index"&&e.has($e.basename($e.dirname(t)))}function Lke(e,t){let n=$e.basename(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?<![\\w.-])${n}(?![\\w.-])`).test(e)}function V6(e,t){for(let n=$e.dirname(t);;n=$e.dirname(n)){if(Rs.existsSync($e.join(n,"go.mod")))return n;if(n===e||$e.dirname(n)===n)return e}}function jke(e,t){let n=[];t.isolatedRun&&n.push({cwd:".",text:t.isolatedRun}),t.run&&n.push({cwd:t.run.cwd,text:t.run.argv.join(" ")}),t.ci?.list&&n.push({cwd:t.ci.list.cwd,text:t.ci.list.argv.join(" ")});for(let r of t.ci?.steps??[])n.push({cwd:".",text:r.line});for(let r of t.context??[])r.cleanup&&n.push({cwd:".",text:r.cleanup});let s=new Set;for(let{cwd:r,text:i}of n)for(let o of i.split(/[\s"'`;&|()<>=,]+/))o&&!/^[a-z][\w+.-]*:/i.test(o)&&s.add($e.resolve(e,r,o));return s}var Vke={".py":"python",".js":"node",".cjs":"node",".mjs":"node",".jsx":"node",".ts":"node",".cts":"node",".mts":"node",".tsx":"node",".go":"go",".rb":"ruby",".java":"jvm",".kt":"jvm",".kts":"jvm",".scala":"jvm",".groovy":"jvm"},Gke=[[/^(?:playwright|vitest|jest)\.config\.(?:[cm]?[jt]s|json)$/,"node"],[/^tsconfig\.json$/,"node"],[/^(?:pytest|tox)\.ini$/,"python"]];function zke(e){let t=$e.basename(e);if(["conftest.py","__init__.py"].includes(t))return"python";let n=Gke.find(([s])=>s.test(t));if(n)return n[1];if(mm(e))return/^(?:package\.json|package-lock\.json|npm-shrinkwrap\.json|yarn\.lock|pnpm-lock\.yaml|bun\.lockb?)$/.test(t)?"node":/^go\.(?:mod|sum)$/.test(t)?"go":/^Gemfile(?:\.lock)?$/.test(t)?"ruby":/^(?:pom\.xml|build\.gradle(?:\.kts)?)$/.test(t)?"jvm":"python"}function qke(e,t,n){let s=Vke[$e.extname(t)];if(s==="go"&&$e.extname(n)===".go"&&V6(e,n)===V6(e,t))return!0;let r=zke(n);if(!r||s&&s!==r)return!1;let i=$e.relative($e.dirname(n),t);return!i.startsWith("..")&&!$e.isAbsolute(i)}function J6(e,t,n){let s=new Map;if(!n.length)return s;let r=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]);for(let i of t.tests){if(i.change==="deleted")continue;let o=r(i.file);if(!es(o)||Xs(e,o.root,o.rel))continue;let a=$e.resolve(o.root),c=$e.resolve(a,o.rel),u=n.filter(y=>$e.resolve(y.source.path)===a);if(!u.length)continue;let l="";try{l=Rs.readFileSync(c,"utf-8")}catch{}let p=Uke(a,c,l),h=Fke(c,l),g=jke(a,i),m=u.filter(y=>{let v=$e.resolve(a,y.file);return p.has(v)||g.has(v)||Mke(h,v)||Lke(l,v)||qke(a,c,v)});m.length&&s.set(c,`needs ${m.map(y=>z6(e,y)).join(", ")}, which is not in the tests PR: ${G6}`)}return s}function Oa(e){return Array.isArray(e)?`[${e.map(Oa).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>`${JSON.stringify(t)}:${Oa(n)}`).join(",")}}`:JSON.stringify(e)??"undefined"}function Hke(e,t,n){let s=$e.basename(n);if(s!=="package.json"&&s!=="package-lock.json")return!1;let r=so().version;if(r==="unknown")return!1;let i,o;try{let a=$e.resolve(t,n);if(!Rs.lstatSync(a).isFile()||Rs.realpathSync(a)!==a)return!1;i=JSON.parse(Rs.readFileSync(a,"utf-8"));let c=e.executionSafetySources?.find(h=>$e.resolve(h.path)===$e.resolve(t));if(c){let h=Xw(t,c.head,n);h&&(o=JSON.parse(h.bytes.toString("utf-8")))}else if(Rs.existsSync($e.join(t,".git")))return!1;let u=h=>{let g=structuredClone(h);for(let m of["dependencies","devDependencies"])g[m]&&(delete g[m]["@skyramp/testbot-core"],Object.keys(g[m]).length||delete g[m]);return g};if(s==="package.json")return(i.devDependencies?.["@skyramp/testbot-core"]??i.dependencies?.["@skyramp/testbot-core"])!==r?!1:o?Oa(u(i))===Oa(u(o)):Object.keys(i).every(h=>["name","version","private","type","scripts","dependencies","devDependencies"].includes(h))&&(!i.scripts||Oa(i.scripts)===Oa({test:"node --test"}))&&Object.keys(i.dependencies??{}).every(h=>h==="@skyramp/testbot-core")&&Object.keys(i.devDependencies??{}).every(h=>h==="@skyramp/testbot-core");let l=i.packages?.["node_modules/@skyramp/testbot-core"];if(!l||l.version!==r||l.link||l.hasInstallScript||l.resolved!==`https://registry.npmjs.org/@skyramp/testbot-core/-/testbot-core-${r}.tgz`||!/^sha512-[A-Za-z0-9+/=]+$/.test(l.integrity??""))return!1;let p=h=>{let g=structuredClone(h);return g.packages&&(delete g.packages["node_modules/@skyramp/testbot-core"],g.packages[""]&&(g.packages[""]=u(g.packages[""]))),g};return o?Oa(p(i))===Oa(p(o)):Object.keys(i.packages??{}).every(h=>h===""||h==="node_modules/@skyramp/testbot-core")&&!i.packages?.[""]?.scripts}catch{return!1}}function Jke(e,t,n){try{return Rs.lstatSync($e.join(t,n)),!1}catch(r){if(r.code!=="ENOENT")return!1}let s=e.executionSafetySources?.find(r=>$e.resolve(r.path)===$e.resolve(t));return!s||!/^[a-f0-9]{40,64}$/.test(s.head)?!1:Xw(t,s.head,n)!==null}function Wke(e){try{return rI.lstatSync(e),!0}catch{return!1}}function sI(e,t=Am(e)){let n=new Set(t.omitted.map(({source:s,file:r})=>qt.resolve(s.path,r)));return new Map([...W6(e,t.assemblies)].map(([s,r])=>[s,r.filter(i=>!n.has(qt.resolve(s.path,i)))]))}function Am(e,t=Ae(e,"write.json")){if(!t||!En(e.inputs))return{assemblies:[],omitted:[],hasSharedTests:!1};let n=gm(e,t),s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=new Set(t.tests.map(a=>{let c=s(a.file);return qt.resolve(c.root,c.rel)})),i=[],o=n;for(;;){let a=o.length>0||eI(e,t,o).length>0;if(!a)return{assemblies:o,omitted:i,hasSharedTests:a};let c=W6(e,o),u=new Set([...c].flatMap(([g,m])=>m.map(y=>qt.resolve(g.path,y)))),{allowed:l}=tI(e,t,o,u),p=new Set(i.map(({source:g,file:m})=>qt.resolve(g.path,m))),h=nI(e,c,l,o).filter(({source:g,file:m})=>{let y=qt.resolve(g.path,m);return!p.has(y)&&!r.has(y)});if(!h.length)return{assemblies:o,omitted:i,hasSharedTests:a};i.push(...h),o=L6(e,t,n,J6(e,t,i))}}function W6(e,t){let n=new Set(t.filter(({record:v})=>!v.entry).map(({source:v,record:E})=>qt.join(v.path,E.file))),s=Ae(e,"adapt.json"),r=Ae(e,"finalize.json"),i=Ae(e,um),o=new Map,a=v=>{let E=uo(e.inputs,v);if("error"in E)return;let b=o.get(E.source.path)??{source:E.source,paths:new Set};return o.set(E.source.path,b),{repo:b.source.path,paths:b.paths}},c=(v,E)=>qt.relative(v,qt.resolve(v,E.trim())).replace(/\/+$/,""),u=(v,E)=>{let b=E?.trim()&&a(v);if(!b)return;let I=c(b.repo,E);b.paths.add(I);for(let C of["__init__.py","conftest.py"]){let w=qt.join(qt.dirname(I),C);rI.existsSync(qt.join(b.repo,w))&&(!n.has(qt.join(b.repo,I))||!Xs(e,b.repo,w))&&b.paths.add(w)}},l=(v,E)=>{if(typeof E!="string"||!E.trim())return;let b=a(v);if(!b)return;let I=c(b.repo,E);if(tp(qt.join(b.repo,I)))return b.paths.add(I),{...b,rel:I}},p=cN(e),h=(s?.items??[]).filter(v=>v.action==="place"&&p.has(v.from??v.file??"")),g=(v,E)=>h.some(b=>b.repository===v&&b.file&&qt.normalize(b.file)===E),m=(s?.items??[]).filter(v=>!h.includes(v));for(let v of[...m,...i?.tests??[],...i?.maintained??[]])u(v.repository,v.file);for(let v of r?.dependencies?.added??[]){let E=l(v.repository,v.manifest);if(E)for(let b of pD(E.repo,Cw(E.repo,E.rel)))E.paths.add(b)}for(let v of r?.lint??[])for(let E of v.fixed??[])l(v.repository,E);for(let v of r?.support??[])l(v.repository,v.file);let y=Ae(e,Rw)?.packages??[];for(let v of new Set(y.map(E=>E.repository))){let E=a(v),b=y.filter(I=>I.repository===v).map(I=>I.dir);if(E)for(let{path:I}of nm(E.repo)){let C=c(E.repo,I),w=qt.join(E.repo,C);Hg(C,b)&&!yD(C)&&!g(v,C)&&(!Wke(w)||tp(w))&&E.paths.add(C)}}for(let{record:v,source:E,problems:b}of t){let I=o.get(E.path)?.paths;I?.has(v.file)&&(I.delete(v.file),!b.length&&(v.entry&&I.add(v.entry),I.add(v.sourceAsset)))}return new Map([...o.values()].map(({source:v,paths:E})=>[v,[...E].filter(b=>b&&b!==".."&&!b.startsWith(`..${qt.sep}`)&&!lo(b))]))}var nZe=5*6e4,rZe=12*6e4,sZe=2*6e4;var lZe=["class TestbotProjectBrowsers {"," onBegin(config) {",' const projects = config.projects.map((p) => ({ browserName: p.use.browserName ?? p.use.defaultBrowserType ?? "chromium", channel: p.use.channel ?? null }));',' process.stdout.write("TESTBOT_PROJECT_BROWSERS " + JSON.stringify(projects) + "\\n");'," }"," printsToStdio() { return true; }","}","module.exports = TestbotProjectBrowsers;",""].join(`
300
+ `),i}function pp(e,t,n){if(n.length>pke||n.includes(0))return n;let s=ts.resolve(e),r=Ake(s,ts.resolve(s,t),i=>{try{return mke(Ww.readFileSync(ts.join(i,".editorconfig"),"utf-8"))}catch{return}});return Buffer.from(yke(n.toString("latin1"),r),"latin1")}var Du=G(require("node:fs")),Nu=G(require("node:path"));function lN(e,t){let n=Nu.relative(e,t);try{let s=Du.lstatSync(t);if(s.isSymbolicLink())return"test entry is a symlink";if(!s.isFile())return"test entry is not a regular file";let r=Du.realpathSync(e),i=Du.realpathSync(t),o=Nu.relative(r,i);return!o||o.startsWith("..")||Nu.isAbsolute(o)?`test entry's real path is outside the checkout (${o})`:o!==n?`test entry's real path is ${o}, not ${n}, after canonicalisation`:void 0}catch(s){return s.code==="ENOENT"?`test entry is missing: no file is at ${n} in the checkout`:`test entry cannot be read: ${hp(s,e)}`}}function fp(e,t){let n=lN(e,t);if(n)return n;try{return Du.readFileSync(t)}catch(s){return`test entry cannot be read: ${hp(s,e)}`}}function hp(e,t){return(e instanceof Error?e.message:String(e)).split(t+Nu.sep).join("")}function Eke(e){return Ae(e,`${W_}.json`)?.guardUnavailable===!0}function U6(e){let t=Ae(e,"recommend.json"),n=Ae(e,`${W_}.json`),s=new Map(Eke(e)?(t?.generate??[]).map(({id:r})=>[r,hw]):[]);for(let{id:r,reason:i}of t?.withheld??[])s.has(r)||s.set(r,`off-limits execution (${i??"environment policy"})`);if(n?.browserWithheld)for(let r of t?.generate??[])r.type==="ui"&&!s.has(r.id)&&s.set(r.id,"the shared-environment browser guard is unavailable");return s}function F6(e,t){let n=new Set((e.covers??[]).flatMap(s=>{let r=t.get(s);return r?[r]:[]}));return n.size?`environment restriction: ${[...n].join("; ")}`:void 0}function bke(e){return!!e.guardedDelivery||!!e.context?.some(t=>t.safety?.route==="persistence")}function gp(e,t){let n=e.inputs.sharedEnvironment?.environmentAddress;return!!n&&(t.result?.cases??[]).some(s=>s.runtimeTargets?.some(r=>tu(n,r)))}function gm(e,t,n=so().version){if(!En(e.inputs))return[];let s=e.inputs.sharedEnvironment,r=s?.environmentAddress,i=Ae(e,eB),o=mz.safeParse(i),a=o.success&&o.data.environmentId===s?.environmentId&&o.data.environmentAddress===r?o.data:void 0,c=Az.safeParse(i),u=c.success?fh(c.data.refusal):o.success?fh("changed"):fh("unavailable"),l=U6(e),p=new Map(Jw(e,t).map(E=>[E.file,E.verdict])),h=$D(BD(e)),g=Ae(e,"recommend.json"),m=new Map((g?.generate??[]).map(({id:E,target:b})=>[E,b])),y=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),v=new Map;for(let E of t.tests){if(E.change==="deleted")continue;let b=y(E.file);if(!es(b)||lo(b.rel))continue;let I=uo(e.inputs,b.repository);if("error"in I)continue;let C=I.source,w=Kt.resolve(C.path,b.rel),x=F6(E,l)??wke(h,b),S=bke(E),Y=gp(e,E),ue;if(!x&&!Y&&!S){if(!w.endsWith(".test.cjs"))continue;try{if(!dN(C.path,w))continue;ue=wo(rn.readFileSync(w,"utf8"))}catch{continue}if(!ue||"restriction"in ue)continue}let J=(E.covers??[]).flatMap(Ot=>{let ut=m.get(Ot)?.match(/^(GET|HEAD|OPTIONS|POST|PUT|PATCH|DELETE)\s+(\S+?)[,;]?(?:\s|$)/i);return!ut||!r?[]:ut[2].startsWith("/")||tu(r,ut[2])?[{method:ut[1].toUpperCase(),route:ut[2]}]:[]}),be=xke(e,C.path,b.rel);if(!x&&E.change!=="added"&&(be===!1||be===void 0&&!e.inputs.deliver))continue;let Me=Ot=>`${E.file}: shared-environment delivery is blocked: ${Ot}`,Ge={repository:C.slug,file:b.rel,sourceAsset:`${b.rel}.source`},ke=fp(C.path,w);if(typeof ke=="string"){v.set(w,{record:Ge,source:C,original:Buffer.alloc(0),problems:[Me(`${ke} (planGuardedDelivery)`)]});continue}if(E.change!=="added"&&Xs(e,C.path,b.rel)){x&&(Ge.reason=x,v.set(w,{record:Ge,source:C,original:ke,problems:[]}));continue}if(be===!1||E.change!=="added"&&be!==!0){v.set(w,{record:Ge,source:C,original:ke,problems:[Me(be===!1?"the file changes an existing test; retain the assertions in a new file":"cannot prove whether the shared test already exists; use a host-pinned checkout")]});continue}if(ue??=wo(ke.toString("utf8")),!x&&ue&&"restriction"in ue)continue;let X,z=Fw.safeParse(E.guardedDelivery),Je=a&&s?{environmentId:a.environmentId,environmentAddress:a.environmentAddress,persistenceRevision:a.revision,offLimits:s.offLimits??[],route:{kind:"persistence"}}:void 0,at=`environment restriction: persistence permission was not confirmed at generation: ${u}`;if(x)X=x;else if(S&&!Je)X=at;else if(!z.success||!Je)X="no guarded HTTP representation preserves the test's assertions";else if(!E.covers?.length||(E.functions?.length??1)!==1)X="guarded HTTP delivery requires one test function";else if(!/\.test\.cjs$/.test(b.rel)||!kke(E.ci))X="the test has no compatible Node CI entry";else if(!E.ci?.collected&&p.get(E.file)!=="not-collected")X="Testbot could not confirm that the repo's CI leaves it out, and only node --test can run the entry";else if(!Rke(C.path,w,n))X=`the CI package does not declare @skyramp/testbot-core ${n}, the released guarded runtime the entry needs`;else{let{steps:Ot}=z.data,ut=Je.offLimits.length?q_(e.inputs.skyrampMcp,Je.offLimits):void 0,Dn=new Map,Ct=Ot.flatMap(vt=>{if(vt.op==="create"){let se=Ike(Je.environmentAddress,vt.collection);return se&&Dn.set(vt.as,se),[{method:"POST",url:se,child:!1}]}if(vt.op!=="read"&&vt.op!=="update")return[];let Oe=Dn.get(vt.resource);return Oe&&Dn.set(vt.as,Oe),[{method:vt.op==="read"?"GET":vt.method??"PATCH",url:Oe,child:!0}]});Ct.some(({url:vt})=>!vt)?X="the guarded HTTP steps name an unknown resource or a collection outside the Test Environment":ut&&s&&Ct.some(({url:vt,child:Oe})=>!Oe&&lZ(vt.href,s,ut))?X="the guarded HTTP steps name an off-limits collection":J.length&&!J.some(({method:vt,route:Oe})=>Ct.some(se=>se.url&&se.method===vt&&Cke(Je.environmentAddress,se.url,se.child,Oe)))&&(X="the guarded HTTP steps do not represent the planned HTTP operation")}let sn;if(X)Ge.reason=X;else if(z.success&&Je){let{bearerTokenEnv:Ot,...ut}=z.data;sn={...ut,definition:{...Je,...Ot?{bearerTokenEnv:Ot}:{}}},Ge.entry=b.rel}let Et=Kt.resolve(C.path,Ge.sourceAsset),wn=Kw(Et)&&!hm(C.path,Et,ke)?[Me("the inert source asset path already contains different bytes")]:[];v.set(w,{record:Ge,source:C,original:ke,spec:sn,problems:wn})}return[...v.values()]}function wke(e,t){return e.find(n=>xD(n,{file:t.rel,repository:t.repository}))?.environmentRestriction}function Ike(e,t){try{let n=new URL(t,`${e.replace(/\/$/,"")}/`);return!n.search&&!n.hash&&!n.username&&!n.password&&!/[\\]|%(?:2f|5c|2e|25)/i.test(t)&&tu(e,n.href)?n:void 0}catch{return}}function Cke(e,t,n,s){try{let r=new URL(s,t.origin),i=s.startsWith("/")&&!s.startsWith("//")&&!tu(e,r.href)?new URL(s.slice(1),`${e.replace(/\/$/,"")}/`):r;if(!tu(e,i.href))return!1;let o=t.pathname.replace(/\/$/,""),a=i.pathname.replace(/\/$/,"");if(!n)return a===o;if(!a.startsWith(`${o}/`))return!1;let c=decodeURIComponent(a.slice(o.length+1));return/^(:[\w-]+|\{[^/{}]+\}|<[^/<>]+>)$/.test(c)}catch{return!1}}function Ske(e){return!!e&&/^(?:node|node:test|node\s+(?:.*\s)?--test(?:\s.*)?)$/i.test(e.trim())}function kke(e){return e?.collected===!1||!!e?.collected&&Ske(e.runner)}function dN(e,t){let n=rn.realpathSync(e);return rn.lstatSync(t).isFile()&&rn.realpathSync(t)===Kt.join(n,Kt.relative(e,t))}function hm(e,t,n){try{return dN(e,t)&&rn.readFileSync(t).equals(n)}catch{return!1}}function Kw(e){try{return rn.lstatSync(e),!0}catch(t){if(t.code==="ENOENT")return!1;throw t}}function Rke(e,t,n){if(n==="unknown")return!1;for(let s=Kt.dirname(t);;s=Kt.dirname(s)){let r=Kt.join(s,"package.json");if(Kw(r))try{if(!dN(e,r))return!1;let i=JSON.parse(rn.readFileSync(r,"utf-8"));return(i.devDependencies?.["@skyramp/testbot-core"]??i.dependencies?.["@skyramp/testbot-core"])===n}catch{return!1}if(s===e)return!1}}function Bke(e){let t=Ae(e,"write.json");return t?gm(e,t):[]}function M6(e,t=Bke(e),n=[],s=[]){return t.flatMap(({record:r,source:i,original:o,spec:a,problems:c})=>{if(c.length)return c;let u=Kt.join(i.path,r.sourceAsset),l=Kt.join(i.path,r.file),p=`reading ${r.file}`;try{let h=fp(i.path,l);if(typeof h=="string")return[`${r.file}: ${h} (writeGuardedDeliveryFiles)`];if(!h.equals(o))return[`${r.file}: native source changed before guarded delivery`];p=`preparing ${r.sourceAsset}`;let g=Tu(o.toString("utf-8"),n).content;if(ki(g,e.secretValues??[])!==g)return[`${r.file}: the retained source contains a credential`];let m=pp(i.path,r.sourceAsset,Buffer.from(g));if(p=`writing ${r.sourceAsset}`,Kw(u)){if(!hm(i.path,u,o)&&!hm(i.path,u,m))return[`${r.file}: the inert source asset path already contains different bytes`];hm(i.path,u,m)||(s.push(()=>rn.writeFileSync(u,o)),rn.writeFileSync(u,m))}else rn.writeFileSync(u,m,{flag:"wx"}),s.push(()=>rn.rmSync(u,{force:!0}));if(r.entry&&a){let y=sm({...a,name:ap(a.name,n)}),v=pp(i.path,r.entry,Buffer.from(y));if(!wo(v.toString("utf-8")))return[`${r.file}: the repository's file conventions changed the guarded entry`];if(ki(v.toString("utf-8"),e.secretValues??[])!==v.toString("utf-8"))return[`${r.file}: guarded delivery steps include a credential`];p=`writing ${r.entry}`,s.push(()=>rn.writeFileSync(l,o)),rn.writeFileSync(l,v)}return[]}catch(h){return[`${r.file}: could not assemble its guarded delivery files (writeGuardedDeliveryFiles): ${p} failed: ${hp(h,i.path)}`]}})}function xke(e,t,n){let s=e.executionSafetySources?.find(r=>Kt.resolve(r.path)===Kt.resolve(t));if(s)try{return(0,Zw.execFileSync)("git",["--literal-pathspecs","ls-tree",s.head,"--",n],{cwd:t,encoding:"utf-8",stdio:["ignore","pipe","ignore"]})===""}catch{return}}function Xs(e,t,n){let s=e.executionSafetySources?.find(r=>Kt.resolve(r.path)===Kt.resolve(t));if(!s||!/^[a-f0-9]{40,64}$/.test(s.head))return!1;try{let r=Kt.join(t,n),i=rn.lstatSync(r);if(!i.isFile()||rn.realpathSync(r)!==r)return!1;let o=Xw(t,s.head,n);return!o||(i.mode&73)!==0!==o.executable?!1:rn.readFileSync(r).equals(o.bytes)}catch{return!1}}var Yw=new Map;function Xw(e,t,n){let s=`${Kt.resolve(e)}\0${t}\0${n}`,r=Yw.get(s);if(r!==void 0)return r;let i=null;try{let o=(0,Zw.execFileSync)("git",["--literal-pathspecs","ls-tree",t,"--",n],{cwd:e,encoding:"utf-8",stdio:["ignore","pipe","ignore"]});/^100(?:644|755) blob /.test(o)&&(i={executable:o.startsWith("100755"),bytes:(0,Zw.execFileSync)("git",["show",`${t}:${n}`],{cwd:e,stdio:["ignore","pipe","ignore"]})})}catch{i=null}return Yw.size>=1e4&&Yw.clear(),Yw.set(s,i),i}function L6(e,t,n,s){if(!s.size)return[...n];let r=new Map(n.map(o=>[Kt.resolve(o.source.path,o.record.file),o])),i=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]);for(let o of t.tests){if(o.change==="deleted")continue;let a=i(o.file);if(!es(a)||lo(a.rel))continue;let c=uo(e.inputs,a.repository);if("error"in c)continue;let u=c.source,l=Kt.resolve(u.path,a.rel),p=s.get(l);if(!p)continue;let h=r.get(l);if(h){if(h.record.reason)continue;let b={...h.record,reason:p};delete b.entry,r.set(l,{...h,record:b,spec:void 0});continue}let g={repository:u.slug,file:a.rel,sourceAsset:`${a.rel}.source`,reason:p},m=b=>[`${o.file}: shared-environment delivery is blocked: ${b}`],y=fp(u.path,l);if(typeof y=="string"){r.set(l,{record:g,source:u,original:Buffer.alloc(0),problems:m(`${y} (holdDependents)`)});continue}let v=Kt.resolve(u.path,g.sourceAsset),E=Kw(v)&&!hm(u.path,v,y)?m("the inert source asset path already contains different bytes"):[];r.set(l,{record:g,source:u,original:y,problems:E})}return[...r.values()]}var Rs=G(require("node:fs")),$e=G(require("node:path"));var Pu=G(require("path"));var YYe={python:"pytest",typescript:"playwright",javascript:"playwright"},ZYe={pytest:"pytest",playwright:"playwright"};var Dke=new Set(["package.json","package-lock.json","npm-shrinkwrap.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","pyproject.toml","poetry.lock","uv.lock","pdm.lock","Pipfile","Pipfile.lock","setup.py","setup.cfg","go.mod","go.sum","Gemfile","Gemfile.lock","pom.xml","build.gradle","build.gradle.kts"]);function mm(e){let t=Pu.basename(e);return Dke.has(t)||/^requirements[^/\\]*\.(txt|in)$/.test(t)}var G6="shared-environment delivery cannot verify it for guarded execution",z6=(e,t)=>`${Es(e.inputs,t.source.slug)}${t.file}`;function eI(e,t,n){let s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=new Set(n.map(i=>$e.resolve(i.source.path,i.record.file)));return t.tests.filter(i=>{let o=s(i.file);return!r.has($e.resolve(o.root,o.rel))&&i.change!=="updated"&&gp(e,i)})}function tI(e,t,n,s){let r=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),i=new Map(n.map(c=>[$e.resolve(c.source.path,c.record.file),c])),o=new Set,a=[];for(let c of t.tests){let u=r(c.file),l=$e.resolve(u.root,u.rel),p=i.get(l);if(p){o.add($e.resolve(u.root,p.record.sourceAsset)),p.record.entry&&o.add(l);continue}if(c.change==="deleted"){Jke(e,u.root,u.rel)?o.add(l):a.push(`${c.file}: a deleted shared-environment test must actually be absent and be a tracked regular file in the host-pinned source`);continue}if(c.change==="updated"||!gp(e,c)){o.add(l);continue}if(Xs(e,u.root,u.rel)){o.add(l);continue}try{let h=wo(Rs.readFileSync(l,"utf-8"));if(!h)continue;if(o.add(l),"restriction"in h){let g=$e.resolve($e.dirname(l),h.sourceAsset.path);o.add(g),!s.has(g)&&!Xs(e,u.root,$e.relative(u.root,g))&&a.push(`${c.file}: its restricted source asset is missing from the actual delivery commit`)}}catch{}}return{allowed:o,problems:a}}function nI(e,t,n,s){let r=[];for(let[i,o]of t)for(let a of o)n.has($e.resolve(i.path,a))||!s.length&&!e.inputs.deliver&&so().version==="unknown"||Hke(e,i.path,a)||Xs(e,i.path,a)||r.push({source:i,file:a});return r}var q6=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".json"],H6=/(?:\bfrom\s*|\bimport(?:\s*\()?\s*|\brequire\s*\(\s*)["'`]([^"'`\n]+)["'`]/g,Nke=/^[ \t]*from[ \t]+([.\w]+)[ \t]+import[ \t]+\(?([\w\t ,*]+)/gm,Pke=/^[ \t]*import[ \t]+([\w.]+)/gm;function Oke(e,t){if(!/^\.\.?(?:\/|$)/.test(t))return[];let n=$e.resolve(e,t),s=/\.[cm]?jsx?$/.test(n)?[n.replace(/\.([cm]?)js(x?)$/,".$1ts$2")]:[];return[n,...s,...q6.flatMap(r=>[n+r,$e.join(n,`index${r}`)])]}function j6(e,t,n,s){let r=/^\.*/.exec(n)[0].length,i=n.slice(r).split(".").filter(Boolean);return(r?[$e.resolve(t,...Array(r-1).fill(".."))]:[e,t]).flatMap(a=>{let c=$e.join(a,...i);return[`${c}.py`,$e.join(c,"__init__.py"),...s.map(u=>$e.join(c,`${u}.py`))]})}function Uke(e,t,n){let s=$e.dirname(t),r=new Set;if(t.endsWith(".py")){for(let[,i,o]of n.matchAll(Nke))for(let a of j6(e,s,i,o.split(/[\s,]+/).filter(c=>/^\w+$/.test(c))))r.add(a);for(let[,i]of n.matchAll(Pke))for(let o of j6(e,s,i,[]))r.add(o)}else for(let[,i]of n.matchAll(H6))for(let o of Oke(s,i))r.add(o);return r}function Fke(e,t){let n=new Set;if(e.endsWith(".py")||e.endsWith(".go"))return n;for(let[,s]of t.matchAll(H6)){if(/^\.\.?(?:\/|$)/.test(s)||/^[a-z][\w+.-]*:/i.test(s))continue;let r=s.split("/").pop()??"";r&&n.add(r.replace(/\.[cm]?[jt]sx?$/,""))}return n}function Mke(e,t){let n=$e.extname(t);if(!q6.includes(n))return!1;let s=$e.basename(t,n);return e.has(s)||s==="index"&&e.has($e.basename($e.dirname(t)))}function Lke(e,t){let n=$e.basename(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?<![\\w.-])${n}(?![\\w.-])`).test(e)}function V6(e,t){for(let n=$e.dirname(t);;n=$e.dirname(n)){if(Rs.existsSync($e.join(n,"go.mod")))return n;if(n===e||$e.dirname(n)===n)return e}}function jke(e,t){let n=[];t.isolatedRun&&n.push({cwd:".",text:t.isolatedRun}),t.run&&n.push({cwd:t.run.cwd,text:t.run.argv.join(" ")}),t.ci?.list&&n.push({cwd:t.ci.list.cwd,text:t.ci.list.argv.join(" ")});for(let r of t.ci?.steps??[])n.push({cwd:".",text:r.line});for(let r of t.context??[])r.cleanup&&n.push({cwd:".",text:r.cleanup});let s=new Set;for(let{cwd:r,text:i}of n)for(let o of i.split(/[\s"'`;&|()<>=,]+/))o&&!/^[a-z][\w+.-]*:/i.test(o)&&s.add($e.resolve(e,r,o));return s}var Vke={".py":"python",".js":"node",".cjs":"node",".mjs":"node",".jsx":"node",".ts":"node",".cts":"node",".mts":"node",".tsx":"node",".go":"go",".rb":"ruby",".java":"jvm",".kt":"jvm",".kts":"jvm",".scala":"jvm",".groovy":"jvm"},Gke=[[/^(?:playwright|vitest|jest)\.config\.(?:[cm]?[jt]s|json)$/,"node"],[/^tsconfig\.json$/,"node"],[/^(?:pytest|tox)\.ini$/,"python"]];function zke(e){let t=$e.basename(e);if(["conftest.py","__init__.py"].includes(t))return"python";let n=Gke.find(([s])=>s.test(t));if(n)return n[1];if(mm(e))return/^(?:package\.json|package-lock\.json|npm-shrinkwrap\.json|yarn\.lock|pnpm-lock\.yaml|bun\.lockb?)$/.test(t)?"node":/^go\.(?:mod|sum)$/.test(t)?"go":/^Gemfile(?:\.lock)?$/.test(t)?"ruby":/^(?:pom\.xml|build\.gradle(?:\.kts)?)$/.test(t)?"jvm":"python"}function qke(e,t,n){let s=Vke[$e.extname(t)];if(s==="go"&&$e.extname(n)===".go"&&V6(e,n)===V6(e,t))return!0;let r=zke(n);if(!r||s&&s!==r)return!1;let i=$e.relative($e.dirname(n),t);return!i.startsWith("..")&&!$e.isAbsolute(i)}function J6(e,t,n){let s=new Map;if(!n.length)return s;let r=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]);for(let i of t.tests){if(i.change==="deleted")continue;let o=r(i.file);if(!es(o)||Xs(e,o.root,o.rel))continue;let a=$e.resolve(o.root),c=$e.resolve(a,o.rel),u=n.filter(y=>$e.resolve(y.source.path)===a);if(!u.length)continue;let l="";try{l=Rs.readFileSync(c,"utf-8")}catch{}let p=Uke(a,c,l),h=Fke(c,l),g=jke(a,i),m=u.filter(y=>{let v=$e.resolve(a,y.file);return p.has(v)||g.has(v)||Mke(h,v)||Lke(l,v)||qke(a,c,v)});m.length&&s.set(c,`needs ${m.map(y=>z6(e,y)).join(", ")}, which is not in the tests PR: ${G6}`)}return s}function Oa(e){return Array.isArray(e)?`[${e.map(Oa).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>`${JSON.stringify(t)}:${Oa(n)}`).join(",")}}`:JSON.stringify(e)??"undefined"}function Hke(e,t,n){let s=$e.basename(n);if(s!=="package.json"&&s!=="package-lock.json")return!1;let r=so().version;if(r==="unknown")return!1;let i,o;try{let a=$e.resolve(t,n);if(!Rs.lstatSync(a).isFile()||Rs.realpathSync(a)!==a)return!1;i=JSON.parse(Rs.readFileSync(a,"utf-8"));let c=e.executionSafetySources?.find(h=>$e.resolve(h.path)===$e.resolve(t));if(c){let h=Xw(t,c.head,n);h&&(o=JSON.parse(h.bytes.toString("utf-8")))}else if(Rs.existsSync($e.join(t,".git")))return!1;let u=h=>{let g=structuredClone(h);for(let m of["dependencies","devDependencies"])g[m]&&(delete g[m]["@skyramp/testbot-core"],Object.keys(g[m]).length||delete g[m]);return g};if(s==="package.json")return(i.devDependencies?.["@skyramp/testbot-core"]??i.dependencies?.["@skyramp/testbot-core"])!==r?!1:o?Oa(u(i))===Oa(u(o)):Object.keys(i).every(h=>["name","version","private","type","scripts","dependencies","devDependencies"].includes(h))&&(!i.scripts||Oa(i.scripts)===Oa({test:"node --test"}))&&Object.keys(i.dependencies??{}).every(h=>h==="@skyramp/testbot-core")&&Object.keys(i.devDependencies??{}).every(h=>h==="@skyramp/testbot-core");let l=i.packages?.["node_modules/@skyramp/testbot-core"];if(!l||l.version!==r||l.link||l.hasInstallScript||l.resolved!==`https://registry.npmjs.org/@skyramp/testbot-core/-/testbot-core-${r}.tgz`||!/^sha512-[A-Za-z0-9+/=]+$/.test(l.integrity??""))return!1;let p=h=>{let g=structuredClone(h);return g.packages&&(delete g.packages["node_modules/@skyramp/testbot-core"],g.packages[""]&&(g.packages[""]=u(g.packages[""]))),g};return o?Oa(p(i))===Oa(p(o)):Object.keys(i.packages??{}).every(h=>h===""||h==="node_modules/@skyramp/testbot-core")&&!i.packages?.[""]?.scripts}catch{return!1}}function Jke(e,t,n){try{return Rs.lstatSync($e.join(t,n)),!1}catch(r){if(r.code!=="ENOENT")return!1}let s=e.executionSafetySources?.find(r=>$e.resolve(r.path)===$e.resolve(t));return!s||!/^[a-f0-9]{40,64}$/.test(s.head)?!1:Xw(t,s.head,n)!==null}function Wke(e){try{return rI.lstatSync(e),!0}catch{return!1}}function sI(e,t=Am(e)){let n=new Set(t.omitted.map(({source:s,file:r})=>qt.resolve(s.path,r)));return new Map([...W6(e,t.assemblies)].map(([s,r])=>[s,r.filter(i=>!n.has(qt.resolve(s.path,i)))]))}function Am(e,t=Ae(e,"write.json")){if(!t||!En(e.inputs))return{assemblies:[],omitted:[],hasSharedTests:!1};let n=gm(e,t),s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=new Set(t.tests.map(a=>{let c=s(a.file);return qt.resolve(c.root,c.rel)})),i=[],o=n;for(;;){let a=o.length>0||eI(e,t,o).length>0;if(!a)return{assemblies:o,omitted:i,hasSharedTests:a};let c=W6(e,o),u=new Set([...c].flatMap(([g,m])=>m.map(y=>qt.resolve(g.path,y)))),{allowed:l}=tI(e,t,o,u),p=new Set(i.map(({source:g,file:m})=>qt.resolve(g.path,m))),h=nI(e,c,l,o).filter(({source:g,file:m})=>{let y=qt.resolve(g.path,m);return!p.has(y)&&!r.has(y)});if(!h.length)return{assemblies:o,omitted:i,hasSharedTests:a};i.push(...h),o=L6(e,t,n,J6(e,t,i))}}function W6(e,t){let n=new Set(t.filter(({record:v})=>!v.entry).map(({source:v,record:E})=>qt.join(v.path,E.file))),s=Ae(e,"adapt.json"),r=Ae(e,"finalize.json"),i=Ae(e,um),o=new Map,a=v=>{let E=uo(e.inputs,v);if("error"in E)return;let b=o.get(E.source.path)??{source:E.source,paths:new Set};return o.set(E.source.path,b),{repo:b.source.path,paths:b.paths}},c=(v,E)=>qt.relative(v,qt.resolve(v,E.trim())).replace(/\/+$/,""),u=(v,E)=>{let b=E?.trim()&&a(v);if(!b)return;let I=c(b.repo,E);b.paths.add(I);for(let C of["__init__.py","conftest.py"]){let w=qt.join(qt.dirname(I),C);rI.existsSync(qt.join(b.repo,w))&&(!n.has(qt.join(b.repo,I))||!Xs(e,b.repo,w))&&b.paths.add(w)}},l=(v,E)=>{if(typeof E!="string"||!E.trim())return;let b=a(v);if(!b)return;let I=c(b.repo,E);if(tp(qt.join(b.repo,I)))return b.paths.add(I),{...b,rel:I}},p=cN(e),h=(s?.items??[]).filter(v=>v.action==="place"&&p.has(v.from??v.file??"")),g=(v,E)=>h.some(b=>b.repository===v&&b.file&&qt.normalize(b.file)===E),m=(s?.items??[]).filter(v=>!h.includes(v));for(let v of[...m,...i?.tests??[],...i?.maintained??[]])u(v.repository,v.file);for(let v of r?.dependencies?.added??[]){let E=l(v.repository,v.manifest);if(E)for(let b of pD(E.repo,Cw(E.repo,E.rel)))E.paths.add(b)}for(let v of r?.lint??[])for(let E of v.fixed??[])l(v.repository,E);for(let v of r?.support??[])l(v.repository,v.file);let y=Ae(e,Rw)?.packages??[];for(let v of new Set(y.map(E=>E.repository))){let E=a(v),b=y.filter(I=>I.repository===v).map(I=>I.dir);if(E)for(let{path:I}of nm(E.repo)){let C=c(E.repo,I),w=qt.join(E.repo,C);Hg(C,b)&&!yD(C)&&!g(v,C)&&(!Wke(w)||tp(w))&&E.paths.add(C)}}for(let{record:v,source:E,problems:b}of t){let I=o.get(E.path)?.paths;I?.has(v.file)&&(I.delete(v.file),!b.length&&(v.entry&&I.add(v.entry),I.add(v.sourceAsset)))}return new Map([...o.values()].map(({source:v,paths:E})=>[v,[...E].filter(b=>b&&b!==".."&&!b.startsWith(`..${qt.sep}`)&&!lo(b))]))}var rZe=5*6e4,sZe=12*6e4,iZe=2*6e4;var dZe=["class TestbotProjectBrowsers {"," onBegin(config) {",' const projects = config.projects.map((p) => ({ browserName: p.use.browserName ?? p.use.defaultBrowserType ?? "chromium", channel: p.use.channel ?? null }));',' process.stdout.write("TESTBOT_PROJECT_BROWSERS " + JSON.stringify(projects) + "\\n");'," }"," printsToStdio() { return true; }","}","module.exports = TestbotProjectBrowsers;",""].join(`
301
301
  `);var Tr=G(require("fs")),Co=G(require("path"));var Ua=G(require("fs")),iI=G(require("path"));var Xke="change-inputs",eRe=(e,t)=>`${t}-${e.replace(/[^\w.-]+/g,n=>n==="/"?"__":"-")}.md`;function tRe(e){return[...(e.pullRequests??[]).map(t=>({label:`${t.repository}#${t.number}`,body:t.body?.trim()??""})),...(e.relatedRepos??[]).map(t=>({label:t.slug,body:t.prDescription?.trim()??""}))].map((t,n)=>({...t,file:eRe(t.label,n)})).filter(t=>t.body.length>fq)}function Y6(e,t,n){let s=iI.join(t,Xke);Ua.rmSync(s,{recursive:!0,force:!0}),Ua.mkdirSync(s,{recursive:!0}),Ua.writeFileSync(iI.join(s,ru),n,{mode:292});for(let r of tRe(e))Ua.writeFileSync(iI.join(s,r.file),`${r.body}
302
302
  `,{mode:292})}var nRe=[/^\.github\//,/^\.gitlab(-ci)?/,/^\.circleci\//,/(^|\/)Jenkinsfile$/,/^docs?\//,/\.(md|mdx|rst)$/i,/(^|\/)LICENSE([._-].*)?$/i,/(^|\/)CODEOWNERS$/,/(^|\/)\.gitignore$/,/(^|\/)\.gitattributes$/,/(^|\/)\.editorconfig$/,/(^|\/)\.prettierrc[^/]*$/,/(^|\/)\.eslintrc[^/]*$/,/(^|\/)eslint\.config\.[^/]+$/,/(^|\/)package-lock\.json$/,/(^|\/)yarn\.lock$/,/(^|\/)pnpm-lock\.yaml$/,/(^|\/)poetry\.lock$/,/(^|\/)Pipfile\.lock$/,/(^|\/)Cargo\.lock$/,/(^|\/)go\.sum$/,/(^|\/)composer\.lock$/,/(^|\/)Gemfile\.lock$/,/\.(png|jpe?g|gif|svg|ico|webp)$/i];function Z6(e){return nRe.some(t=>t.test(e))}function rRe(e){let t=[],n=e.inputs.repositoryPath;return!n||!Tr.existsSync(n)?t.push(`repository path does not exist: ${n}`):JR(n)?td(n,e.inputs.baseBranch)||t.push(e.inputs.baseBranch?`base branch "${e.inputs.baseBranch}" does not resolve`:"could not auto-detect a base branch (origin/HEAD, main, master)"):t.push(`not a git repository: ${n}`),{ok:t.length===0,reasons:t}}function sRe(e){return(e.inputs.relatedRepos??[]).map(t=>{let n=Tr.existsSync(t.path)?IE(t.path,t.base):void 0;return n?{repository:t.slug,changedFiles:n.changedFiles}:{repository:t.slug,changedFiles:[],note:`could not read the change in ${t.path}`}})}function iRe(e){Tr.rmSync(Co.join(e.runDir,EB),{recursive:!0,force:!0});for(let t of e.inputs.relatedRepos??[]){let n=Tr.existsSync(t.path)?WR(t.path,t.base):void 0;if(!n)continue;let s=Co.join(e.runDir,vB(t.slug));Tr.mkdirSync(Co.dirname(s),{recursive:!0}),Tr.writeFileSync(s,n.diffContent)}}function oRe(e){let{repositoryPath:t,baseBranch:n}=e.inputs;Tr.rmSync(Co.join(t,jD),{recursive:!0,force:!0});let s=IE(t,n);if(!s)throw new Error(`could not compute git facts for ${t}`);let r=WR(t,n);if(!r)throw new Error(`could not compute the PR diff for ${t}`);let i=sRe(e),o=[s.changedFiles,...i.map(p=>p.changedFiles)].flat(),a=o.map(p=>p.path).filter(Z6),c=!cd(e)&&o.length>0&&a.length===o.length,u={schemaVersion:1,repository:{path:t,currentBranch:s.currentBranch,baseBranch:s.baseBranch},changedFiles:s.changedFiles,...i.length?{relatedChanges:i}:{},newFiles:r.newFiles,deletedFiles:r.deletedFiles,diffStat:r.diffStat,diffBytes:r.diffContent.length,nonApplicationFiles:a,nonApplicationOnly:c,sutRequired:!c};Tr.writeFileSync(Co.join(e.runDir,ru),r.diffContent),Y6(e.inputs,e.runDir,r.diffContent),iRe(e);let l=Co.join(e.runDir,yB);return Tr.mkdirSync(Co.dirname(l),{recursive:!0}),Tr.writeFileSync(l,JSON.stringify(u,null,2)+`
303
- `),e.prepared={preflight:u},{preflight:yB,diff:ru}}var pKe={name:"preflight",timeoutMinutes:1,requires:[],validateInput:rRe,execute:oRe};var ym=G(require("path"));function cRe(e){return jn(ND,e).errors}function uRe(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=cRe(n);return r.length>0?{errors:r}:{finalize:n,errors:[]}}var lRe="finalize-scratch";function dRe(e,t){let n=uRe(e.stdout,t?.secretValues);if(!n.finalize||!t?.outputsDir)return n;let s=(r,i)=>r.trim()&&iE(r.trim(),ym.join(t.outputsDir,lRe,i),"finalize")||r;return{...n,finalize:{...n.finalize,lint:n.finalize.lint.map((r,i)=>({...r,command:s(r.command??"",`lint-${i+1}.sh`)}))}}}var x6e=wr("finalize-schema",(e,t)=>dRe(t,e));function pN(e){return e.functions?.length?e.functions:[(e.testType==="unit"?e.testId.split("::").slice(1).join("::").replace(/\[.*\]$/,""):"")||e.testId]}function mp(e){return new Set(e.flatMap(t=>pN(t).map(n=>`${t.repository??""}\0${t.fileName}\0${n}`))).size}function pRe(e){return jn(DD,e).errors}function K6(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=pRe(n);return r.length>0?{errors:r}:{analysis:n,errors:[]}}function fRe(e,t=[]){return K6(e.stdout,t)}var Y6e=wr("analysis-schema",(e,t)=>fRe(t,e.secretValues));var q3e=Xy.rows.notRun(!0);var Em="kept, not ";var vm="(declined the planned ";function fN(e){if(!e)return[];let t=[],n=0,s=0;for(let r=0;r<e.length;r++){let i=e[r];i==="("?n++:i===")"?n=Math.max(0,n-1):n===0&&i===";"&&e[r+1]===" "&&e[r-1]===")"&&(t.push(e.slice(s,r)),s=r+2)}return t.push(e.slice(s)),t.map(r=>{let i=r.trim();if(!i.endsWith(")"))return{expectation:i};let o=0;for(let a=i.length-1;a>=0;a--)if(i[a]===")")o++;else if(i[a]==="("&&--o===0){let c=i.slice(0,a).trim(),u=i.slice(a+1,-1).trim();return c&&u?{expectation:c,expected:u}:{expectation:i}}return{expectation:i}})}var hN=new Set(["update","regenerate","delete"]);var H3e={update:"updated",regenerate:"regenerated",delete:"deleted",verify:"verified",none:"touched"};var X6=d.string().trim().min(1),gN=d.object({schemaVersion:d.literal(1).optional(),businessCaseAnalysis:X6.describe("1-2 sentences: what this change means for a user, and whether the evidence shows it working; no count of tests, which the report gives"),issuesFound:d.array(d.object({description:X6,severity:d.string().optional().describe("critical | high | medium | low"),category:d.string().optional().describe("bug | lint | type | config"),sourceFile:d.string().optional(),sourceLine:d.number().optional(),findingId:d.string().optional(),requirementIds:d.array(d.string()).optional()})).describe("every real problem this run exposed \u2014 cause, file:line, severity"),nextSteps:d.array(d.string()).describe("concrete follow-ups the author can act on; required non-empty when a disclosure is BLOCKING")});function vRe(e){return jn(gN,e).errors}function bRe(e,t=[]){let{value:n,error:s}=Wt(e.stdout,t);if(s)return{errors:[s]};let r=vRe(n);return r.length>0?{errors:r}:{prose:n,errors:[]}}var s8e=wr("report-schema",(e,t)=>bRe(t,e.secretValues));var CRe="report.json",SRe="report-display.json",g8e={en:"English",ja:"Japanese"};function t9(e){let t=mN.join(e,SRe);if(Fa.existsSync(t))try{return JSON.parse(Fa.readFileSync(t,"utf-8"))}catch{}let n=mN.join(e,CRe);return Fa.existsSync(n)?JSON.parse(Fa.readFileSync(n,"utf-8")):void 0}var n9="testbot.deliverFrom";var kRe=/^Testbot: merge (?:PR #(\d+)|branch (.+))$/;function r9(e,t,n){return e(["log","--merges","--first-parent","--reverse","--format=%H%x09%s",`${t}..${n}`]).split(`
304
- `).filter(Boolean).flatMap(s=>{let[r,i]=s.split(" "),o=kRe.exec(i??"");if(!o)return[];let a=new Set(e(["diff","--name-only","-z",`${r}^1`,r]).split("\0").filter(Boolean));return[{...o[1]?{pullRequest:o[1]}:{branch:o[2]},files:a}]})}var x9=require("node:zlib");var w8e=["clean","recipe-drift"];var _n=G(require("node:fs")),Pt=G(require("node:path")),aI=require("node:crypto");function RRe(e,t,n=so().version){if(!En(e.inputs))return[];let s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=gm(e,t,n),i=new Map(r.map(o=>[Pt.resolve(o.source.path,o.record.file),o.problems]));return t.tests.flatMap(o=>{let a=s(o.file),c=i.get(Pt.resolve(a.root,a.rel));if(c)return c;if(o.change!=="added")return[];if(!gp(e,o))return[];let l=m=>[`${o.file}: shared-environment delivery is blocked: ${m}`];if(!es(a))return l("test file is outside its checkout");let p=fp(a.root,Pt.join(a.root,a.rel));if(typeof p=="string")return l(`${p} (restrictedDeliveryProblems)`);let h=wo(p.toString("utf-8"));if(!h)return l("use the exact supported delivered harness; preserve unsupported assertions in an inactive source asset, never unrestricted executable code");if("restriction"in h){if(!h.sourceAsset.path.endsWith(".source"))return l("restricted source asset must use an inactive .source extension");let m=Pt.resolve(Pt.dirname(Pt.join(a.root,a.rel)),h.sourceAsset.path),y=Pt.relative(a.root,m);if(!y||y.startsWith("..")||Pt.isAbsolute(y))return l("restricted source asset must remain inside its checkout");try{if(!_n.lstatSync(m).isFile()||_n.realpathSync(m)!==m||(0,aI.createHash)("sha256").update(_n.readFileSync(m)).digest("hex")!==h.sourceAsset.sha256)return l("restricted source asset is missing, changed or a symlink")}catch{return l("restricted source asset is unavailable")}if(!(t.supportFiles??[]).some(v=>{let E=s(v);return Pt.join(E.root,E.rel)===m}))return l("restricted source asset must be delivered in supportFiles")}else{let m=e.inputs.sharedEnvironment;if(h.definition.environmentId!==m?.environmentId||h.definition.environmentAddress!==m?.environmentAddress)return l("harness identity/address differs from the selected Test Environment");if((m.offLimits??[]).some(y=>!h.definition.offLimits.includes(y)))return l("harness omits a configured off-limits route")}if(n==="unknown")return e.inputs.deliver?l("guarded CI delivery is unavailable from an unreleased engine build"):[];let g=Pt.dirname(Pt.join(a.root,a.rel));for(;g.startsWith(a.root);){let m=Pt.join(g,"package.json");if(_n.existsSync(m))try{let y=JSON.parse(_n.readFileSync(m,"utf-8"));return(y.devDependencies?.["@skyramp/testbot-core"]??y.dependencies?.["@skyramp/testbot-core"])===n?[]:l("declare the exact released engine version containing this harness; an unavailable or older runtime cannot protect direct invocation")}catch{return l("test package manifest is unreadable")}if(g===a.root)break;g=Pt.dirname(g)}return l("the delivered test has no package manifest declaring its guarded runtime")})}function yN(e,t){if(!En(e.inputs))return[];let n=Ae(e,"write.json");if(!n)return["shared-environment delivery requires its generated-test record"];let s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=t??Am(e,n),{assemblies:i}=r;if(!r.hasSharedTests)return n.tests.flatMap(l=>{if(l.change!=="deleted")return[];let p=s(l.file);return es(p)&&_n.existsSync(Pt.join(p.root,p.rel))?[`${l.file}: a deleted test must actually be absent`]:[]});let o=eI(e,n,i).filter(l=>{let p=s(l.file);return l.change!=="deleted"&&!Xs(e,p.root,p.rel)}).map(l=>({...l,change:"added"})),a=sI(e,r),c=new Set([...a].flatMap(([l,p])=>p.map(h=>Pt.resolve(l.path,h)))),u=tI(e,n,i,c);return[...i.flatMap(l=>l.problems),...RRe(e,{...n,tests:o}),...u.problems,...nI(e,a,u.allowed,i).map(({file:l})=>`${l}: shared-environment delivery refuses an unverified executable/support/manifest path`)]}function s9(e,t,n=[]){if(!En(e.inputs))return[];let s=[],r=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]);for(let i of t.tests){if(i.change==="deleted")continue;let o=r(i.file),a=Pt.join(o.root,o.rel);if(Xs(e,o.root,o.rel)||!es(o)||lN(o.root,a))continue;let c=`reading ${o.rel}`;try{let u=wo(_n.readFileSync(a,"utf-8"));if(!u)continue;if("restriction"in u){let p=Pt.resolve(Pt.dirname(a),u.sourceAsset.path),h=Pt.relative(o.root,p);if(c=`reading ${h}`,!h||h.startsWith("..")||Pt.isAbsolute(h)||!_n.lstatSync(p).isFile()||_n.realpathSync(p)!==p){s.push(`${i.file}: restricted source asset is not a regular file in its checkout`);continue}let g=_n.readFileSync(p);if((0,aI.createHash)("sha256").update(g).digest("hex")!==u.sourceAsset.sha256){s.push(`${i.file}: restricted source asset changed before trusted formatting; not refreshing its hash`);continue}let m=Tu(g.toString("utf-8"),n).content,y=pp(o.root,h,Buffer.from(m));c=`writing ${h}`,_n.writeFileSync(p,y),u.sourceAsset.sha256=(0,aI.createHash)("sha256").update(y).digest("hex")}let l=Tu(sm(u),n).content;c=`writing ${o.rel}`,_n.writeFileSync(a,pp(o.root,o.rel,Buffer.from(l)))}catch(u){s.push(`${i.file}: could not assemble its guarded entry after trusted formatting (prepareSharedDeliveryFiles): ${c} failed: ${hp(u,o.root)}`)}}return s}var bn=G(require("fs")),ei=G(require("path")),b9=G(require("crypto")),w9=require("child_process");var Cm=require("crypto");var EN="<!-- skyramp-testbot -->",vN=hN,xRe=new Set(["lint","type","config"]),i9={critical:0,high:1,medium:2,low:3},f9=new Set(["Pass","Fail"]);var bN=e=>ta(ne().statusLabels,e),uI=e=>ta(ne().testTypeCellLabels,e);function dt(e){return(e??"").replace(/\|/g,"\\|").replace(/\r?\n/g,"<br>").trim()}function o9(e){return e.inferred?" (inferred)":""}function a9(e,t){return!e||!f9.has(e)?"\u2014":t?`${bN(e)} (${dt(h9(t))})`:bN(e)}function h9(e){let t=s=>{let r=s.indexOf(": ");return r<0?s:ta(ne().staged.maintenanceActions,s.slice(0,r))+s.slice(r)};if(e.startsWith(Em))return ne().staged.keptNot+t(e.slice(Em.length));let n=e.indexOf(vm);return n<0?e:e.slice(0,n)+ne().staged.declinedPlanned+t(e.slice(n+vm.length))}function c9(e){return e.category!==void 0&&xRe.has(e.category.toLowerCase())}function u9(e,t){return(i9[(e.severity??"").toLowerCase()]??4)-(i9[(t.severity??"").toLowerCase()]??4)}var lI=e=>e?.length?` (${e.join(", ")})`:"";function l9(e){return`- ${e.severity?`**[${ta(ne().severityLabels,e.severity.toLowerCase()).toUpperCase()}]** `:""}${e.description.trim()}${lI(e.pullRequests)}`}function $Re(e){let t=e.resultId?.split("#").slice(1).join("#");if(e.testType!=="unit"||!t)return;let n=t;try{n=decodeURIComponent(t)}catch{}let s=/^(.*?)(\[.*\])$/.exec(n);return s?{fn:s[1],kase:s[2]}:{fn:n}}var g9=(e,t)=>e!==void 0&&t!==void 0&&e.replace(/^\.\//,"")===t.replace(/^\.\//,"");function m9(e,t){return(e.testVideos??[]).find(n=>n.url&&t(n))?.url}function wN(e,t){return m9(e,n=>g9(n.fileName,t.fileName)&&(!n.repository||!t.repository||n.repository.toLowerCase()===t.repository.toLowerCase()))}function IN(e,t){return m9(e,n=>g9(n.writtenAs??n.fileName,t))}function TRe(e,t,n){return n?wN(e,{fileName:t,repository:n}):IN(e,t)}function QRe(e){let t=[],n=new Map;for(let o of e.newTestsCreated)o.testType==="unit"&&n.set(o.fileName,[...n.get(o.fileName)??[],o.testId.split("::").slice(1).join("::")]);let s=new Map,r=(o,a)=>(n.get(o??"")??[]).find(c=>c!==a&&qZ(a,c)),i=new Map;for(let o of e.testResults){let a=$Re(o),c=a&&!a.kase?r(o.fileName,a.fn):void 0;if(a&&c&&(a={fn:c,kase:`"${a.fn}"`}),a?.kase&&s.set(o,a.kase),!a){t.push({testId:o.testId,testType:o.testType,endpoint:o.endpoint,status:o.status,details:o.details??"",...o.fileName?{fileName:o.fileName}:{},...o.repository?{repository:o.repository}:{}});continue}let u=`${o.fileName??""}#${a.fn}`,l=i.get(u);l||(l={row:{testId:o.testId,testType:o.testType,endpoint:o.endpoint,status:o.status,details:"",test:a.fn,...o.fileName?{fileName:o.fileName}:{},...o.repository?{repository:o.repository}:{}},cases:[]},i.set(u,l),t.push(l.row)),l.cases.push(o)}for(let{row:o,cases:a}of i.values()){let c=a.filter(h=>h.status==="Fail"),u=a.filter(h=>h.status==="Pass").length,l=a.filter(h=>h.status==="Skipped").length;o.cases=a.length,o.status=c.length?"Fail":l?"Skipped":"Pass";let p=c[0];o.details=a.length===1?a[0].details??"":ne().staged.casesPassed(u,a.length,l)+(p?`; ${s.get(p)??""} ${p.details??""}`.replace(/; +/,"; ").trimEnd():"")}return t}function _Re(e){return fN(e).map(t=>t.expected===void 0?t.expectation:`${t.expectation}: ${Zt(t.expected)}`)}function Im(e){return e.newTestsCreated.some(t=>t.testType!=="unit")&&e.testResults.every(t=>t.status==="Skipped")&&e.testResults.some(t=>t.failureCause?.kind==="environment"&&(t.failureCause.family==="app_not_started"||t.failureCause.family==="secret"))}function A9(e){let t=e.pullRequests??[];return t.length<2?[]:[ne().staged.validatedTogether(t.map(n=>`${Zt(`${n.repository}#${n.number}`)}${n.title?` ${Bs(n.title,120)}`:""}`).join("; "))]}function y9(e,t=1/0){let n=Array.from(e.name.replace(/\s+/g," ").trim()).slice(0,t).join("").replace(/[<>[\]()*_`\\|#]/g,"\\$&").replace(/@/g,"@\u200D");return e.kind==="person"?ne().staged.requestedByPerson(n):ne().staged.requestedByPolicy(n)}function E9(e,t={}){if(t.audience==="testbot-pr")return LRe(e,t);let{audience:n,collapsed:s=!1,existingEvidence:r=[],requestedBy:i,sourcePullRequest:o}=t,a=n!=="comment",c=(e.requirements??[]).filter(w=>/^file-[a-f0-9]{16}-/i.test(w.id)).sort((w,x)=>x.id.length-w.id.length),u=w=>{let x=c.find(S=>w.toLowerCase().startsWith(S.id.toLowerCase()));return x?x.label+w.slice(x.id.length):w},l=[EN];o&&l.push(ne().staged.testsSourcePullRequest(Zt(o)),"");for(let w of A9(e))l.push(w,"");i&&l.push(y9(i),""),e.notTranslated&&l.push(ta(ne().staged.notTranslated,e.notTranslated),"");let p=w=>{s?l.push("<details>",`<summary>${w}</summary>`,""):l.push(`### ${w}`)},h=()=>{s&&l.push("","</details>"),l.push("")};for(let w of e.businessCaseAnalysis.trim().split(/\r?\n/))l.push(`> ${w}`);if(l.push(""),Im(e)&&l.push(ne().staged.noLiveApp(mp(e.newTestsCreated)),""),a&&e.newTestsCreated.length){let w=new Map;for(let S of e.newTestsCreated){if(S.testType!=="unit")continue;let Y=pN(S)[0],ue=w.get(S.fileName)??{functions:new Set,endpoints:[],descriptions:new Map};S.endpoint&&!ue.endpoints.includes(S.endpoint)&&ue.endpoints.push(S.endpoint);let J=S.description?.trim()??"",be=ue.descriptions.get(Y)??[];be.includes(J)||be.push(J),ue.functions.add(Y),ue.descriptions.set(Y,be),w.set(S.fileName,ue)}let x=e.newTestsCreated.filter(S=>S.testType!=="unit");p(ne().testRecommendationsImplementedHeader(mp(e.newTestsCreated),x.length+mp(e.newTestsCreated.filter(S=>S.testType==="unit"))));for(let[S,{functions:Y,endpoints:ue,descriptions:J}]of w){let be=Y.size;l.push(ne().staged.unitTestsInFile(`\`${S}\``,be,ue.map(ke=>`\`${ke}\``).join(", ")),"");let Me=new Map;for(let[ke,X]of J){let z=X.join("\0"),Je=Me.get(z)??{fns:[],descriptions:X};Je.fns.push(ke),Me.set(z,Je)}let Ge=0;for(let{fns:ke,descriptions:X}of Me.values()){l.push(`${++Ge}. ${ke.map(Je=>`\`${Je}\``).join(", ")}`);let z=[...new Set(X.flatMap(Je=>_Re(Je)))];for(let Je of z)l.push(` - ${Je}`)}l.push("")}for(let S of x){let Y=S.testId?Zt(u(S.testId)):uI(S.testType),ue=S.fileName?` (\`${S.fileName}\`)`:"",J=S.endpoint?`
303
+ `),e.prepared={preflight:u},{preflight:yB,diff:ru}}var fKe={name:"preflight",timeoutMinutes:1,requires:[],validateInput:rRe,execute:oRe};var ym=G(require("path"));function cRe(e){return jn(ND,e).errors}function uRe(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=cRe(n);return r.length>0?{errors:r}:{finalize:n,errors:[]}}var lRe="finalize-scratch";function dRe(e,t){let n=uRe(e.stdout,t?.secretValues);if(!n.finalize||!t?.outputsDir)return n;let s=(r,i)=>r.trim()&&iE(r.trim(),ym.join(t.outputsDir,lRe,i),"finalize")||r;return{...n,finalize:{...n.finalize,lint:n.finalize.lint.map((r,i)=>({...r,command:s(r.command??"",`lint-${i+1}.sh`)}))}}}var $6e=wr("finalize-schema",(e,t)=>dRe(t,e));function pN(e){return e.functions?.length?e.functions:[(e.testType==="unit"?e.testId.split("::").slice(1).join("::").replace(/\[.*\]$/,""):"")||e.testId]}function mp(e){return new Set(e.flatMap(t=>pN(t).map(n=>`${t.repository??""}\0${t.fileName}\0${n}`))).size}function pRe(e){return jn(DD,e).errors}function K6(e,t=[]){let{value:n,error:s}=Wt(e,t);if(s)return{errors:[s]};let r=pRe(n);return r.length>0?{errors:r}:{analysis:n,errors:[]}}function fRe(e,t=[]){return K6(e.stdout,t)}var Z6e=wr("analysis-schema",(e,t)=>fRe(t,e.secretValues));var H3e=Xy.rows.notRun(!0);var Em="kept, not ";var vm="(declined the planned ";function fN(e){if(!e)return[];let t=[],n=0,s=0;for(let r=0;r<e.length;r++){let i=e[r];i==="("?n++:i===")"?n=Math.max(0,n-1):n===0&&i===";"&&e[r+1]===" "&&e[r-1]===")"&&(t.push(e.slice(s,r)),s=r+2)}return t.push(e.slice(s)),t.map(r=>{let i=r.trim();if(!i.endsWith(")"))return{expectation:i};let o=0;for(let a=i.length-1;a>=0;a--)if(i[a]===")")o++;else if(i[a]==="("&&--o===0){let c=i.slice(0,a).trim(),u=i.slice(a+1,-1).trim();return c&&u?{expectation:c,expected:u}:{expectation:i}}return{expectation:i}})}var hN=new Set(["update","regenerate","delete"]);var J3e={update:"updated",regenerate:"regenerated",delete:"deleted",verify:"verified",none:"touched"};var X6=d.string().trim().min(1),gN=d.object({schemaVersion:d.literal(1).optional(),businessCaseAnalysis:X6.describe("1-2 sentences: what this change means for a user, and whether the evidence shows it working; no count of tests, which the report gives"),issuesFound:d.array(d.object({description:X6,severity:d.string().optional().describe("critical | high | medium | low"),category:d.string().optional().describe("bug | lint | type | config"),sourceFile:d.string().optional(),sourceLine:d.number().optional(),findingId:d.string().optional(),requirementIds:d.array(d.string()).optional()})).describe("every real problem this run exposed \u2014 cause, file:line, severity"),nextSteps:d.array(d.string()).describe("concrete follow-ups the author can act on; required non-empty when a disclosure is BLOCKING")});function vRe(e){return jn(gN,e).errors}function bRe(e,t=[]){let{value:n,error:s}=Wt(e.stdout,t);if(s)return{errors:[s]};let r=vRe(n);return r.length>0?{errors:r}:{prose:n,errors:[]}}var i8e=wr("report-schema",(e,t)=>bRe(t,e.secretValues));var CRe="report.json",SRe="report-display.json",m8e={en:"English",ja:"Japanese"};function t9(e){let t=mN.join(e,SRe);if(Fa.existsSync(t))try{return JSON.parse(Fa.readFileSync(t,"utf-8"))}catch{}let n=mN.join(e,CRe);return Fa.existsSync(n)?JSON.parse(Fa.readFileSync(n,"utf-8")):void 0}var n9="testbot.deliverFrom";var kRe=/^Testbot: merge (?:PR #(\d+)|branch (.+))$/;function r9(e,t,n){return e(["log","--merges","--first-parent","--reverse","--format=%H%x09%s",`${t}..${n}`]).split(`
304
+ `).filter(Boolean).flatMap(s=>{let[r,i]=s.split(" "),o=kRe.exec(i??"");if(!o)return[];let a=new Set(e(["diff","--name-only","-z",`${r}^1`,r]).split("\0").filter(Boolean));return[{...o[1]?{pullRequest:o[1]}:{branch:o[2]},files:a}]})}var x9=require("node:zlib");var I8e=["clean","recipe-drift"];var _n=G(require("node:fs")),Pt=G(require("node:path")),aI=require("node:crypto");function RRe(e,t,n=so().version){if(!En(e.inputs))return[];let s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=gm(e,t,n),i=new Map(r.map(o=>[Pt.resolve(o.source.path,o.record.file),o.problems]));return t.tests.flatMap(o=>{let a=s(o.file),c=i.get(Pt.resolve(a.root,a.rel));if(c)return c;if(o.change!=="added")return[];if(!gp(e,o))return[];let l=m=>[`${o.file}: shared-environment delivery is blocked: ${m}`];if(!es(a))return l("test file is outside its checkout");let p=fp(a.root,Pt.join(a.root,a.rel));if(typeof p=="string")return l(`${p} (restrictedDeliveryProblems)`);let h=wo(p.toString("utf-8"));if(!h)return l("use the exact supported delivered harness; preserve unsupported assertions in an inactive source asset, never unrestricted executable code");if("restriction"in h){if(!h.sourceAsset.path.endsWith(".source"))return l("restricted source asset must use an inactive .source extension");let m=Pt.resolve(Pt.dirname(Pt.join(a.root,a.rel)),h.sourceAsset.path),y=Pt.relative(a.root,m);if(!y||y.startsWith("..")||Pt.isAbsolute(y))return l("restricted source asset must remain inside its checkout");try{if(!_n.lstatSync(m).isFile()||_n.realpathSync(m)!==m||(0,aI.createHash)("sha256").update(_n.readFileSync(m)).digest("hex")!==h.sourceAsset.sha256)return l("restricted source asset is missing, changed or a symlink")}catch{return l("restricted source asset is unavailable")}if(!(t.supportFiles??[]).some(v=>{let E=s(v);return Pt.join(E.root,E.rel)===m}))return l("restricted source asset must be delivered in supportFiles")}else{let m=e.inputs.sharedEnvironment;if(h.definition.environmentId!==m?.environmentId||h.definition.environmentAddress!==m?.environmentAddress)return l("harness identity/address differs from the selected Test Environment");if((m.offLimits??[]).some(y=>!h.definition.offLimits.includes(y)))return l("harness omits a configured off-limits route")}if(n==="unknown")return e.inputs.deliver?l("guarded CI delivery is unavailable from an unreleased engine build"):[];let g=Pt.dirname(Pt.join(a.root,a.rel));for(;g.startsWith(a.root);){let m=Pt.join(g,"package.json");if(_n.existsSync(m))try{let y=JSON.parse(_n.readFileSync(m,"utf-8"));return(y.devDependencies?.["@skyramp/testbot-core"]??y.dependencies?.["@skyramp/testbot-core"])===n?[]:l("declare the exact released engine version containing this harness; an unavailable or older runtime cannot protect direct invocation")}catch{return l("test package manifest is unreadable")}if(g===a.root)break;g=Pt.dirname(g)}return l("the delivered test has no package manifest declaring its guarded runtime")})}function yN(e,t){if(!En(e.inputs))return[];let n=Ae(e,"write.json");if(!n)return["shared-environment delivery requires its generated-test record"];let s=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]),r=t??Am(e,n),{assemblies:i}=r;if(!r.hasSharedTests)return n.tests.flatMap(l=>{if(l.change!=="deleted")return[];let p=s(l.file);return es(p)&&_n.existsSync(Pt.join(p.root,p.rel))?[`${l.file}: a deleted test must actually be absent`]:[]});let o=eI(e,n,i).filter(l=>{let p=s(l.file);return l.change!=="deleted"&&!Xs(e,p.root,p.rel)}).map(l=>({...l,change:"added"})),a=sI(e,r),c=new Set([...a].flatMap(([l,p])=>p.map(h=>Pt.resolve(l.path,h)))),u=tI(e,n,i,c);return[...i.flatMap(l=>l.problems),...RRe(e,{...n,tests:o}),...u.problems,...nI(e,a,u.allowed,i).map(({file:l})=>`${l}: shared-environment delivery refuses an unverified executable/support/manifest path`)]}function s9(e,t,n=[]){if(!En(e.inputs))return[];let s=[],r=vn(e.inputs.repositoryPath,e.inputs.relatedRepos??[]);for(let i of t.tests){if(i.change==="deleted")continue;let o=r(i.file),a=Pt.join(o.root,o.rel);if(Xs(e,o.root,o.rel)||!es(o)||lN(o.root,a))continue;let c=`reading ${o.rel}`;try{let u=wo(_n.readFileSync(a,"utf-8"));if(!u)continue;if("restriction"in u){let p=Pt.resolve(Pt.dirname(a),u.sourceAsset.path),h=Pt.relative(o.root,p);if(c=`reading ${h}`,!h||h.startsWith("..")||Pt.isAbsolute(h)||!_n.lstatSync(p).isFile()||_n.realpathSync(p)!==p){s.push(`${i.file}: restricted source asset is not a regular file in its checkout`);continue}let g=_n.readFileSync(p);if((0,aI.createHash)("sha256").update(g).digest("hex")!==u.sourceAsset.sha256){s.push(`${i.file}: restricted source asset changed before trusted formatting; not refreshing its hash`);continue}let m=Tu(g.toString("utf-8"),n).content,y=pp(o.root,h,Buffer.from(m));c=`writing ${h}`,_n.writeFileSync(p,y),u.sourceAsset.sha256=(0,aI.createHash)("sha256").update(y).digest("hex")}let l=Tu(sm(u),n).content;c=`writing ${o.rel}`,_n.writeFileSync(a,pp(o.root,o.rel,Buffer.from(l)))}catch(u){s.push(`${i.file}: could not assemble its guarded entry after trusted formatting (prepareSharedDeliveryFiles): ${c} failed: ${hp(u,o.root)}`)}}return s}var bn=G(require("fs")),ei=G(require("path")),b9=G(require("crypto")),w9=require("child_process");var Cm=require("crypto");var EN="<!-- skyramp-testbot -->",vN=hN,xRe=new Set(["lint","type","config"]),i9={critical:0,high:1,medium:2,low:3},f9=new Set(["Pass","Fail"]);var bN=e=>ta(ne().statusLabels,e),uI=e=>ta(ne().testTypeCellLabels,e);function dt(e){return(e??"").replace(/\|/g,"\\|").replace(/\r?\n/g,"<br>").trim()}function o9(e){return e.inferred?" (inferred)":""}function a9(e,t){return!e||!f9.has(e)?"\u2014":t?`${bN(e)} (${dt(h9(t))})`:bN(e)}function h9(e){let t=s=>{let r=s.indexOf(": ");return r<0?s:ta(ne().staged.maintenanceActions,s.slice(0,r))+s.slice(r)};if(e.startsWith(Em))return ne().staged.keptNot+t(e.slice(Em.length));let n=e.indexOf(vm);return n<0?e:e.slice(0,n)+ne().staged.declinedPlanned+t(e.slice(n+vm.length))}function c9(e){return e.category!==void 0&&xRe.has(e.category.toLowerCase())}function u9(e,t){return(i9[(e.severity??"").toLowerCase()]??4)-(i9[(t.severity??"").toLowerCase()]??4)}var lI=e=>e?.length?` (${e.join(", ")})`:"";function l9(e){return`- ${e.severity?`**[${ta(ne().severityLabels,e.severity.toLowerCase()).toUpperCase()}]** `:""}${e.description.trim()}${lI(e.pullRequests)}`}function $Re(e){let t=e.resultId?.split("#").slice(1).join("#");if(e.testType!=="unit"||!t)return;let n=t;try{n=decodeURIComponent(t)}catch{}let s=/^(.*?)(\[.*\])$/.exec(n);return s?{fn:s[1],kase:s[2]}:{fn:n}}var g9=(e,t)=>e!==void 0&&t!==void 0&&e.replace(/^\.\//,"")===t.replace(/^\.\//,"");function m9(e,t){return(e.testVideos??[]).find(n=>n.url&&t(n))?.url}function wN(e,t){return m9(e,n=>g9(n.fileName,t.fileName)&&(!n.repository||!t.repository||n.repository.toLowerCase()===t.repository.toLowerCase()))}function IN(e,t){return m9(e,n=>g9(n.writtenAs??n.fileName,t))}function TRe(e,t,n){return n?wN(e,{fileName:t,repository:n}):IN(e,t)}function QRe(e){let t=[],n=new Map;for(let o of e.newTestsCreated)o.testType==="unit"&&n.set(o.fileName,[...n.get(o.fileName)??[],o.testId.split("::").slice(1).join("::")]);let s=new Map,r=(o,a)=>(n.get(o??"")??[]).find(c=>c!==a&&qZ(a,c)),i=new Map;for(let o of e.testResults){let a=$Re(o),c=a&&!a.kase?r(o.fileName,a.fn):void 0;if(a&&c&&(a={fn:c,kase:`"${a.fn}"`}),a?.kase&&s.set(o,a.kase),!a){t.push({testId:o.testId,testType:o.testType,endpoint:o.endpoint,status:o.status,details:o.details??"",...o.fileName?{fileName:o.fileName}:{},...o.repository?{repository:o.repository}:{}});continue}let u=`${o.fileName??""}#${a.fn}`,l=i.get(u);l||(l={row:{testId:o.testId,testType:o.testType,endpoint:o.endpoint,status:o.status,details:"",test:a.fn,...o.fileName?{fileName:o.fileName}:{},...o.repository?{repository:o.repository}:{}},cases:[]},i.set(u,l),t.push(l.row)),l.cases.push(o)}for(let{row:o,cases:a}of i.values()){let c=a.filter(h=>h.status==="Fail"),u=a.filter(h=>h.status==="Pass").length,l=a.filter(h=>h.status==="Skipped").length;o.cases=a.length,o.status=c.length?"Fail":l?"Skipped":"Pass";let p=c[0];o.details=a.length===1?a[0].details??"":ne().staged.casesPassed(u,a.length,l)+(p?`; ${s.get(p)??""} ${p.details??""}`.replace(/; +/,"; ").trimEnd():"")}return t}function _Re(e){return fN(e).map(t=>t.expected===void 0?t.expectation:`${t.expectation}: ${Zt(t.expected)}`)}function Im(e){return e.newTestsCreated.some(t=>t.testType!=="unit")&&e.testResults.every(t=>t.status==="Skipped")&&e.testResults.some(t=>t.failureCause?.kind==="environment"&&(t.failureCause.family==="app_not_started"||t.failureCause.family==="secret"))}function A9(e){let t=e.pullRequests??[];return t.length<2?[]:[ne().staged.validatedTogether(t.map(n=>`${Zt(`${n.repository}#${n.number}`)}${n.title?` ${Bs(n.title,120)}`:""}`).join("; "))]}function y9(e,t=1/0){let n=Array.from(e.name.replace(/\s+/g," ").trim()).slice(0,t).join("").replace(/[<>[\]()*_`\\|#]/g,"\\$&").replace(/@/g,"@\u200D");return e.kind==="person"?ne().staged.requestedByPerson(n):ne().staged.requestedByPolicy(n)}function E9(e,t={}){if(t.audience==="testbot-pr")return LRe(e,t);let{audience:n,collapsed:s=!1,existingEvidence:r=[],requestedBy:i,sourcePullRequest:o}=t,a=n!=="comment",c=(e.requirements??[]).filter(w=>/^file-[a-f0-9]{16}-/i.test(w.id)).sort((w,x)=>x.id.length-w.id.length),u=w=>{let x=c.find(S=>w.toLowerCase().startsWith(S.id.toLowerCase()));return x?x.label+w.slice(x.id.length):w},l=[EN];o&&l.push(ne().staged.testsSourcePullRequest(Zt(o)),"");for(let w of A9(e))l.push(w,"");i&&l.push(y9(i),""),e.notTranslated&&l.push(ta(ne().staged.notTranslated,e.notTranslated),"");let p=w=>{s?l.push("<details>",`<summary>${w}</summary>`,""):l.push(`### ${w}`)},h=()=>{s&&l.push("","</details>"),l.push("")};for(let w of e.businessCaseAnalysis.trim().split(/\r?\n/))l.push(`> ${w}`);if(l.push(""),Im(e)&&l.push(ne().staged.noLiveApp(mp(e.newTestsCreated)),""),a&&e.newTestsCreated.length){let w=new Map;for(let S of e.newTestsCreated){if(S.testType!=="unit")continue;let Y=pN(S)[0],ue=w.get(S.fileName)??{functions:new Set,endpoints:[],descriptions:new Map};S.endpoint&&!ue.endpoints.includes(S.endpoint)&&ue.endpoints.push(S.endpoint);let J=S.description?.trim()??"",be=ue.descriptions.get(Y)??[];be.includes(J)||be.push(J),ue.functions.add(Y),ue.descriptions.set(Y,be),w.set(S.fileName,ue)}let x=e.newTestsCreated.filter(S=>S.testType!=="unit");p(ne().testRecommendationsImplementedHeader(mp(e.newTestsCreated),x.length+mp(e.newTestsCreated.filter(S=>S.testType==="unit"))));for(let[S,{functions:Y,endpoints:ue,descriptions:J}]of w){let be=Y.size;l.push(ne().staged.unitTestsInFile(`\`${S}\``,be,ue.map(ke=>`\`${ke}\``).join(", ")),"");let Me=new Map;for(let[ke,X]of J){let z=X.join("\0"),Je=Me.get(z)??{fns:[],descriptions:X};Je.fns.push(ke),Me.set(z,Je)}let Ge=0;for(let{fns:ke,descriptions:X}of Me.values()){l.push(`${++Ge}. ${ke.map(Je=>`\`${Je}\``).join(", ")}`);let z=[...new Set(X.flatMap(Je=>_Re(Je)))];for(let Je of z)l.push(` - ${Je}`)}l.push("")}for(let S of x){let Y=S.testId?Zt(u(S.testId)):uI(S.testType),ue=S.fileName?` (\`${S.fileName}\`)`:"",J=S.endpoint?`
305
305
  \`${S.endpoint}\``:"",be=S.description?`
306
306
  ${S.description.trim()}`:"";l.push(`- ${Y}${ue}${lI(S.pullRequests)}${J}${be}`)}h()}let g=(e.testMaintenance??[]).filter(w=>vN.has(w.action));if(a&&g.length){p(ne().staged.testMaintenanceHeader),l.push(ne().maintenanceTableHeader),l.push("|-----------|----------|------|--------|--------|-------|");for(let w of g)l.push(`| ${dt(uI(w.testType))} | ${dt(w.endpoint)} | \`${dt(w.fileName)}\` | ${dt(w.description)} | ${a9(w.beforeStatus,w.beforeDetails)} | ${a9(w.afterStatus,w.afterDetails)} |`);h()}let m=w=>w.startsWith(Em)||w.includes(vm),y=(e.testMaintenance??[]).filter(w=>m(w.afterDetails)&&(!vN.has(w.action)||!f9.has(w.afterStatus??"")));if(a&&y.length){p(ne().staged.declinedMaintenanceHeader);for(let w of y)l.push(`- \`${dt(w.fileName)}\`: ${dt(h9(w.afterDetails))}`);h()}if(a&&r.length){p(ne().staged.existingEvidenceHeader);let w=new Map;for(let x of r){let S=`${x.check}\0${x.url??""}\0${x.revision??""}`;w.set(S,[...w.get(S)??[],x])}for(let[,[x,...S]]of w){let Y=x.url?`[${Zt(x.check)}](${x.url})`:Zt(x.check);l.push(ne().staged.trustedCheckPassed(Y,x.revision?Zt(x.revision.slice(0,7)):""),"");for(let ue of[x,...S])l.push(`- ${Zt(ue.behavior)}`);l.push("")}h()}if(a&&e.testResults.length){p(ne().staged.testResultsHeader);let w=QRe(e),x=w.some(J=>J.test),S=w.some(J=>wN(e,J)),Y=x?ne().staged.unitResultsTableHeader:ne().staged.resultsTableHeader;l.push(S?`${Y} ${ne().columnVideo} |`:Y),l.push(`${x?"|---------|-----------|----------|------|-------|--------|---------|":"|---------|-----------|----------|--------|---------|"}${S?"-------|":""}`);for(let J of w){let be=J.details.replace(/(\S+\.(?:py|ts|js|spec\.\w+))/gi,"`$1`"),Me=J.testId?Zt(dt(u(J.testId))):"\u2014",Ge=x?` ${J.test?`\`${dt(J.test)}\``:""} | ${J.cases??""} |`:"",ke=wN(e,J),X=S?` ${ke?ne().videoDownloadLink(ke):"\u2014"} |`:"";l.push(`| ${Me} | ${dt(uI(J.testType))} | ${dt(J.endpoint)} |${Ge} ${dt(bN(J.status))} | ${dt(be)} |${X}`)}let ue=(e.testVideos??[]).find(J=>J.artifactsUrl)?.artifactsUrl;!S&&ue&&l.push("",ne().videosArtifactFallback(ue)),h()}if(e.requirements?.length){let w=e.requirements.flatMap(J=>J.clauses),x=J=>J.status==="Pass"||J.status==="Passed, test not kept",S=w.filter(x).length;p(ne().staged.requirementsHeader(S,w.length));let Y=J=>ta(ne().staged.clauseStatuses,J.status),ue=J=>(J.status==="Not tested"||J.status==="Passed, test not kept")&&J.notTested?`${Y(J)}: ${J.notTested}`:J.findings.length?`${Y(J)} \u2014 ${J.findings.join(", ")}`:Y(J);if(a){l.push(ne().staged.requirementsTableHeader),l.push("|-------------|--------|-------|--------|");for(let J of e.requirements)J.clauses.forEach((be,Me)=>{let Ge=Me===0?`**${dt(J.label)}**${J.statement?` ${dt(J.statement)}`:""}${lI(J.pullRequests)}`:"",ke=`${Zt(dt(u(be.id)))}${o9(be)}${be.text?` ${dt(be.text)}`:""}`,X=new Map;for(let at of be.tests){let sn=at.fileName??u(at.testId),Et=X.get(sn)??{fns:new Set};for(let wn of at.functions)Et.fns.add(wn);Et.video??=at.fileName?TRe(e,at.fileName,at.repository):void 0,X.set(sn,Et)}let z=X.size?[...X].map(([at,{fns:sn,video:Et}])=>`${Zt(dt(at))}${sn.size?` \u2014 ${[...sn].map(wn=>`\`${dt(wn)}\``).join(", ")}`:""}${Et?` ${ne().videoDownloadLink(Et)}`:""}`).join("<br>"):"\u2014",Je=J.source==="could-break"&&be.status==="Pass"?ne().staged.regressionGuard:"";l.push(`| ${Ge} | ${ke} | ${z} | ${dt(ue(be)+Je)} |`)})}else{l.push(ne().staged.requirementsSummaryTableHeader),l.push("|-------------|-----------------|-------------|");for(let J of e.requirements){let be=J.clauses.filter(x).length,Me=J.clauses.filter(Ge=>!x(Ge)).map(Ge=>`${Zt(dt(u(Ge.id)))}${o9(Ge)} ${dt(ue(Ge))}`);l.push(`| **${dt(J.label)}**${J.statement?` ${dt(J.statement)}`:""}${lI(J.pullRequests)} | ${be}/${J.clauses.length} | ${Me.join("<br>")||"\u2014"} |`)}}h()}if(a&&e.changes?.length&&!e.requirements?.length){let w=e.executionCoverage,x=w?ne().staged.coverageCaption(w.generated,w.modified,w.verified,w.executed):"";p(`${ne().staged.behaviourCoverageHeader}${x}`),l.push(ne().staged.coverageTableHeader),l.push("|-----------|--------|-----------|----------------|");for(let S of e.changes){let Y=S.testedBy.length?S.testedBy.map(J=>`\`${dt(J)}\``).join(", "):S.writtenBy.length?ne().staged.writtenNotRun:"\u2014",ue=S.maintainedBy.length?S.maintainedBy.map(J=>`\`${dt(J)}\``).join(", "):"\u2014";l.push(`| ${dt(S.text)} | \`${dt(S.source)}\` | ${Y} | ${ue} |`)}h()}if(e.userJourneys?.length){let w=e.userJourneys.filter(S=>S.status==="Pass"&&!S.problems.length).length;p(`\u{1F9ED} User Journeys Covered (${w}/${e.userJourneys.length} walked end to end)`);let x=e.userJourneys.some(S=>IN(e,S.fileName));l.push(`| Journey | Test | Status | Notes |${x?` ${ne().columnVideo} |`:""}`),l.push(`|---------|------|--------|-------|${x?"-------|":""}`);for(let S of e.userJourneys){let Y=S.fileName?`\`${dt(S.fileName)}\`${S.test?` \u2014 ${dt(S.test)}`:""}`:"\u2014",ue=S.source&&S.source!=="inferred"?`; described in the ${S.source==="spec"?"spec":"PR description"}`:"; inferred from the app",J=(S.uncovered?`not covered: ${S.uncovered}`:S.problems.length?`does not walk it end to end: ${S.problems.join("; ")}`:`from ${S.entry}, ${S.steps} steps`)+ue,be=x?IN(e,S.fileName):void 0;l.push(`| ${dt(S.name)} | ${Y} | ${dt(S.status)} | ${dt(J)} |${x?` ${be?ne().videoDownloadLink(be):"\u2014"} |`:""}`)}h()}let v=e.issuesFound.filter(w=>!c9(w)).sort(u9),E=e.issuesFound.filter(c9).sort(u9);if(v.length){p(ne().staged.issuesFoundHeader);for(let w of v)l.push(l9(w));h()}if(E.length){l.push(`### ${ne().configErrorsHeader}`);for(let w of E)l.push(l9(w));l.push("")}let b=e.testPackages??[],I=e.dependencyChanges??[];if(b.length){l.push(ne().staged.testPackagesHeader,"");for(let w of b)l.push(`- ${ne().staged.testPackageLine(w.directory,w.entrypoint,Object.entries(w.dependencies??{}).map(([x,S])=>w.runner==="pytest"?`${x}==${S}`:`${x}@${S}`).join(", "))}`);I.length||l.push(`- ${ne().staged.appManifestsUntouched}`),l.push("")}if(I.length){l.push(ne().staged.dependencyChangesHeader,"");for(let w of I)l.push(`- ${ne().staged.dependencyChangeLine(w.package,w.repository?`${w.repository}: ${w.manifest}`:w.manifest,(w.reason??"").replace(/\s+/g," ").trim())}`);l.push("")}let C=(e.caveats??[]).filter(w=>w.kind!=="tests-not-executed"||w.subject==="written-cases"||!Im(e));if(C.length){l.push(ne().staged.caveatsHeader,"");for(let w of C)l.push(`- ${w.text}`);l.push("")}if(e.nextSteps.length){l.push(ne().nextStepsHeader,"");for(let w of e.nextSteps)l.push(`- ${w.trim()}`);l.push("")}return l.join(`
307
307
  `).replace(/\n{3,}/g,`
@@ -332,12 +332,12 @@ ${n}`}:{prFailure:"unknown",prDetail:t}}async function sBe(e,t,n,s,r,i){let o=s.
332
332
  `}catch{return""}}var k9=e=>e.map(t=>t.dependsOn.length?`${t.file} (needs ${t.dependsOn.join(", ")})`:t.file).join("; ");async function uBe(e,t,n,s,r,i){let o=aN(s.path,e.runDir),a=process.env.PATH;o.dir&&(process.env.PATH=N6(o).PATH);try{return await lBe(e,t,n,s,r,i)}finally{o.dir&&(process.env.PATH=a),o.cleanup()}}async function lBe(e,t,n,s,r,i){let o=s.slug,a,c=!1,u,l=[];try{let p=s.path,h=await sBe(e,t,n,s,r,i),{texts:g,shown:m,title:y,bot:v,remote:E,base:b,owner:I,testsBranch:C,origin:w,mergedBase:x}=h,S=(se=[])=>tN(p6(YRe(se,b)+E9(WRe(JRe(m,e,s),se.map(St=>St.file)),{audience:"testbot-pr",runUrl:e.inputs.skyrampRunUrl,requestedBy:e.inputs.requestedBy,sourcePullRequest:w&&`${w.repository.namespace}/${w.repository.name}#${w.number}`}),e.inputs.skyrampRunUrl))+`
333
333
  `,Y=i?"pr-body.md":`pr-body-${I9(o)}.md`,ue=ei.join(e.outputsDir,Y);bn.writeFileSync(ue,S());let J=ft(p,["rev-parse","HEAD"]),be=x??J;ft(p,["checkout","-B",C]),a=C,ft(p,["reset"]);let Me=Ae(e,"write.json"),Ge=Am(e,Me),ke=Ge.assemblies.filter(se=>se.source.path===s.path&&r.includes(se.record.sourceAsset)),X=yN(e,Ge);if(X.length)throw new Error(X.join("; "));let z=Me?s9(e,Me,g):[];if(z.length)throw new Error(z.join("; "));let Je=new Set(ke.flatMap(({record:se})=>[se.sourceAsset,...se.entry?[se.entry]:[]]));for(let se of r)Je.has(se)||HRe(ei.join(p,se),g);let at=M6(e,ke,g,l);if(at.length)throw new Error(at.join("; "));let sn=new Map([...Je].map(se=>{let St=bn.readFileSync(ei.join(p,se)),We=Ou=>ft(p,["hash-object","--no-filters","--stdin"],Ou),xt=new Set([We(St)]),ns=St.toString("latin1");return!St.includes(0)&&ns.includes(`\r
334
334
  `)&&xt.add(We(Buffer.from(ns.replace(/\r\n/g,`
335
- `),"latin1"))),[se,xt]})),Et=[];for(let se of r)try{ft(p,["--literal-pathspecs","add","--",se])}catch{Et.push(se)}if(Et.some(se=>Je.has(se)))throw new Error("could not stage every guarded delivery file");let wn=new Map([...sn].map(([se,St])=>{let We=ft(p,["--literal-pathspecs","ls-files","--stage","--",se]),xt=/^100(?:644|755) ([a-f0-9]+) 0\t/.exec(We)?.[1];if(!xt||!St.has(xt))throw new Error(`the staged guarded file differs from the generated file: ${se}`);return[se,xt]}));try{ft(p,["diff","--cached","--quiet"])}catch{try{let se=iBe(p,h,J,be,e.inputs.skyrampRunUrl);ft(p,["-c",`user.name=${v.name}`,"-c",`user.email=${v.email}`,"commit","-m",se])}catch(se){throw new dI(se)}c=!0}c&&(l.length=0),u=ft(p,["rev-parse","HEAD"]);let Ot,ut,Dn,Ct=x??i?.headSha;if(c&&Ct&&Ct!==J){let se=!1,St=u;try{ft(p,["checkout","-q","-B",a,Ct]),se=!0;try{ft(p,["-c",`user.name=${v.name}`,"-c",`user.email=${v.email}`,"cherry-pick","--keep-redundant-commits",u])}catch(We){let xt=x?aBe(p,v,St):void 0;if(!xt||(ut=xt.files.map(ns=>({file:ns,dependsOn:oBe(p,o,x,J,ns)})),Dn={repository:o,base:b,files:ut,patch:cBe(p,J,St,xt.files)},!xt.delivered))throw We}se=!1,sN(We=>ft(p,We),Ct),u=ft(p,["rev-parse","HEAD"])}catch(We){try{ft(p,["cherry-pick","--abort"])}catch{}ft(p,["checkout","-q","-B",a,u]);let xt=pm(Pa(We),1/0);if(x&&!se)throw We;if(x)return{thrown:!1,held:Dn,record:{schemaVersion:1,repository:o,branch:a,remote:E,base:b,committed:c,commitSha:u,pushed:!1,prAction:"skipped",prTitle:y,unstaged:Et,...ut?{heldBack:ut}:{},reason:ut?`every test change needs a merged revision ${b} does not have yet, so no tests PR was opened: ${k9(ut)}`:`the tests do not apply to ${b} at ${x.slice(0,12)} without the merged revisions (${xt}), so no tests PR was opened`}};Ot=`tests committed on the checkout's merge commit (re-cut onto ${Ct.slice(0,12)} failed: ${xt})`}}ut&&bn.writeFileSync(ue,S(ut));for(let[se,St]of wn){if(ut?.some(xt=>xt.file===se))continue;let We=ft(p,["--literal-pathspecs","ls-tree",u,"--",se]);if(/^100(?:644|755) blob ([a-f0-9]+)\t/.exec(We)?.[1]!==St)throw new Error(`the committed guarded file differs from the generated file: ${se}`)}for(let{record:se}of ke){if(se.entry)continue;let St=ft(p,["--literal-pathspecs","ls-tree",u,"--",se.file]);if(St&&St!==ft(p,["--literal-pathspecs","ls-tree",J,"--",se.file]))throw new Error(`the delivery included executable source for a held test: ${se.file}`)}let vt=i?{}:{repositoryPath:p,repoSlug:o,devPr:null};if(!c){let se=await t.markTestsPrUnchanged({branch:a,...vt});return{thrown:!1,record:{schemaVersion:1,repository:o,branch:a,remote:E,base:b,committed:!1,commitSha:u,pushed:!1,prAction:se.action==="unchanged"?"unchanged":"skipped",prUrl:se.url,prTitle:y,unstaged:Et,reason:se.action==="unchanged"?"no test changes to commit \u2014 existing tests PR annotated as unchanged":"no test changes to commit \u2014 nothing pushed, no PR opened"}}}let Oe=await t.publishTestsPr({repositoryPath:p,...vt,remote:E,branch:a,base:b,commitSha:u,title:y,bodyFile:ue,mode:e.inputs.deliverMode,deliveryOwner:I,...e.inputs.firstQualification?{firstQualification:!0}:{},runUrl:e.inputs.skyrampRunUrl,signal:e.signal,deadlineMs:e.deadlineMs});return{thrown:!1,held:Dn,record:{schemaVersion:1,repository:o,branch:a,remote:E,base:Oe.base,requestedBase:b,committed:c,commitSha:u,pushed:Oe.pushed,...Oe.pushedCommits?{pushedCommits:Oe.pushedCommits}:{},...Oe.deliveredCommit?{deliveredCommit:Oe.deliveredCommit}:{},prAction:Oe.action,...Oe.retargetedAs?{retargetedAs:Oe.retargetedAs}:{},prUrl:Oe.url,prTitle:y,...Oe.failure?{prFailure:Oe.failure,prDetail:Oe.detail}:{},...Ot?{cutNote:Ot}:{},...Oe.action==="skipped"&&Oe.detail?{reason:Oe.detail}:{},unstaged:Et,...ut?{heldBack:ut}:{}}}}catch(p){return{thrown:!0,record:{schemaVersion:1,repository:o,branch:a,committed:c,commitSha:u,pushed:!1,prAction:"failed",...rBe(p),unstaged:[]}}}finally{if(l.length){try{ft(s.path,["reset"])}catch{}for(let p of l.reverse())try{p()}catch{}}}}var bXe={name:"deliver",timeoutMinutes:5,execute:XRe,validateInput:e=>{let t=XD(e);return t?{ok:!1,reasons:[t]}:jRe(e)},requires:["report"],branchRequires:{runtime:["write"],"no-runtime":["generate-unit"]}};var C5e=10*6e4,S5e=4*6e4;var k5e=10*6e4;var pBe=3e4,fBe=3,R9=30,So=class extends Error{constructor(n,s,r,i){super(n);this.status=s;this.code=r;this.path=i}status;code;path},_i=class extends Error{},Ap=class extends _i{},pI=class extends Ap{};function hBe(e){let t;try{t=new URL(e)}catch{throw new Error(`skyrampAppOrigin "${e}" is not a URL`)}if(t.protocol!=="https:"||t.origin!==e.replace(/\/+$/,""))throw new Error(`skyrampAppOrigin must be an https origin, got "${e}"`);return t.origin}function gBe(e,t){if(!rd.test(e))throw new Error(`The ${t} "${e}" is not a uuid`);return e}function mBe(e,t,n,s){throw t<500&&t!==429?new So(e,t,n,s):t===503&&n==="RUNNER_PROVIDER_NOT_READY"?new pI(e):t===503&&n==="RUN_NOT_READY"?new Ap(e):new _i(e)}async function ABe(e,t,n,s,r,i=1/0){let o=hBe(e.origin),a=`The time limit for ${t} ${n} was reached`,c,u=0;for(let l=1;l<=fBe||c instanceof Ap;l+=1){if(c instanceof Ap){if(u===R9)throw c;u+=1,l-=1,e.log?.(`${c.message}; trying again (${u} of ${R9}).`),await new Promise(p=>setTimeout(p,Math.max(0,Math.min(e.readyWaitMs??1e4,i-Date.now()))))}else l>1&&await new Promise(p=>setTimeout(p,Math.max(0,Math.min((e.retryDelayMs??2e3)*(l-1),i-Date.now()))));if(Date.now()>=i)throw new _i(a);try{let p,h=await(Number.isFinite(i)?Promise.race([e.idToken(o),new Promise((m,y)=>{p=setTimeout(()=>y(new _i(a)),Math.max(1,i-Date.now()))})]).finally(()=>{p&&clearTimeout(p)}):e.idToken(o));if(Date.now()>=i)throw new _i(a);let g=await(e.fetch??fetch)(new URL(n,o).toString(),{...s(h),redirect:"error",signal:AbortSignal.timeout(Math.max(1,Math.min(pBe,i-Date.now())))}).catch(m=>{throw new _i(m instanceof Error?m.message:String(m),{cause:m})});return await r(g)}catch(p){if(p instanceof So||Date.now()>=i)throw p;c=p}}throw c}function yBe(e,t,n,s,r){let i=s.headers.get("cf-ray");e.log?.(`Testbot V3: ${t} ${n} answered ${s.status}${i?`, cf-ray ${i}`:""}: ${r.replace(/\s+/g," ").slice(0,200)}`)}var fI=class extends Error{};function EBe(e){let t=Buffer.byteLength(e,"utf8");if(t<=dB)return{body:e};if(t>Fz)throw new fI("The report exceeds the app's 16 MiB expanded report limit");let n=new Uint8Array((0,x9.gzipSync)(e));if(n.length>dB)throw new fI("The compressed report exceeds the app's 1 MiB report upload limit");return{body:n,gzip:!0}}function vBe(e,t,n,s,r){let i=t==="GET"?void 0:JSON.stringify(s),o=t==="PUT"&&/^\/api\/v1\/runner\/attempts\/[^/]+\/report$/.test(n)&&i!==void 0?EBe(i):{body:i};return bBe(e,t,n,o,r)}function bBe(e,t,n,s,r){return ABe(e,t,n,o=>({method:t,headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json",Accept:"application/json",...s.gzip?{"Content-Encoding":"gzip"}:{}},body:s.body}),async o=>{let a=await o.text().catch(()=>""),c={};try{c=JSON.parse(a)}catch{}if(o.ok)return c.data;yBe(e,t,n,o,a);let u=c.error?.fields,l=typeof u?.path=="string"&&typeof u.reason=="string"?` at ${u.path}: ${u.reason}`:"",p=`The Skyramp app refused ${t} ${n}: ${o.status} ${c.error?.code??"no error code"}${l}`;return mBe(p,o.status,c.error?.code,typeof u?.path=="string"?u.path:void 0)},r)}var R5e=10*6e4;var B5e=["TRIGGER","AUTHORITATIVE_RELATED_CHANGE"];var x5e=d.object({tests:d.object({placements:d.array(d.unknown()).optional()}).passthrough().optional()}).passthrough(),$5e=d.object({repository:cB,testType:d.string(),directory:d.string()}).passthrough();var T5e=d.object({report:d.object({language:d.string()}).passthrough()}).passthrough();var Q5e=d.object({environment:d.object({components:d.array(d.unknown()).optional(),dependencies:d.array(d.unknown()).optional()}).passthrough()}).passthrough(),_5e=d.object({environment:d.object({offLimits:d.unknown().optional()}).passthrough()}).passthrough();var D5e=d.object({environment:d.object({allowedEgress:d.unknown().optional()}).passthrough()}).passthrough();var N5e=d.object({name:d.string().min(1),provision:d.literal("existing"),url:d.string().min(1),repository:cB.optional(),revisionUrl:d.string().min(1).optional()}).passthrough(),P5e=d.object({name:d.string().min(1),url:d.string().nullable(),versionUrl:d.string().nullable(),notes:d.string().nullable()}).passthrough();var O5e=new Set(["TRIGGER","AUTHORITATIVE_RELATED_CHANGE","MANUAL_OVERRIDE"]);var U5e={"model-provider-denied":"model_provider_denied","model-provider-unavailable":"model_provider_unavailable"};async function kN(e,t){return gBe(e.attemptId,"attempt id"),vBe(t,"POST",`/api/v1/runner/attempts/${e.attemptId}/end`,uq({reportUploaded:e.reportUploaded,recipeUploaded:e.recipeUploaded,revisionsUploaded:e.revisionsUploaded,cancelled:e.cause==="cancelled",timedOut:e.cause==="timed_out",setupFailed:e.cause==="setup_failed",checkoutFailed:e.cause==="checkout_failed"||e.cause==="merge_conflict"&&!e.conflict,mergeConflict:e.cause==="merge_conflict"?e.conflict:void 0,environmentUnverified:e.cause==="environment_unverified",runnerProviderNotReady:e.cause==="runner_provider_not_ready",credentialMissing:e.cause==="credential_missing",modelProviderDenied:e.cause==="model_provider_denied",modelProviderUnavailable:e.cause==="model_provider_unavailable",githubWrites:e.githubWrites,environmentUnavailable:e.cause==="environment_unavailable",sharedEnvironmentRecords:e.sharedEnvironmentRecords}))}var IBe={discover:"reading the repositories",start:"starting the components",check:"checking that the components answer"};var H5e={running:"up",healthy:"up",ready:"up",started:"up",building:"starting",pending:"starting",installing:"starting",skipped:"out_of_scope",excluded:"out_of_scope","out-of-scope":"out_of_scope"};var J5e=new RegExp(id.source,"g");function CBe(e){let t=Xd(e).serverUrl,n=Number.parseInt(e.GIT_CONFIG_COUNT??"0",10)||0;return{...e,GIT_CONFIG_COUNT:String(n+2),[`GIT_CONFIG_KEY_${n}`]:`http.${t}/.extraheader`,[`GIT_CONFIG_VALUE_${n}`]:"",[`GIT_CONFIG_KEY_${n+1}`]:"http.extraheader",[`GIT_CONFIG_VALUE_${n+1}`]:""}}var SBe=90,kBe={CLAUDE_CODE_DISABLE_BACKGROUND_TASKS:"1",CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS:String(SBe*1e3)},$9=30,T9={BASH_DEFAULT_TIMEOUT_MS:"600000",BASH_MAX_TIMEOUT_MS:String($9*6e4)},Q9=["This session is non-interactive: it ends as soon as you stop, and a background command can",`never notify you. Wait for long builds in the foreground (one Bash call may run up to ${$9}`,"minutes) and keep checking until they finish; never end your turn while setup is running. A server that must keep","running after setup is detached inside the command itself, with the redirect of both stdout and stderr","(`> log 2>&1`) on the whole backgrounded command (`docker compose up -d`, or `{ cmd; } </dev/null > log 2>&1 &`).","Without `2>&1` the server keeps the call's stderr open, and in `a || nohup cmd > log &` or","`(cd dir && nohup cmd > log &)` the redirect covers only `cmd`, and the shell that runs it keeps the call's output","open until the server exits. Run a setup script as a command of its own, never piped or chained:","`bash .skyramp/sut/setup.sh`. The call returns its output and exit status when the script exits, even if a server","it started still holds its output; through a pipe (`| tail`), it waits for that server."];function RBe(e,t){return CBe(pt(e,{...kBe,...t},"session"))}function hI(e){return RBe(process.env,e)}On();var _9=".skyramp/sut/health.json",L7e={[_9]:`${_9} (with a url or command)`};function RN(e,t){return!Jf(e.status)||e.environment?[]:[...new Set(e.components.flatMap(n=>n.credentials??[]))].filter(n=>!fD(n,t))}function BN(e){let t=e.filter(Mf);if(t.length!==0)return`Rename ${t.join(", ")} in the recipe and on the workflow host, for example to APP_${t[0]}`}function gI(e){if(e.state.stages.onboard?.status==="passed")return Ae(e,"onboard.json")}var AI=G(require("fs")),Sm=G(require("path"));var P9=["browser_assert","browser_assert_api_request","browser_assert_hidden","browser_assert_table_cell","browser_blueprint","browser_click","browser_drag","browser_evaluate","browser_file_upload","browser_gojs_add_node","browser_gojs_link","browser_hover","browser_mouse_action","browser_navigate","browser_navigate_back","browser_press_key","browser_select_option","browser_snapshot","browser_tabs","browser_take_screenshot","browser_type","browser_visual_snapshot","browser_wait_for"],z7e=[...P9,"skyramp_export_zip","skyramp_actions","skyramp_analyze_changes","skyramp_analyze_test_health","skyramp_batch_mock_generation","skyramp_batch_scenario_test_generation","skyramp_contract_test_generation","skyramp_e2e_test_generation","skyramp_enhance_assertions","skyramp_enrich_test_with_mocks","skyramp_execute_test","skyramp_fix_errors","skyramp_fuzz_test_generation","skyramp_generate_enriched_integration_test","skyramp_init_scan","skyramp_init_workspace","skyramp_integration_test_generation","skyramp_load_test_generation","skyramp_login","skyramp_logout","skyramp_mock_generation","skyramp_modularization","skyramp_one_click_tool","skyramp_preflight_mock_check","skyramp_query_proxy_mocks","skyramp_recommend_tests","skyramp_register_test_plan","skyramp_reuse_code","skyramp_run_existing_tests","skyramp_setup_local_dev_worker","skyramp_smoke_test_generation","skyramp_start_trace_collection","skyramp_stop_trace_collection","skyramp_submit_report","skyramp_ui_test_generation"];var q7e=["skyramp_ui_test_generation","skyramp_mock_generation","skyramp_fix_errors","skyramp_start_trace_collection","skyramp_stop_trace_collection","skyramp_export_zip",...P9];var O9=["Bash(ls:*)","Bash(cat:*)","Bash(head:*)","Bash(tail:*)","Bash(wc:*)","Bash(find:*)","Bash(grep:*)","Bash(rg:*)","Bash(diff:*)","Bash(sort:*)","Bash(env:*)","Bash(echo:*)","Bash(pwd:*)","Bash(which:*)","Bash(cp:*)","Bash(curl:*)","Bash(jq:*)","Bash(true:*)"];var mI=G(require("fs"));var QBe={name:"output-produced",verify(e,t,n){let s=e.outputFileFor(n.name);return(mI.existsSync(s)?mI.readFileSync(s,"utf-8"):"").trim().length>0?{name:this.name,passed:!0}:{name:this.name,passed:!1,details:`stage produced no output (${s} empty or missing)`}}},_Be=["Re-read the stage instructions above and confirm every task was completed.","If you find a mistake or an incomplete task, fix it now before finishing.","End your response with a one-line summary of what this stage accomplished."];function U9(e){let t=e.requires??[];return{name:e.name,model:e.model??"sonnet",maxAttempts:e.maxAttempts,effort:e.effort,timeoutMinutes:e.timeoutMinutes??15,scaleTimeout:e.scaleTimeout,requires:t,softRequires:e.softRequires,validateInput:e.validateInput??(()=>({ok:!0,reasons:[]})),buildPrompt:e.buildPrompt??(()=>`You are the "${e.name}" stage of the Skyramp Testbot.`),selfVerification:e.selfVerification??_Be,exitGates:e.exitGates??[QBe],prepare:e.prepare,abortIf:e.abortIf,onAbort:e.onAbort,beforeReset:e.beforeReset,teardown:e.teardown,releaseAtRunEnd:e.releaseAtRunEnd,buildMcpServers:e.buildMcpServers,buildReadDirs:e.buildReadDirs,buildPluginDirs:e.buildPluginDirs,buildSettings:e.buildSettings,renderTimeLimit:e.renderTimeLimit,namesSession:e.namesSession,resumeFrom:e.resumeFrom,requiredSkills:e.requiredSkills,buildSessionEnv:e.buildSessionEnv,dataSafetyProxy:e.dataSafetyProxy,startsApp:e.startsApp,putsBackTrackedFiles:e.putsBackTrackedFiles,allowedTools:e.allowedTools,buildDisallowedTools:e.buildDisallowedTools,captureTrace:e.captureTrace,onPassed:e.onPassed,passReason:e.passReason,adversarialReview:e.adversarialReview,retryHint:e.retryHint,beforeGates:e.beforeGates,afterAttempt:e.afterAttempt,retryNote:e.retryNote,salvage:e.salvage,checkpoint:e.checkpoint,needsSutAuth:e.needsSutAuth,triageBranch:e.triageBranch,branchSkipClears:e.branchSkipClears,branchRequires:e.branchRequires}}var DBe=["Bash(docker:*)","Bash(docker compose:*)","Bash(docker-compose:*)","Bash(bash:*)","Bash(sh:*)","Bash(.skyramp/sut/*)","Bash(./.skyramp/sut/*)","Bash(curl:*)","Bash(sleep:*)",...O9,"Read","Write","Edit"];function NBe(e){let t=e.state.stages.onboard;if(t&&(t.status==="failed"||t.status==="aborted")){let o=t.reason?` \u2014 ${t.reason.length>300?`${t.reason.slice(0,300)}\u2026`:t.reason}`:"";return{ok:!1,reasons:[`onboarding ran and did not pass (${t.status}${o}) \u2014 deploy does not replay its recipe; fix that and onboard again`]}}let n=Gs(e),s=gI(e);if(s?.status==="blocked")return{ok:!1,reasons:[`onboarding reported blocked (${s.blockers.length} blocker(s)) \u2014 see outputs/onboard.json`]};let r=e.inputs.setupEvents&&t?.status==="passed"&&s&&!e.inputs.recheck?RN(s,hI()):[];return r.length>0?{ok:!1,planned:!0,reasons:[[`onboard found the credentials the SUT needs (${r.join(", ")}); Testbot adds the ones on the repository and the next run starts the app with them`,BN(r)].filter(Boolean).join("; ")]}:n&&!n.sutRequired&&!(s&&Jf(s.status))&&!e.inputs.recheck?{ok:!1,reasons:["preflight determined no SUT is required (non-application change)"]}:xa(e.inputs.repositoryPath,n?.changedFiles.map(o=>o.path)).present?{ok:!0,reasons:[]}:{ok:!1,reasons:["no deploy recipe found (.skyramp/sut/setup.sh or health.json) \u2014 run onboarding first"]}}function PBe(e){let t=e.prepared?.recipe?.budgetMinutes;if(t===void 0)return;let n=Math.min(t+5,90);return n>25?n:void 0}function OBe(e){let t=Gs(e);return{recipe:xa(e.inputs.repositoryPath,t?.changedFiles.map(s=>s.path))}}function UBe(e,t){return[t.setupScript,t.teardownScript,t.authTokenScript].filter(n=>!!n).map(n=>Sm.relative(e,n))}function FBe(e,t="revisions"){let n=$w(e.inputs);return n.length===0?[]:["","Shared components: these run in an existing environment that this run does not deploy.",...n.map(s=>` - ${s.name} at ${s.url}, running ${s.repository}`),"For each, find the URL on its host where the RUNNING component reports its commit (a version,",`build-info or health endpoint) and record it in "${t}": the url, and what it returned,`,"VERBATIM. This gate fetches each url and reads the commit from what it returns. A checkout's","commit is not the deployed one. Cite only the components listed; leave out one you cannot","check \u2014 it is then reported unverifiable, and no runtime test runs against it."]}function xN(e){return gI(e)?.environment??e.inputs.recheckEnvironment}function MBe(e,t){return[`Tasks: the SUT is the customer's existing deployment at ${e}, already running. Never start, stop, redeploy or`,"change it, and write no setup.sh or teardown.sh: this recipe has none on purpose.","1. Sign in the way the recipe records (.skyramp/sut/get-auth-token.sh), when it has one \u2014 never echo it.","2. Health-check: run the recipe's check (.skyramp/sut/health.json) and confirm it answers with real data. Record the"," exact url/command and what it returned.",...t.healthHint?[` The recorded check: ${JSON.stringify(t.healthHint)}`]:[],'3. Record the outcome: "clean" when the check passes; "bringup-failed", with bringupError, when the deployment does',` not answer or is not ready. baseUrls: each component's address. teardown: "true", since nothing was started.`]}function LBe(e){let t=gI(e),n=e.inputs.recheck?e.inputs.recheckCredentials??[]:t?GR(t):[];if(n.length===0)return[];let s=e.inputs.sharedEnvironment,r=jf(s).map(i=>i.name);return["",`Credentials: the recipe reads ${n.join(", ")}, each from the environment variable of its name. Test each one that`,"has a value with a request that changes nothing, such as signing in with it (.skyramp/sut/get-auth-token.sh) or a GET","of an authenticated route: never one that creates, changes or deletes data.",...r.length>0?[`The shared components ${r.join(", ")} stay unchanged: test a credential they take only with a read.`]:[],...jBe(e)?["Record each one that is refused, such as with a 401 or 403 or a sign-in that fails, or that the app rejects at",'startup or bootstrap, such as a password it finds too short, in "credentialsRefused": its name, the component that',"refused it, the HTTP status when there was one, and the request or command with what came back. For one with no",'HTTP status, start that evidence with one short phrase saying why and a colon, such as "password shorter than 8','characters: <command and what came back>". Never write a value, there or anywhere. Leave out one with no value:',"Testbot reports it. A refused credential is not drift: never change the recipe to get around it. Never replace a","credential that has a value with a stand-in or a value written into the recipe, and never stop the recipe reading","it: Testbot refuses a recipe that does. When it stops the app coming up or its check passing, the outcome is",'"bringup-failed", and the credential is named.']:["Record each one that is refused, such as with a 401 or 403 or a sign-in that fails, in",'"credentialsRefused": its name, the component that refused it, the HTTP status, and the request or command with what',"came back. Never write a value, there or anywhere. Leave out one with no value: Testbot reports it. A refused","credential is not drift: never change the recipe to get around it. When it stops the app coming up or its check",'passing, the outcome is "bringup-failed", as for any other failure.']]}var jBe=e=>!!(e.inputs.recheck||e.inputs.setupEvents);function VBe(e){let{recipe:t}=e.prepared,n=e.inputs.repositoryPath,s=UBe(n,t),r=xN(e),i=e.inputs.sharedEnvironment,o=jf(i).map(a=>a.name);return['You are the "deploy" stage of the Skyramp Testbot.',"",...r?["Purpose: confirm, from a fresh session, that the existing deployment onboard found is reachable and ready, so the","recipe is proven the way every run will use it. The recipe already exists; change nothing."]:["Purpose: bring the system under test (SUT) up from its recorded recipe so","later stages can run tests against it. You do NOT design the deployment \u2014 the","recipe already exists. Execute it, verify it works, and if it has drifted","slightly out of date, correct it and continue (rather than reverting)."],"",`Repository: ${n} \u2014 work inside it.`,`Recipe files present: ${s.join(", ")||"(workspace only)"}`,"",...Q9,t.stale?`
335
+ `),"latin1"))),[se,xt]})),Et=[];for(let se of r)try{ft(p,["--literal-pathspecs","add","--",se])}catch{Et.push(se)}if(Et.some(se=>Je.has(se)))throw new Error("could not stage every guarded delivery file");let wn=new Map([...sn].map(([se,St])=>{let We=ft(p,["--literal-pathspecs","ls-files","--stage","--",se]),xt=/^100(?:644|755) ([a-f0-9]+) 0\t/.exec(We)?.[1];if(!xt||!St.has(xt))throw new Error(`the staged guarded file differs from the generated file: ${se}`);return[se,xt]}));try{ft(p,["diff","--cached","--quiet"])}catch{try{let se=iBe(p,h,J,be,e.inputs.skyrampRunUrl);ft(p,["-c",`user.name=${v.name}`,"-c",`user.email=${v.email}`,"commit","-m",se])}catch(se){throw new dI(se)}c=!0}c&&(l.length=0),u=ft(p,["rev-parse","HEAD"]);let Ot,ut,Dn,Ct=x??i?.headSha;if(c&&Ct&&Ct!==J){let se=!1,St=u;try{ft(p,["checkout","-q","-B",a,Ct]),se=!0;try{ft(p,["-c",`user.name=${v.name}`,"-c",`user.email=${v.email}`,"cherry-pick","--keep-redundant-commits",u])}catch(We){let xt=x?aBe(p,v,St):void 0;if(!xt||(ut=xt.files.map(ns=>({file:ns,dependsOn:oBe(p,o,x,J,ns)})),Dn={repository:o,base:b,files:ut,patch:cBe(p,J,St,xt.files)},!xt.delivered))throw We}se=!1,sN(We=>ft(p,We),Ct),u=ft(p,["rev-parse","HEAD"])}catch(We){try{ft(p,["cherry-pick","--abort"])}catch{}ft(p,["checkout","-q","-B",a,u]);let xt=pm(Pa(We),1/0);if(x&&!se)throw We;if(x)return{thrown:!1,held:Dn,record:{schemaVersion:1,repository:o,branch:a,remote:E,base:b,committed:c,commitSha:u,pushed:!1,prAction:"skipped",prTitle:y,unstaged:Et,...ut?{heldBack:ut}:{},reason:ut?`every test change needs a merged revision ${b} does not have yet, so no tests PR was opened: ${k9(ut)}`:`the tests do not apply to ${b} at ${x.slice(0,12)} without the merged revisions (${xt}), so no tests PR was opened`}};Ot=`tests committed on the checkout's merge commit (re-cut onto ${Ct.slice(0,12)} failed: ${xt})`}}ut&&bn.writeFileSync(ue,S(ut));for(let[se,St]of wn){if(ut?.some(xt=>xt.file===se))continue;let We=ft(p,["--literal-pathspecs","ls-tree",u,"--",se]);if(/^100(?:644|755) blob ([a-f0-9]+)\t/.exec(We)?.[1]!==St)throw new Error(`the committed guarded file differs from the generated file: ${se}`)}for(let{record:se}of ke){if(se.entry)continue;let St=ft(p,["--literal-pathspecs","ls-tree",u,"--",se.file]);if(St&&St!==ft(p,["--literal-pathspecs","ls-tree",J,"--",se.file]))throw new Error(`the delivery included executable source for a held test: ${se.file}`)}let vt=i?{}:{repositoryPath:p,repoSlug:o,devPr:null};if(!c){let se=await t.markTestsPrUnchanged({branch:a,...vt});return{thrown:!1,record:{schemaVersion:1,repository:o,branch:a,remote:E,base:b,committed:!1,commitSha:u,pushed:!1,prAction:se.action==="unchanged"?"unchanged":"skipped",prUrl:se.url,prTitle:y,unstaged:Et,reason:se.action==="unchanged"?"no test changes to commit \u2014 existing tests PR annotated as unchanged":"no test changes to commit \u2014 nothing pushed, no PR opened"}}}let Oe=await t.publishTestsPr({repositoryPath:p,...vt,remote:E,branch:a,base:b,commitSha:u,title:y,bodyFile:ue,mode:e.inputs.deliverMode,deliveryOwner:I,...e.inputs.firstQualification?{firstQualification:!0}:{},runUrl:e.inputs.skyrampRunUrl,signal:e.signal,deadlineMs:e.deadlineMs});return{thrown:!1,held:Dn,record:{schemaVersion:1,repository:o,branch:a,remote:E,base:Oe.base,requestedBase:b,committed:c,commitSha:u,pushed:Oe.pushed,...Oe.pushedCommits?{pushedCommits:Oe.pushedCommits}:{},...Oe.deliveredCommit?{deliveredCommit:Oe.deliveredCommit}:{},prAction:Oe.action,...Oe.retargetedAs?{retargetedAs:Oe.retargetedAs}:{},prUrl:Oe.url,prTitle:y,...Oe.failure?{prFailure:Oe.failure,prDetail:Oe.detail}:{},...Ot?{cutNote:Ot}:{},...Oe.action==="skipped"&&Oe.detail?{reason:Oe.detail}:{},unstaged:Et,...ut?{heldBack:ut}:{}}}}catch(p){return{thrown:!0,record:{schemaVersion:1,repository:o,branch:a,committed:c,commitSha:u,pushed:!1,prAction:"failed",...rBe(p),unstaged:[]}}}finally{if(l.length){try{ft(s.path,["reset"])}catch{}for(let p of l.reverse())try{p()}catch{}}}}var wXe={name:"deliver",timeoutMinutes:5,execute:XRe,validateInput:e=>{let t=XD(e);return t?{ok:!1,reasons:[t]}:jRe(e)},requires:["report"],branchRequires:{runtime:["write"],"no-runtime":["generate-unit"]}};var S5e=10*6e4,k5e=4*6e4;var R5e=10*6e4;var pBe=3e4,fBe=3,R9=30,So=class extends Error{constructor(n,s,r,i){super(n);this.status=s;this.code=r;this.path=i}status;code;path},_i=class extends Error{},Ap=class extends _i{},pI=class extends Ap{};function hBe(e){let t;try{t=new URL(e)}catch{throw new Error(`skyrampAppOrigin "${e}" is not a URL`)}if(t.protocol!=="https:"||t.origin!==e.replace(/\/+$/,""))throw new Error(`skyrampAppOrigin must be an https origin, got "${e}"`);return t.origin}function gBe(e,t){if(!rd.test(e))throw new Error(`The ${t} "${e}" is not a uuid`);return e}function mBe(e,t,n,s){throw t<500&&t!==429?new So(e,t,n,s):t===503&&n==="RUNNER_PROVIDER_NOT_READY"?new pI(e):t===503&&n==="RUN_NOT_READY"?new Ap(e):new _i(e)}async function ABe(e,t,n,s,r,i=1/0){let o=hBe(e.origin),a=`The time limit for ${t} ${n} to the Skyramp web app was reached`,c,u=0;for(let l=1;l<=fBe||c instanceof Ap;l+=1){if(c instanceof Ap){if(u===R9)throw c;u+=1,l-=1,e.log?.(`${c.message}; trying again (${u} of ${R9}).`),await new Promise(p=>setTimeout(p,Math.max(0,Math.min(e.readyWaitMs??1e4,i-Date.now()))))}else l>1&&await new Promise(p=>setTimeout(p,Math.max(0,Math.min((e.retryDelayMs??2e3)*(l-1),i-Date.now()))));if(Date.now()>=i)throw new _i(a);try{let p,h=await(Number.isFinite(i)?Promise.race([e.idToken(o),new Promise((m,y)=>{p=setTimeout(()=>y(new _i(a)),Math.max(1,i-Date.now()))})]).finally(()=>{p&&clearTimeout(p)}):e.idToken(o));if(Date.now()>=i)throw new _i(a);let g=await(e.fetch??fetch)(new URL(n,o).toString(),{...s(h),redirect:"error",signal:AbortSignal.timeout(Math.max(1,Math.min(pBe,i-Date.now())))}).catch(m=>{let y=m instanceof Error?m.message:String(m);throw new _i(`The Skyramp web app did not answer ${t} ${n}: ${y}`,{cause:m})});return await r(g)}catch(p){if(p instanceof So||Date.now()>=i)throw p;c=p}}throw c}function yBe(e,t,n,s,r){let i=s.headers.get("cf-ray");e.log?.(`Testbot V3: the Skyramp web app answered ${t} ${n} with ${s.status}${i?`, cf-ray ${i}`:""}: ${r.replace(/\s+/g," ").slice(0,200)}`)}var fI=class extends Error{};function EBe(e){let t=Buffer.byteLength(e,"utf8");if(t<=dB)return{body:e};if(t>Fz)throw new fI("The report exceeds the Skyramp web app's 16 MiB expanded report limit");let n=new Uint8Array((0,x9.gzipSync)(e));if(n.length>dB)throw new fI("The compressed report exceeds the Skyramp web app's 1 MiB report upload limit");return{body:n,gzip:!0}}function vBe(e,t,n,s,r){let i=t==="GET"?void 0:JSON.stringify(s),o=t==="PUT"&&/^\/api\/v1\/runner\/attempts\/[^/]+\/report$/.test(n)&&i!==void 0?EBe(i):{body:i};return bBe(e,t,n,o,r)}function bBe(e,t,n,s,r){return ABe(e,t,n,o=>({method:t,headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json",Accept:"application/json",...s.gzip?{"Content-Encoding":"gzip"}:{}},body:s.body}),async o=>{let a=await o.text().catch(()=>""),c={};try{c=JSON.parse(a)}catch{}if(o.ok)return c.data;yBe(e,t,n,o,a);let u=c.error?.fields,l=typeof u?.path=="string"&&typeof u.reason=="string"?` at ${u.path}: ${u.reason}`:"",p=`The Skyramp web app refused ${t} ${n}: ${o.status} ${c.error?.code??"no error code"}${l}`;return mBe(p,o.status,c.error?.code,typeof u?.path=="string"?u.path:void 0)},r)}var B5e=10*6e4;var x5e=["TRIGGER","AUTHORITATIVE_RELATED_CHANGE"];var $5e=d.object({tests:d.object({placements:d.array(d.unknown()).optional()}).passthrough().optional()}).passthrough(),T5e=d.object({repository:cB,testType:d.string(),directory:d.string()}).passthrough();var Q5e=d.object({report:d.object({language:d.string()}).passthrough()}).passthrough();var _5e=d.object({environment:d.object({components:d.array(d.unknown()).optional(),dependencies:d.array(d.unknown()).optional()}).passthrough()}).passthrough(),D5e=d.object({environment:d.object({offLimits:d.unknown().optional()}).passthrough()}).passthrough();var N5e=d.object({environment:d.object({allowedEgress:d.unknown().optional()}).passthrough()}).passthrough();var P5e=d.object({name:d.string().min(1),provision:d.literal("existing"),url:d.string().min(1),repository:cB.optional(),revisionUrl:d.string().min(1).optional()}).passthrough(),O5e=d.object({name:d.string().min(1),url:d.string().nullable(),versionUrl:d.string().nullable(),notes:d.string().nullable()}).passthrough();var U5e=new Set(["TRIGGER","AUTHORITATIVE_RELATED_CHANGE","MANUAL_OVERRIDE"]);var F5e={"model-provider-denied":"model_provider_denied","model-provider-unavailable":"model_provider_unavailable"};async function kN(e,t){return gBe(e.attemptId,"attempt id"),vBe(t,"POST",`/api/v1/runner/attempts/${e.attemptId}/end`,uq({reportUploaded:e.reportUploaded,recipeUploaded:e.recipeUploaded,revisionsUploaded:e.revisionsUploaded,cancelled:e.cause==="cancelled",timedOut:e.cause==="timed_out",setupFailed:e.cause==="setup_failed",checkoutFailed:e.cause==="checkout_failed"||e.cause==="merge_conflict"&&!e.conflict,mergeConflict:e.cause==="merge_conflict"?e.conflict:void 0,environmentUnverified:e.cause==="environment_unverified",runnerProviderNotReady:e.cause==="runner_provider_not_ready",credentialMissing:e.cause==="credential_missing",modelProviderDenied:e.cause==="model_provider_denied",modelProviderUnavailable:e.cause==="model_provider_unavailable",githubWrites:e.githubWrites,environmentUnavailable:e.cause==="environment_unavailable",sharedEnvironmentRecords:e.sharedEnvironmentRecords}))}var IBe={discover:"reading the repositories",start:"starting the components",check:"checking that the components answer"};var J5e={running:"up",healthy:"up",ready:"up",started:"up",building:"starting",pending:"starting",installing:"starting",skipped:"out_of_scope",excluded:"out_of_scope","out-of-scope":"out_of_scope"};var W5e=new RegExp(id.source,"g");function CBe(e){let t=Xd(e).serverUrl,n=Number.parseInt(e.GIT_CONFIG_COUNT??"0",10)||0;return{...e,GIT_CONFIG_COUNT:String(n+2),[`GIT_CONFIG_KEY_${n}`]:`http.${t}/.extraheader`,[`GIT_CONFIG_VALUE_${n}`]:"",[`GIT_CONFIG_KEY_${n+1}`]:"http.extraheader",[`GIT_CONFIG_VALUE_${n+1}`]:""}}var SBe=90,kBe={CLAUDE_CODE_DISABLE_BACKGROUND_TASKS:"1",CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS:String(SBe*1e3)},$9=30,T9={BASH_DEFAULT_TIMEOUT_MS:"600000",BASH_MAX_TIMEOUT_MS:String($9*6e4)},Q9=["This session is non-interactive: it ends as soon as you stop, and a background command can",`never notify you. Wait for long builds in the foreground (one Bash call may run up to ${$9}`,"minutes) and keep checking until they finish; never end your turn while setup is running. A server that must keep","running after setup is detached inside the command itself, with the redirect of both stdout and stderr","(`> log 2>&1`) on the whole backgrounded command (`docker compose up -d`, or `{ cmd; } </dev/null > log 2>&1 &`).","Without `2>&1` the server keeps the call's stderr open, and in `a || nohup cmd > log &` or","`(cd dir && nohup cmd > log &)` the redirect covers only `cmd`, and the shell that runs it keeps the call's output","open until the server exits. Run a setup script as a command of its own, never piped or chained:","`bash .skyramp/sut/setup.sh`. The call returns its output and exit status when the script exits, even if a server","it started still holds its output; through a pipe (`| tail`), it waits for that server."];function RBe(e,t){return CBe(pt(e,{...kBe,...t},"session"))}function hI(e){return RBe(process.env,e)}On();var _9=".skyramp/sut/health.json",j7e={[_9]:`${_9} (with a url or command)`};function RN(e,t){return!Jf(e.status)||e.environment?[]:[...new Set(e.components.flatMap(n=>n.credentials??[]))].filter(n=>!fD(n,t))}function BN(e){let t=e.filter(Mf);if(t.length!==0)return`Rename ${t.join(", ")} in the recipe and on the workflow host, for example to APP_${t[0]}`}function gI(e){if(e.state.stages.onboard?.status==="passed")return Ae(e,"onboard.json")}var AI=G(require("fs")),Sm=G(require("path"));var P9=["browser_assert","browser_assert_api_request","browser_assert_hidden","browser_assert_table_cell","browser_blueprint","browser_click","browser_drag","browser_evaluate","browser_file_upload","browser_gojs_add_node","browser_gojs_link","browser_hover","browser_mouse_action","browser_navigate","browser_navigate_back","browser_press_key","browser_select_option","browser_snapshot","browser_tabs","browser_take_screenshot","browser_type","browser_visual_snapshot","browser_wait_for"],q7e=[...P9,"skyramp_export_zip","skyramp_actions","skyramp_analyze_changes","skyramp_analyze_test_health","skyramp_batch_mock_generation","skyramp_batch_scenario_test_generation","skyramp_contract_test_generation","skyramp_e2e_test_generation","skyramp_enhance_assertions","skyramp_enrich_test_with_mocks","skyramp_execute_test","skyramp_fix_errors","skyramp_fuzz_test_generation","skyramp_generate_enriched_integration_test","skyramp_init_scan","skyramp_init_workspace","skyramp_integration_test_generation","skyramp_load_test_generation","skyramp_login","skyramp_logout","skyramp_mock_generation","skyramp_modularization","skyramp_one_click_tool","skyramp_preflight_mock_check","skyramp_query_proxy_mocks","skyramp_recommend_tests","skyramp_register_test_plan","skyramp_reuse_code","skyramp_run_existing_tests","skyramp_setup_local_dev_worker","skyramp_smoke_test_generation","skyramp_start_trace_collection","skyramp_stop_trace_collection","skyramp_submit_report","skyramp_ui_test_generation"];var H7e=["skyramp_ui_test_generation","skyramp_mock_generation","skyramp_fix_errors","skyramp_start_trace_collection","skyramp_stop_trace_collection","skyramp_export_zip",...P9];var O9=["Bash(ls:*)","Bash(cat:*)","Bash(head:*)","Bash(tail:*)","Bash(wc:*)","Bash(find:*)","Bash(grep:*)","Bash(rg:*)","Bash(diff:*)","Bash(sort:*)","Bash(env:*)","Bash(echo:*)","Bash(pwd:*)","Bash(which:*)","Bash(cp:*)","Bash(curl:*)","Bash(jq:*)","Bash(true:*)"];var mI=G(require("fs"));var QBe={name:"output-produced",verify(e,t,n){let s=e.outputFileFor(n.name);return(mI.existsSync(s)?mI.readFileSync(s,"utf-8"):"").trim().length>0?{name:this.name,passed:!0}:{name:this.name,passed:!1,details:`stage produced no output (${s} empty or missing)`}}},_Be=["Re-read the stage instructions above and confirm every task was completed.","If you find a mistake or an incomplete task, fix it now before finishing.","End your response with a one-line summary of what this stage accomplished."];function U9(e){let t=e.requires??[];return{name:e.name,model:e.model??"sonnet",maxAttempts:e.maxAttempts,effort:e.effort,timeoutMinutes:e.timeoutMinutes??15,scaleTimeout:e.scaleTimeout,requires:t,softRequires:e.softRequires,validateInput:e.validateInput??(()=>({ok:!0,reasons:[]})),buildPrompt:e.buildPrompt??(()=>`You are the "${e.name}" stage of the Skyramp Testbot.`),selfVerification:e.selfVerification??_Be,exitGates:e.exitGates??[QBe],prepare:e.prepare,abortIf:e.abortIf,onAbort:e.onAbort,beforeReset:e.beforeReset,teardown:e.teardown,releaseAtRunEnd:e.releaseAtRunEnd,buildMcpServers:e.buildMcpServers,buildReadDirs:e.buildReadDirs,buildPluginDirs:e.buildPluginDirs,buildSettings:e.buildSettings,renderTimeLimit:e.renderTimeLimit,namesSession:e.namesSession,resumeFrom:e.resumeFrom,requiredSkills:e.requiredSkills,buildSessionEnv:e.buildSessionEnv,dataSafetyProxy:e.dataSafetyProxy,startsApp:e.startsApp,putsBackTrackedFiles:e.putsBackTrackedFiles,allowedTools:e.allowedTools,buildDisallowedTools:e.buildDisallowedTools,captureTrace:e.captureTrace,onPassed:e.onPassed,passReason:e.passReason,adversarialReview:e.adversarialReview,retryHint:e.retryHint,beforeGates:e.beforeGates,afterAttempt:e.afterAttempt,retryNote:e.retryNote,salvage:e.salvage,checkpoint:e.checkpoint,needsSutAuth:e.needsSutAuth,triageBranch:e.triageBranch,branchSkipClears:e.branchSkipClears,branchRequires:e.branchRequires}}var DBe=["Bash(docker:*)","Bash(docker compose:*)","Bash(docker-compose:*)","Bash(bash:*)","Bash(sh:*)","Bash(.skyramp/sut/*)","Bash(./.skyramp/sut/*)","Bash(curl:*)","Bash(sleep:*)",...O9,"Read","Write","Edit"];function NBe(e){let t=e.state.stages.onboard;if(t&&(t.status==="failed"||t.status==="aborted")){let o=t.reason?` \u2014 ${t.reason.length>300?`${t.reason.slice(0,300)}\u2026`:t.reason}`:"";return{ok:!1,reasons:[`onboarding ran and did not pass (${t.status}${o}) \u2014 deploy does not replay its recipe; fix that and onboard again`]}}let n=Gs(e),s=gI(e);if(s?.status==="blocked")return{ok:!1,reasons:[`onboarding reported blocked (${s.blockers.length} blocker(s)) \u2014 see outputs/onboard.json`]};let r=e.inputs.setupEvents&&t?.status==="passed"&&s&&!e.inputs.recheck?RN(s,hI()):[];return r.length>0?{ok:!1,planned:!0,reasons:[[`onboard found the credentials the SUT needs (${r.join(", ")}); Testbot adds the ones on the repository and the next run starts the app with them`,BN(r)].filter(Boolean).join("; ")]}:n&&!n.sutRequired&&!(s&&Jf(s.status))&&!e.inputs.recheck?{ok:!1,reasons:["preflight determined no SUT is required (non-application change)"]}:xa(e.inputs.repositoryPath,n?.changedFiles.map(o=>o.path)).present?{ok:!0,reasons:[]}:{ok:!1,reasons:["no deploy recipe found (.skyramp/sut/setup.sh or health.json) \u2014 run onboarding first"]}}function PBe(e){let t=e.prepared?.recipe?.budgetMinutes;if(t===void 0)return;let n=Math.min(t+5,90);return n>25?n:void 0}function OBe(e){let t=Gs(e);return{recipe:xa(e.inputs.repositoryPath,t?.changedFiles.map(s=>s.path))}}function UBe(e,t){return[t.setupScript,t.teardownScript,t.authTokenScript].filter(n=>!!n).map(n=>Sm.relative(e,n))}function FBe(e,t="revisions"){let n=$w(e.inputs);return n.length===0?[]:["","Shared components: these run in an existing environment that this run does not deploy.",...n.map(s=>` - ${s.name} at ${s.url}, running ${s.repository}`),"For each, find the URL on its host where the RUNNING component reports its commit (a version,",`build-info or health endpoint) and record it in "${t}": the url, and what it returned,`,"VERBATIM. This gate fetches each url and reads the commit from what it returns. A checkout's","commit is not the deployed one. Cite only the components listed; leave out one you cannot","check \u2014 it is then reported unverifiable, and no runtime test runs against it."]}function xN(e){return gI(e)?.environment??e.inputs.recheckEnvironment}function MBe(e,t){return[`Tasks: the SUT is the customer's existing deployment at ${e}, already running. Never start, stop, redeploy or`,"change it, and write no setup.sh or teardown.sh: this recipe has none on purpose.","1. Sign in the way the recipe records (.skyramp/sut/get-auth-token.sh), when it has one \u2014 never echo it.","2. Health-check: run the recipe's check (.skyramp/sut/health.json) and confirm it answers with real data. Record the"," exact url/command and what it returned.",...t.healthHint?[` The recorded check: ${JSON.stringify(t.healthHint)}`]:[],'3. Record the outcome: "clean" when the check passes; "bringup-failed", with bringupError, when the deployment does',` not answer or is not ready. baseUrls: each component's address. teardown: "true", since nothing was started.`]}function LBe(e){let t=gI(e),n=e.inputs.recheck?e.inputs.recheckCredentials??[]:t?GR(t):[];if(n.length===0)return[];let s=e.inputs.sharedEnvironment,r=jf(s).map(i=>i.name);return["",`Credentials: the recipe reads ${n.join(", ")}, each from the environment variable of its name. Test each one that`,"has a value with a request that changes nothing, such as signing in with it (.skyramp/sut/get-auth-token.sh) or a GET","of an authenticated route: never one that creates, changes or deletes data.",...r.length>0?[`The shared components ${r.join(", ")} stay unchanged: test a credential they take only with a read.`]:[],...jBe(e)?["Record each one that is refused, such as with a 401 or 403 or a sign-in that fails, or that the app rejects at",'startup or bootstrap, such as a password it finds too short, in "credentialsRefused": its name, the component that',"refused it, the HTTP status when there was one, and the request or command with what came back. For one with no",'HTTP status, start that evidence with one short phrase saying why and a colon, such as "password shorter than 8','characters: <command and what came back>". Never write a value, there or anywhere. Leave out one with no value:',"Testbot reports it. A refused credential is not drift: never change the recipe to get around it. Never replace a","credential that has a value with a stand-in or a value written into the recipe, and never stop the recipe reading","it: Testbot refuses a recipe that does. When it stops the app coming up or its check passing, the outcome is",'"bringup-failed", and the credential is named.']:["Record each one that is refused, such as with a 401 or 403 or a sign-in that fails, in",'"credentialsRefused": its name, the component that refused it, the HTTP status, and the request or command with what',"came back. Never write a value, there or anywhere. Leave out one with no value: Testbot reports it. A refused","credential is not drift: never change the recipe to get around it. When it stops the app coming up or its check",'passing, the outcome is "bringup-failed", as for any other failure.']]}var jBe=e=>!!(e.inputs.recheck||e.inputs.setupEvents);function VBe(e){let{recipe:t}=e.prepared,n=e.inputs.repositoryPath,s=UBe(n,t),r=xN(e),i=e.inputs.sharedEnvironment,o=jf(i).map(a=>a.name);return['You are the "deploy" stage of the Skyramp Testbot.',"",...r?["Purpose: confirm, from a fresh session, that the existing deployment onboard found is reachable and ready, so the","recipe is proven the way every run will use it. The recipe already exists; change nothing."]:["Purpose: bring the system under test (SUT) up from its recorded recipe so","later stages can run tests against it. You do NOT design the deployment \u2014 the","recipe already exists. Execute it, verify it works, and if it has drifted","slightly out of date, correct it and continue (rather than reverting)."],"",`Repository: ${n} \u2014 work inside it.`,`Recipe files present: ${s.join(", ")||"(workspace only)"}`,"",...Q9,t.stale?`
336
336
  STALENESS WARNING: this PR changed recipe/infra files (${t.staleFiles.join(", ")}).
337
337
  The recorded recipe may no longer match. If bring-up fails, first decide
338
338
  WHY: recipe drift (infra moved, recipe is behind) vs the change itself
339
339
  breaking bring-up. Do NOT paper over a PR that broke the app.`:"","",...r?MBe(r.address,t):["Tasks:","1. Replay the recipe: run .skyramp/sut/setup.sh (or the workspace bring-up)"," even when the SUT already answers: never skip it because something is running."," Bring up every dependency you can; mock one only when deploying it here"," is genuinely infeasible. If the recipe has drifted, correct it so it works"," and update the recipe files to what actually worked. teardown.sh exits 0"," when nothing runs.","2. Seed or reset state per the recipe. Acquire the auth token the way the"," recipe records (.skyramp/sut/get-auth-token.sh) \u2014 never echo it.",...o.length?[` Leave the shared components ${o.join(", ")} unchanged: do not seed or reset them.`]:[],"3. Health-check: confirm application logic answers with real data (seeded",' data readable via a real endpoint) \u2014 NOT "port open", NOT "any HTTP',' status". Record the exact url/command and what it returned.',...t.healthHint?[" Recommended health check (recorded by onboarding \u2014 prefer it, and",` record its real output): ${JSON.stringify(t.healthHint)}`]:[],'4. Record the outcome honestly (see the schema): "change-broke-bringup" is',' published to the author as "your change broke the app" and needs evidence'," \u2014 bringupError plus suspectFiles that THIS PR changed; without a changed",' file to point at, it is "bringup-failed".'],...FBe(e),...LBe(e),"","Output: end with one JSON object matching:","",vq(Kf)," // health.output is evidence, not narration: the exact bytes, with NOTHING"," // appended \u2014 no gloss on what the response proves, no list of the other probes"," // you ran. This gate RE-RUNS the check and matches the fresh output against this"," // field, so a sentence added here describes a run nobody can reproduce. Say what"," // it means in your prose answer instead."," // On a failed bring-up, baseUrls/health may be omitted \u2014 never invent a URL for an app that didn't start."].filter(a=>a!==void 0).join(`
340
- `)}function M9(e){let t=Sm.join(e.outputsDir,"deploy.txt");if(AI.existsSync(t)){let{deploy:s}=Ru({exitCode:0,stdout:AI.readFileSync(t,"utf-8"),stderr:"",timedOut:!1,durationMs:0});if(s?.teardown)return{argv:["sh","-c",s.teardown],label:"deploy.json's teardown"}}let{teardownScript:n}=xa(e.inputs.repositoryPath);if(n)return{argv:["bash",n],label:Sm.join(".skyramp","sut","teardown.sh")}}function L9(e,t){return yw(t,e.inputs.repositoryPath,{env:pt(),secretValues:e.secretValues})}async function F9(e){let t=M9(e);if(t){let n=await L9(e,t);if(n&&hZ(e))throw new Error(`SUT teardown failed: ${n}`)}}async function GBe(e,t){let n=t.passed?void 0:j9(e);if(!n)return;let s=await L9(e,n);return s&&`${s} (if nothing was running, a teardown must exit 0)`}function j9(e){return xN(e)?void 0:M9(e)}function zBe(e){if(j9(e))return"Testbot tore down the SUT the previous attempt started. Bring it up again from the start: run .skyramp/sut/setup.sh (or the workspace bring-up), even if something still answers. Never reuse what is running."}function qBe(e,t){let{deploy:n}=Ru(t,e.inputs.repositoryPath,e.secretValues);if(!n)return;if(n.outcome==="bringup-failed"){let r=Lt(n.bringupError?.output?.trim()??"",e.secretValues??[]);return`bring-up failed (environment) \u2014 no live app for later stages${r?`: ${r.slice(0,160)}`:""}`}if(n.outcome==="change-broke-bringup")return"this PR broke bring-up \u2014 recorded as a finding, no live app for later stages";let s=Yg(e).map(r=>r.name);if(s.length)return`the shared environment's ${s.join(", ")} does not verifiably run the revision under validation \u2014 no runtime test runs against it`}var V9=U9({name:"deploy",model:"opus",timeoutMinutes:25,requires:["preflight"],softRequires:["onboard"],startsApp:e=>!e.inputs.appRunning&&!(e.inputs.testEnvironment&&xN(e)),triageBranch:"runtime",validateInput:NBe,prepare:OBe,scaleTimeout:PBe,buildPrompt:VBe,allowedTools:DBe,buildSessionEnv:()=>({...T9}),selfVerification:["dependencies lists every backing service, true only if really deployed \u2014 a mocked one is false, never omitted.","Your final message is one JSON object matching the schema."],exitGates:[_w(),fK()],onPassed:async(e,t)=>({...gK(e,t),...await hK(e,t)}),passReason:qBe,afterAttempt:GBe,retryNote:zBe,onAbort:F9,teardown:F9});On();var xet=20*1024*1024;var ko=G(require("fs"));var z9=G(require("path"));var Met=z9.join(".skyramp","sut","get-auth-token.sh");var $N="\\$([A-Z][A-Z0-9_]{0,99})",Let=new RegExp(`^${$N}$`),jet=new RegExp(`^${$N}:${$N}$`);var dtt=new Set([...AD,"coverage",".nyc_output","htmlcov","TestResults"]);var cnt=3*6e4;var unt=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;var WBe=["GH_TOKEN","GITHUB_TOKEN","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_CONTAINER_AUTHORIZATION_TOKEN"],YBe=["AWS_WEB_IDENTITY_TOKEN_FILE","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"];function ZBe(e){if(e)try{return ko.statSync(e).size>64*1024?void 0:ko.readFileSync(e,"utf8").trim()||void 0}catch{return}}function q9(e=process.env){return Rh([...WBe.map(t=>e[t]),...YBe.map(t=>ZBe(e[t]))])}var yI=G(require("fs")),TN=G(require("path"));function KBe(e){let t;try{t=yI.readdirSync(e)}catch{return[]}let n=t.filter(s=>/^session-[0-9a-f-]{36}$/.test(s)).map(s=>TN.join(e,s)).filter(s=>yI.lstatSync(s,{throwIfNoEntry:!1})?.isDirectory());return[e,...n.sort()]}function XBe(e,t){let n;try{n=new URL(e)}catch{return}if(n.protocol!=="http:"&&n.protocol!=="https:")return;let s=xh(ki(`${n.protocol}//${n.host}${n.pathname}`,t),t);return zz.safeParse({records:[s],unlisted:0}).success?s:void 0}function H9(e,t){let n=TN.join(e,Fg),s=KBe(n).flatMap(c=>[J_(c,!0,new Set),J_(c,!1,new Set)]),{leftovers:r,unparsedCreates:i}=fZ(s.flatMap(c=>c.ledgers)),o=[],a=i.length+s.flatMap(c=>c.failures).length;for(let c of new Set(r)){let u=XBe(c,t);u===void 0||o.includes(u)||o.length>=pB?a+=1:o.push(u)}return o.length+a>0?{records:o,unlisted:a}:void 0}var Dnt=new RegExp(id.source,"g");var txe="https://testbot.skyramp.dev",Di={attemptId:"v3AttemptId",deadlineAt:"v3DeadlineAt",reportUploaded:"v3ReportUploaded",recipeUploaded:"v3RecipeUploaded",recipeStatus:"v3RecipeStatus",revisionsUploaded:"v3RevisionsUploaded",cause:"v3Cause",conflict:"v3Conflict",githubWrites:"v3GithubWrites",credentialNames:"v3CredentialNames"};function J9(e,t,n){return{origin:e,idToken:t,sourceToken:n,mask:s=>Wi(s),log:s=>ls(s),onTokenRefused:(s,r)=>{rxe(s)&&W9.set(r,s)},onTokenGranted:s=>{W9.delete(s)}}}var W9=new Map;var fit=["setup_failed","checkout_failed","environment_unverified"];function nxe(e,t){return t.getTime()>=e.getTime()}function rxe(e){return e instanceof _i||e instanceof So&&e.code!=="CREDENTIALS_UNAVAILABLE"}var hit={cancelled:"Skyramp cancelled this run",expired:"this attempt passed its deadline in Skyramp",ended:"Skyramp already ended this attempt"},git={cancelled:"attempt-cancelled",expired:"attempt-closed",ended:"attempt-closed"},mit={cancelled:"cancelled",expired:"timed_out",ended:"agent_failed"};var Ait={analyze:"analyze",triage:"analyze",recommend:"recommend",generate:"generate","generate-ui":"generate","generate-unit":"generate",adapt:"generate",write:"generate",onboard:"execute",deploy:"execute","native-run":"execute",deliver:"deliver"},yit={analyze:"change analysis",recommend:"test recommendations",generate:"test generation",execute:"test execution",deliver:"opening a pull request with the tests"};function Y9(){return je("skyrampAppOrigin").trim()||txe}var Eit=10*6e4;var vit={onboard:"onboard",deploy:"deploy"},bit={plan:{stage:"validation_plan",text:"Working out what to validate, and bringing up what it needs"},write:{stage:"tests",text:"Writing and running the tests"},"generate-unit":{stage:"tests",text:"Writing unit tests"},"native-run":{stage:"tests",text:"Running the unit tests"}},wit=new Set(["write","native-run"]);function sxe(){let e=Us(Di.conflict);if(!e)return;let t;try{t=cq.safeParse(JSON.parse(e))}catch(n){Dt(`Testbot V3: the saved merge conflict is not JSON (${n instanceof Error?n.message:String(n)})`);return}if(t.success)return t.data;Dt(`Testbot V3: the saved merge conflict breaks the contract (${t.error.issues.map(n=>`${n.path.join(".")}: ${n.message}`).join("; ")})`)}function ixe(){let e=Us(Di.githubWrites);if(!e)return[];let t;try{t=JSON.parse(e)}catch(n){return Dt(`Testbot V3: the saved GitHub writes are not JSON (${n instanceof Error?n.message:String(n)})`),[]}return Array.isArray(t)?t.flatMap(n=>{let s=jE.safeParse(n);return s.success?[s.data]:[]}).slice(0,LE):[]}function oxe(){let e=Us(Di.credentialNames).split(",").filter(Boolean),t=Rh([...e.map(n=>process.env[n]),...Object.values(Lf()),...q9()]);try{let n=H9(Z9.join(dq(),"outputs"),t);return n&&ls(`Testbot V3: this run uploaded nothing and created ${n.records.length+n.unlisted} record(s) in the shared environment that it did not see removed; sending them to Skyramp.`),n}catch(n){let s=n instanceof Error?n.message:String(n);Dt(`Testbot V3: could not read what this run created in the shared environment (${s})`);return}}async function K9(){let e=Us(Di.attemptId);if(!e)return;let t=Us(Di.reportUploaded)==="true",n=Us(Di.recipeUploaded)==="true",s=Us(Di.revisionsUploaded)==="true",r=Us(Di.deadlineAt),i=Us(Di.cause)||void 0;!i&&!t&&!n&&!s&&r&&nxe(new Date(r),new Date)&&(i="timed_out");let o=Xd().takeIdToken(),a=sxe(),c={attemptId:e,reportUploaded:t,recipeUploaded:n,revisionsUploaded:s,cause:i,...a?{conflict:a}:{},githubWrites:ixe()},u=!t&&!n&&!s?oxe():void 0,l;try{l=await kN({...c,...u?{sharedEnvironmentRecords:u}:{}},J9(Y9(),o))}catch(h){if(!u||!(h instanceof So)||h.status!==400)throw h;Dt(`Testbot V3: Skyramp refused the end; ending again without the shared-environment records (${h.message}); the attempt ends without them.`),l=await kN(c,J9(Y9(),o))}let p=Us(Di.recipeStatus);n&&p?ls(`Testbot V3: attempt ended; the setup ended ${p==="ready"?"Ready":"blocked (Needs input)"}.`):ls(`Testbot V3: attempt ended; the run's outcome in Skyramp is ${l.outcome??"not final yet"}.`)}var X9=require("child_process"),Ni=G(require("fs")),_N=G(require("path")),DN=require("string_decoder");var axe="skyramp-testbot-state",cxe=/^\$\([^)]*\)$/;function uxe(e){for(let[t,n]of Object.entries(e))n!==void 0&&cxe.test(n)&&delete e[t]}function lxe(e){let t={},n=Ni.existsSync(e)?Ni.readFileSync(e,"utf-8"):"",s=/^([^\r\n<]+)<<(\S+)\r?\n([\s\S]*?)\r?\n\2\r?$/gm;for(let r=s.exec(n);r;r=s.exec(n))t[r[1]]=r[3];return t}function e3(e,t={}){let n=t.env??process.env;if(!$a(n))return!1;uxe(n),$Z(n);let s=n.AGENT_TEMPDIRECTORY||n.RUNNER_TEMP;if(s){n.RUNNER_TEMP??=s;let o=_N.join(s,axe);if(e==="main")Ni.writeFileSync(o,"",{mode:384});else for(let[a,c]of Object.entries(lxe(o)))n[`STATE_${a}`]=c;n.GITHUB_STATE=o;for(let[a,c]of[["GITHUB_OUTPUT","output"],["GITHUB_ENV","env"],["GITHUB_PATH","path"],["GITHUB_STEP_SUMMARY",`summary-${e}.md`]])n[a]=_N.join(s,`skyramp-testbot-${c}`),Ni.writeFileSync(n[a],"",{mode:384})}let r=t.stdout??n===process.env;r&&dxe(n,t.write);let i=n.GITHUB_STEP_SUMMARY;if(r&&i){let o=t.write??(a=>eD(a.replace(/\n$/,"")));process.once("exit",()=>{Ni.existsSync(i)&&Ni.statSync(i).size>0&&o(`${vw("task.uploadsummary",{},i)}
340
+ `)}function M9(e){let t=Sm.join(e.outputsDir,"deploy.txt");if(AI.existsSync(t)){let{deploy:s}=Ru({exitCode:0,stdout:AI.readFileSync(t,"utf-8"),stderr:"",timedOut:!1,durationMs:0});if(s?.teardown)return{argv:["sh","-c",s.teardown],label:"deploy.json's teardown"}}let{teardownScript:n}=xa(e.inputs.repositoryPath);if(n)return{argv:["bash",n],label:Sm.join(".skyramp","sut","teardown.sh")}}function L9(e,t){return yw(t,e.inputs.repositoryPath,{env:pt(),secretValues:e.secretValues})}async function F9(e){let t=M9(e);if(t){let n=await L9(e,t);if(n&&hZ(e))throw new Error(`SUT teardown failed: ${n}`)}}async function GBe(e,t){let n=t.passed?void 0:j9(e);if(!n)return;let s=await L9(e,n);return s&&`${s} (if nothing was running, a teardown must exit 0)`}function j9(e){return xN(e)?void 0:M9(e)}function zBe(e){if(j9(e))return"Testbot tore down the SUT the previous attempt started. Bring it up again from the start: run .skyramp/sut/setup.sh (or the workspace bring-up), even if something still answers. Never reuse what is running."}function qBe(e,t){let{deploy:n}=Ru(t,e.inputs.repositoryPath,e.secretValues);if(!n)return;if(n.outcome==="bringup-failed"){let r=Lt(n.bringupError?.output?.trim()??"",e.secretValues??[]);return`bring-up failed (environment) \u2014 no live app for later stages${r?`: ${r.slice(0,160)}`:""}`}if(n.outcome==="change-broke-bringup")return"this PR broke bring-up \u2014 recorded as a finding, no live app for later stages";let s=Yg(e).map(r=>r.name);if(s.length)return`the shared environment's ${s.join(", ")} does not verifiably run the revision under validation \u2014 no runtime test runs against it`}var V9=U9({name:"deploy",model:"opus",timeoutMinutes:25,requires:["preflight"],softRequires:["onboard"],startsApp:e=>!e.inputs.appRunning&&!(e.inputs.testEnvironment&&xN(e)),triageBranch:"runtime",validateInput:NBe,prepare:OBe,scaleTimeout:PBe,buildPrompt:VBe,allowedTools:DBe,buildSessionEnv:()=>({...T9}),selfVerification:["dependencies lists every backing service, true only if really deployed \u2014 a mocked one is false, never omitted.","Your final message is one JSON object matching the schema."],exitGates:[_w(),fK()],onPassed:async(e,t)=>({...gK(e,t),...await hK(e,t)}),passReason:qBe,afterAttempt:GBe,retryNote:zBe,onAbort:F9,teardown:F9});On();var $et=20*1024*1024;var ko=G(require("fs"));var z9=G(require("path"));var Let=z9.join(".skyramp","sut","get-auth-token.sh");var $N="\\$([A-Z][A-Z0-9_]{0,99})",jet=new RegExp(`^${$N}$`),Vet=new RegExp(`^${$N}:${$N}$`);var ptt=new Set([...AD,"coverage",".nyc_output","htmlcov","TestResults"]);var unt=3*6e4;var lnt=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;var WBe=["GH_TOKEN","GITHUB_TOKEN","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_CONTAINER_AUTHORIZATION_TOKEN"],YBe=["AWS_WEB_IDENTITY_TOKEN_FILE","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"];function ZBe(e){if(e)try{return ko.statSync(e).size>64*1024?void 0:ko.readFileSync(e,"utf8").trim()||void 0}catch{return}}function q9(e=process.env){return Rh([...WBe.map(t=>e[t]),...YBe.map(t=>ZBe(e[t]))])}var yI=G(require("fs")),TN=G(require("path"));function KBe(e){let t;try{t=yI.readdirSync(e)}catch{return[]}let n=t.filter(s=>/^session-[0-9a-f-]{36}$/.test(s)).map(s=>TN.join(e,s)).filter(s=>yI.lstatSync(s,{throwIfNoEntry:!1})?.isDirectory());return[e,...n.sort()]}function XBe(e,t){let n;try{n=new URL(e)}catch{return}if(n.protocol!=="http:"&&n.protocol!=="https:")return;let s=xh(ki(`${n.protocol}//${n.host}${n.pathname}`,t),t);return zz.safeParse({records:[s],unlisted:0}).success?s:void 0}function H9(e,t){let n=TN.join(e,Fg),s=KBe(n).flatMap(c=>[J_(c,!0,new Set),J_(c,!1,new Set)]),{leftovers:r,unparsedCreates:i}=fZ(s.flatMap(c=>c.ledgers)),o=[],a=i.length+s.flatMap(c=>c.failures).length;for(let c of new Set(r)){let u=XBe(c,t);u===void 0||o.includes(u)||o.length>=pB?a+=1:o.push(u)}return o.length+a>0?{records:o,unlisted:a}:void 0}var Nnt=new RegExp(id.source,"g");var txe="https://testbot.skyramp.dev",Di={attemptId:"v3AttemptId",deadlineAt:"v3DeadlineAt",reportUploaded:"v3ReportUploaded",recipeUploaded:"v3RecipeUploaded",recipeStatus:"v3RecipeStatus",revisionsUploaded:"v3RevisionsUploaded",cause:"v3Cause",conflict:"v3Conflict",githubWrites:"v3GithubWrites",credentialNames:"v3CredentialNames"};function J9(e,t,n){return{origin:e,idToken:t,sourceToken:n,mask:s=>Wi(s),log:s=>ls(s),onTokenRefused:(s,r)=>{rxe(s)&&W9.set(r,s)},onTokenGranted:s=>{W9.delete(s)}}}var W9=new Map;var hit=["setup_failed","checkout_failed","environment_unverified"];function nxe(e,t){return t.getTime()>=e.getTime()}function rxe(e){return e instanceof _i||e instanceof So&&e.code!=="CREDENTIALS_UNAVAILABLE"}var git={cancelled:"Skyramp cancelled this run",expired:"this attempt passed its deadline in Skyramp",ended:"Skyramp already ended this attempt"},mit={cancelled:"attempt-cancelled",expired:"attempt-closed",ended:"attempt-closed"},Ait={cancelled:"cancelled",expired:"timed_out",ended:"agent_failed"};var yit={analyze:"analyze",triage:"analyze",recommend:"recommend",generate:"generate","generate-ui":"generate","generate-unit":"generate",adapt:"generate",write:"generate",onboard:"execute",deploy:"execute","native-run":"execute",deliver:"deliver"},Eit={analyze:"change analysis",recommend:"test recommendations",generate:"test generation",execute:"test execution",deliver:"opening a pull request with the tests"};function Y9(){return je("skyrampAppOrigin").trim()||txe}var vit=10*6e4;var bit={onboard:"onboard",deploy:"deploy"},wit={plan:{stage:"validation_plan",text:"Working out what to validate, and bringing up what it needs"},write:{stage:"tests",text:"Writing and running the tests"},"generate-unit":{stage:"tests",text:"Writing unit tests"},"native-run":{stage:"tests",text:"Running the unit tests"}},Iit=new Set(["write","native-run"]);function sxe(){let e=Us(Di.conflict);if(!e)return;let t;try{t=cq.safeParse(JSON.parse(e))}catch(n){Dt(`Testbot V3: the saved merge conflict is not JSON (${n instanceof Error?n.message:String(n)})`);return}if(t.success)return t.data;Dt(`Testbot V3: the saved merge conflict breaks the contract (${t.error.issues.map(n=>`${n.path.join(".")}: ${n.message}`).join("; ")})`)}function ixe(){let e=Us(Di.githubWrites);if(!e)return[];let t;try{t=JSON.parse(e)}catch(n){return Dt(`Testbot V3: the saved GitHub writes are not JSON (${n instanceof Error?n.message:String(n)})`),[]}return Array.isArray(t)?t.flatMap(n=>{let s=jE.safeParse(n);return s.success?[s.data]:[]}).slice(0,LE):[]}function oxe(){let e=Us(Di.credentialNames).split(",").filter(Boolean),t=Rh([...e.map(n=>process.env[n]),...Object.values(Lf()),...q9()]);try{let n=H9(Z9.join(dq(),"outputs"),t);return n&&ls(`Testbot V3: this run uploaded nothing and created ${n.records.length+n.unlisted} record(s) in the shared environment that it did not see removed; sending them to Skyramp.`),n}catch(n){let s=n instanceof Error?n.message:String(n);Dt(`Testbot V3: could not read what this run created in the shared environment (${s})`);return}}async function K9(){let e=Us(Di.attemptId);if(!e)return;let t=Us(Di.reportUploaded)==="true",n=Us(Di.recipeUploaded)==="true",s=Us(Di.revisionsUploaded)==="true",r=Us(Di.deadlineAt),i=Us(Di.cause)||void 0;!i&&!t&&!n&&!s&&r&&nxe(new Date(r),new Date)&&(i="timed_out");let o=Xd().takeIdToken(),a=sxe(),c={attemptId:e,reportUploaded:t,recipeUploaded:n,revisionsUploaded:s,cause:i,...a?{conflict:a}:{},githubWrites:ixe()},u=!t&&!n&&!s?oxe():void 0,l;try{l=await kN({...c,...u?{sharedEnvironmentRecords:u}:{}},J9(Y9(),o))}catch(h){if(!u||!(h instanceof So)||h.status!==400)throw h;Dt(`Testbot V3: Skyramp refused the end; ending again without the shared-environment records (${h.message}); the attempt ends without them.`),l=await kN(c,J9(Y9(),o))}let p=Us(Di.recipeStatus);n&&p?ls(`Testbot V3: attempt ended; the setup ended ${p==="ready"?"Ready":"blocked (Needs input)"}.`):ls(`Testbot V3: attempt ended; the run's outcome in Skyramp is ${l.outcome??"not final yet"}.`)}var X9=require("child_process"),Ni=G(require("fs")),_N=G(require("path")),DN=require("string_decoder");var axe="skyramp-testbot-state",cxe=/^\$\([^)]*\)$/;function uxe(e){for(let[t,n]of Object.entries(e))n!==void 0&&cxe.test(n)&&delete e[t]}function lxe(e){let t={},n=Ni.existsSync(e)?Ni.readFileSync(e,"utf-8"):"",s=/^([^\r\n<]+)<<(\S+)\r?\n([\s\S]*?)\r?\n\2\r?$/gm;for(let r=s.exec(n);r;r=s.exec(n))t[r[1]]=r[3];return t}function e3(e,t={}){let n=t.env??process.env;if(!$a(n))return!1;uxe(n),$Z(n);let s=n.AGENT_TEMPDIRECTORY||n.RUNNER_TEMP;if(s){n.RUNNER_TEMP??=s;let o=_N.join(s,axe);if(e==="main")Ni.writeFileSync(o,"",{mode:384});else for(let[a,c]of Object.entries(lxe(o)))n[`STATE_${a}`]=c;n.GITHUB_STATE=o;for(let[a,c]of[["GITHUB_OUTPUT","output"],["GITHUB_ENV","env"],["GITHUB_PATH","path"],["GITHUB_STEP_SUMMARY",`summary-${e}.md`]])n[a]=_N.join(s,`skyramp-testbot-${c}`),Ni.writeFileSync(n[a],"",{mode:384})}let r=t.stdout??n===process.env;r&&dxe(n,t.write);let i=n.GITHUB_STEP_SUMMARY;if(r&&i){let o=t.write??(a=>eD(a.replace(/\n$/,"")));process.once("exit",()=>{Ni.existsSync(i)&&Ni.statSync(i).size>0&&o(`${vw("task.uploadsummary",{},i)}
341
341
  `)})}return!0}function dxe(e,t){let n=process.stdout.write.bind(process.stdout),s=o=>e[Lg]==="1"?X_(o,e):void n(o.command!==void 0?`${o.command}
342
342
  `:o.text??""),r=t??(o=>s({command:o.replace(/\n$/,"")})),i=t??(o=>s({text:o}));process.stdout.write=((o,...a)=>{let c=typeof o=="string"?o:Buffer.from(o).toString("utf-8"),u="";for(let p of c.split(/(?<=\n)/)){let h=p.startsWith("::")?IZ(p):void 0;if(!h){u+=p;continue}u&&i(u),u="";for(let g of h)r(`${g}
343
343
  `)}return u&&i(u),a.find(p=>typeof p=="function")?.(),!0})}var pxe=64*1024;function QN(e){let t=new DN.StringDecoder("utf8"),n="",s=r=>e(Ew(r));return{push(r){n+=typeof r=="string"?r:t.write(r);let i=n.lastIndexOf(`