@skyramp/testbot-core 0.13.1-v3.472 → 0.13.1-v3.474
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/VERSION.json +1 -1
- package/dist/main.js +3 -3
- package/dist/post.js +20 -20
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -175,11 +175,11 @@ If the error persists, please check whether Actions and API requests are operati
|
|
|
175
175
|
# Written by ${r}: the recorded command, which needed a shell to run.
|
|
176
176
|
set -euo pipefail
|
|
177
177
|
${n}
|
|
178
|
-
`,{mode:493})}catch{return}return`bash ${ju(t)}`}}function ju(e){return`'${e.split("'").join("'\\''")}'`}var rE="data-safety-isolation.json",CI="data-safety-isolation-ready.json",Oi=new Map,L7=new Map;function U7(){let e=process.versions.bun&&process.argv[1]?.startsWith("/$bunfs/")?process.execPath:process.argv[1];return ct.realpathSync(e)}function OQe(){let e=U7();return[e,Ct.join(Ct.dirname(e),"data-safety-worker.js")]}function xI(e){let t=ct.openSync(e,"r"),r=Buffer.alloc(4);try{if(ct.readSync(t,r,0,4,0)!==4)return!1}finally{ct.closeSync(t)}let n=r.readUInt32BE(0);return n===2135247942||[4277009102,4277009103,3405691582,3405691583,3472551422,3489328638,3199925962,3216703178].includes(n)}function rj(e,t){e.protectedPaths?.includes(t)||(e.protectedPaths??=[]).push(t)}function II(e){let t=e.map(n=>{try{return ct.realpathSync(n)}catch{return Ct.resolve(n)}}),r=process.versions.bun?(process.env.PATH??"/usr/bin:/bin").split(Ct.delimiter).filter(Ct.isAbsolute).map(n=>Ct.join(n,"node")):[process.execPath];for(let n of r)try{let s=ct.realpathSync(n);if(ct.accessSync(s,ct.constants.X_OK),af(t,s)||!ct.statSync(s).isFile()||!xI(s))continue;let i=qu(e[0]);return i&&rj(i,s),s}catch{}throw new Error("an absolute native Node executable outside sandbox-writable locations is required for isolation")}var ej=/^(NODE_OPTIONS|NODE_PATH|BASH_ENV|BASHOPTS|SHELLOPTS|PS4|PROMPT_COMMAND|BASH_XTRACEFD|BASH_LOADABLES_PATH|ENV|ZDOTDIR|PYTHONPATH|PYTHONHOME|RUBYOPT|PERL5OPT|PERL5LIB|GCONV_PATH|OPENSSL_CONF|OPENSSL_ENGINES|LD_.*|DYLD_.*|BASH_FUNC_.*)$/,DQe=/^(BASH_FUNC_.*|PS4|PROMPT_COMMAND)$/;function cf(e,t){let r={...t};r.PATH=e.bootstrapPath??nj(e.roots,process.env.PATH??"/usr/bin:/bin").map(n=>(rj(e,n),n)).join(Ct.delimiter),e.bootstrapPath=r.PATH,r.HOME=process.env.HOME,r.SHELL="/bin/bash";for(let n of["TMPDIR","TMP","TEMP"])process.env[n]?r[n]=process.env[n]:delete r[n];for(let n of Object.keys(r))ej.test(n)&&delete r[n];return r}function nj(e,t){return t.split(Ct.delimiter).flatMap(r=>{if(!Ct.isAbsolute(r))return[];try{let n=ct.realpathSync(r);if(af(e,n)||e.some(s=>tE(n,s)))return[];for(let s of ct.readdirSync(n)){let i=Ct.join(n,s);try{ct.accessSync(i,ct.constants.X_OK)}catch{continue}if(ct.statSync(i).isFile()&&af(e,ct.realpathSync(i)))return[]}return[n]}catch{return[]}})}var tE=(e,t)=>t===e||t.startsWith(e+Ct.sep);function af(e,t){let r=["/tmp/claude","/private/tmp/claude"].map(n=>{try{return ct.realpathSync(n)}catch{return n}});return[...e,...r].some(n=>tE(n,t))}var j7="Testbot could not install it because the Ubuntu package source was unavailable. Run the validation again later",MQe=new Set;function q7(e){MQe=new Set(e)}function kP(e,t,r,n=s=>Zr(e,s)){let s=t.includes(Ct.sep)?[Ct.resolve(r,t)]:(cf(e,{PATH:process.env.PATH}).PATH??"").split(Ct.delimiter).map(i=>Ct.join(i,t));for(let i of s)try{if(ct.accessSync(i,ct.constants.X_OK),ct.statSync(i).isFile())return ct.realpathSync(i)}catch{}throw n(`a trusted executable could not be resolved (${t})${MQe.has(t)?`: ${j7}`:""}`)}function Py(e,t,r,n=[],s=[]){let i=f=>{try{return ct.realpathSync(f)}catch{return Ct.resolve(f)}},o=i(t),a=[...new Set([o,...s,...[...Oi.values()].flatMap(f=>f.roots)].map(i))],c={roots:a,ctx:{outputsDir:o},statusFile:""},u=cf(c,r),l=kP(c,e,o,f=>new Error(`Host transport unavailable: ${f}`));if(af(a,l)||!xI(l))throw new Error(`Host transport requires a native host executable outside writable run roots (${e})`);let d=[l,...c.protectedPaths??[]];for(let f of n){let h;try{h=ct.realpathSync(f)}catch{throw new Error(`Host transport asset is unavailable (${f})`)}if(af(a,h)||!ct.statSync(h).isFile())throw new Error(`Host transport asset must be a file outside writable run roots (${f})`);d.push(h)}let p=L7.get(o)??new Set;d.forEach(f=>p.add(f)),L7.set(o,p);for(let f of Oi.values())d.forEach(h=>rj(f,h));return{executable:l,env:u}}function sj(e,t){let r=e.bootstrapExecutables?.get(t);if(r)return r;let n=kP(e,t,e.roots[0]);return kI(e.roots[0],[{command:n}],[],[],!0),(e.bootstrapExecutables??=new Map).set(t,n),n}function FQe(e,t=process.platform){let r=qu(e);if(!r)return{};let n=["which","bash","sh","env",...t==="linux"?["rg","bwrap","socat"]:["sandbox-exec","log"]];return Object.fromEntries(n.map(s=>[s,sj(r,s)]))}function RI(e,t){let r=qu(e);return r?{executable:sj(r,t),env:cf(r,{PATH:process.env.PATH,HOME:process.env.HOME})}:{executable:t,env:process.env}}function qu(e){let t=Ct.resolve(e);try{t=ct.realpathSync(e)}catch{}let r=[...Oi.values()],n=r.find(s=>s.roots.some(i=>tE(i,t)));if(n)return n;if(r.length===1)return r[0];if(r.length>1)throw Zr(r[0],"a command outside the run roots has no unambiguous safety boundary")}function Zr(e,t){return e.failure=t,dm(e.ctx,t),new Error(`Shared-environment isolation unavailable: ${t}`)}function dm(e,t){let r=Oi.get(e.outputsDir);r&&(r.incident=t),ct.mkdirSync(e.outputsDir,{recursive:!0});let n=Ct.join(e.outputsDir,rE),s=`${n}.${(0,$Qe.randomUUID)()}.tmp`;ct.writeFileSync(s,JSON.stringify({reason:"isolation_unavailable",detail:t,actionRequired:!0},null,2),{mode:384,flag:"wx"}),ct.renameSync(s,n)}var QQe="Testbot cannot yet start part of the app on the runner for a shared-environment run: inside its sandbox, a server one command starts cannot be reached from the next. Test against a Test Environment where the whole app is already deployed";function LQe(e,t){let r=qu(e);if(r)throw Zr(r,t)}function z7(e,t){let r=qu(e);r&&dm(r.ctx,t)}function UQe(e){return Oi.get(e.outputsDir)?.enforced===!0&&!Zi(e)}function Zi(e){let t=Oi.get(e.outputsDir);if(t?.failure||t?.incident)return t.failure??t.incident;try{let r=JSON.parse(ct.readFileSync(Ct.join(e.outputsDir,rE),"utf8"));return typeof r.detail=="string"&&r.detail?r.detail:"the isolation failure record is unreadable or incomplete"}catch(r){return r.code==="ENOENT"?void 0:"the isolation failure record is unreadable or incomplete"}}function kI(e,t,r=[],n=[],s=!1){let i=qu(e);if(!i)return t.map(f=>({command:f.command,args:[...f.args??[]]}));let o=f=>{i.protectedPaths?.includes(f)||(i.protectedPaths??=[]).push(f)},a=new Set,c=new Set,u=f=>{try{return ct.realpathSync(f)}catch{throw Zr(i,`unresolved tool asset: ${f}`)}},l=f=>{let h=u(f);if(af(i.roots,h)||i.roots.some(y=>tE(h,y)))throw Zr(i,"a configured tool package or dependency is installed in a sandbox-writable location");o(h);let g=y=>{if(!a.has(y)){a.add(y);for(let m of ct.readdirSync(y,{withFileTypes:!0})){let A=Ct.join(y,m.name);if(m.isSymbolicLink()){let w=u(A);if(af(i.roots,w))throw Zr(i,"a configured tool dependency is installed in a sandbox-writable location");ct.statSync(w).isDirectory()?l(w):d(w)}else m.isDirectory()&&g(A)}}};g(h)},d=(f,h=!1,g=!1)=>{let y=u(f);if(af(i.roots,y))throw Zr(i,"a configured tool executable or package is installed in a sandbox-writable location");if(o(y),!h&&c.has(y))return;c.add(y);let m,A=ct.openSync(y,"r"),w=Buffer.alloc(256);try{ct.readSync(A,w,0,w.length,0)}finally{ct.closeSync(A)}if(h){let E=w.toString().split(/\r?\n/,1)[0];if(E.startsWith("#!")){let x=E.slice(2).trim().split(/\s+/),R=x[0];if(Ct.basename(R)==="env"){let N=kP(i,R,e);if(af(i.roots,N)||!xI(N))throw Zr(i,`unsafe shebang launcher: ${R}`);o(N),x.shift(),x[0]==="-S"&&x.shift()}let v=ct.statSync(y),I=s&&(tE("/usr/bin",y)||tE("/bin",y))&&v.uid===0&&(v.mode&18)===0&&/^(?:sh|bash)$/.test(Ct.basename(x[0]));if(x.length!==1||!/^(?:node|nodejs|bun)$/.test(Ct.basename(x[0]))&&!I)throw Zr(i,"unsupported tool launcher: use a native executable or a plain Node/Bun script without interpreter flags");if(m=kP(i,x[0],e),af(i.roots,m)||!xI(m))throw Zr(i,`unsafe shebang interpreter: ${x[0]}`);o(m)}else if(!xI(y))throw Zr(i,"unsupported tool launcher: use a native executable or a plain Node/Bun script")}if(g||/\.[cm]?[jt]s$/.test(y)||/^#![^\n]*(?:node|nodejs|bun)\b/.test(w.toString())){let E=Ct.dirname(y);for(let x=E;;x=Ct.dirname(x)){if(ct.existsSync(Ct.join(x,"package.json"))){E=x;break}if(Ct.dirname(x)===x)break}l(E);for(let x=E;;x=Ct.dirname(x)){let R=Ct.join(x,"node_modules");if(ct.existsSync(R)&&ct.statSync(R).isDirectory()&&l(R),Ct.basename(x)==="node_modules"&&l(x),Ct.dirname(x)===x)break}}return m},p=[];for(let f of t){let h=kP(i,f.command,e),g=d(h,!0),y=Ct.basename(ct.realpathSync(h));if(!s&&/^(?:sh|bash|dash|zsh|ksh|fish|csh|tcsh|python[\d.]*|pypy[\d.]*|perl[\d.]*|ruby[\d.]*|php[\d.]*|lua[\d.]*|java|deno|uv|uvx|pipx|poetry|pdm|Rscript|pwsh|powershell|env|xargs|nohup|nice|stdbuf|timeout)$/.test(y))throw Zr(i,"unsupported tool launcher: dynamic interpreters and forwarding wrappers cannot retain their executable dependencies");if(!s&&/^(?:npm-cli|npx-cli)\.js$/.test(y)&&f.args?.length)throw Zr(i,"unsupported tool launcher: dynamic package commands cannot retain their executable dependencies");let m;if(!s&&/^(?:node|nodejs|bun)$/.test(y)){let A=f.args??[],w=A[0]==="--"||y==="bun"&&A[0]==="run"?A[1]:A[0];if(!w||w.startsWith("-")||!ct.existsSync(Ct.resolve(e,w))||!ct.statSync(Ct.resolve(e,w)).isFile())throw Zr(i,"unsupported tool launcher: Node/Bun tools require a script file entry without eval, module or preload flags");m=Ct.resolve(e,w)}p.push(g&&!s?{command:g,args:[h,...f.args??[]]}:{command:h,args:[...f.args??[]]});for(let A of f.args??[]){let w=Ct.resolve(e,A);!A.startsWith("-")&&ct.existsSync(w)&&ct.statSync(w).isFile()&&d(w,!1,w===m)}}for(let f of r)d(f);for(let f of n){let h=u(f);l(h);let g=w=>{d(w);try{return JSON.parse(ct.readFileSync(w,"utf8"))}catch{throw Zr(i,`the plugin configuration could not be read: ${w}`)}},y=w=>{if(!w||typeof w!="object")return;if(Array.isArray(w)){w.forEach(y);return}let E=w;if(E.type==="command"){if(typeof E.command!="string")throw Zr(i,"the plugin command hook has no literal command");let x=ic(E.command.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g,h));if(!x.steps)throw Zr(i,"the plugin command hook needs a literal native/Node command whose assets can be retained");for(let R of x.steps)kI(e,[{command:R[0],args:R.slice(1)}])}Object.values(E).forEach(y)},m=Ct.join(h,".claude-plugin/plugin.json");if(ct.existsSync(m)){let w=g(m);if(!w||typeof w!="object"||Array.isArray(w))throw Zr(i,"the plugin manifest is not an object");let E=w;if(E.mcpServers)throw Zr(i,"declare plugin MCP servers through the run's validated MCP configuration");let x=R=>{typeof R=="string"?y(g(Ct.resolve(h,R))):Array.isArray(R)?R.forEach(x):y(R)};x(E.hooks)}let A=Ct.join(h,"hooks/hooks.json");if(ct.existsSync(A)&&y(g(A)),ct.existsSync(Ct.join(h,".mcp.json")))throw Zr(i,"declare plugin MCP servers through the run's validated MCP configuration")}return p}function G7(e){let t=Ct.dirname(e.NODE_EXTRA_CA_CERTS);return["ca.key","leaf.key","leaf.csr","leaf.ext","ca.srl"].map(r=>Ct.join(t,r))}function Ro(e,t,r,n="data-safety-proxy"){let s=qu(t);if(!s)return{argv:[...e],env:r};let i=n==="open"?s.openSettings:s.settings;if(s.failure||!s.cli||!s.node||!i||!s.env)throw Zr(s,s.failure??"the run boundary has not finished initialization");if(!ct.existsSync(s.cli)||!ct.existsSync(i)||!ct.existsSync(s.node))throw Zr(s,"the pinned sandbox runtime or its configuration is unavailable");try{if(JSON.parse(ct.readFileSync(s.statusFile,"utf8")).notRun)throw new Error("the guarded proxy is unavailable")}catch{throw Zr(s,"the guarded proxy is unavailable")}let o=n==="open",a=o?{...r,PATH:nj(s.roots,r.PATH??"").join(Ct.delimiter)}:r,c=cf(s,o?{...a}:{...a,...s.env}),u=Object.keys(a).filter(l=>(["PATH","HOME","SHELL"].includes(l)||ej.test(l)&&!DQe.test(l))&&a[l]!==void 0).map(l=>`${l}=${a[l]}`);return{argv:[s.node,s.cli,"--settings",i,"--","/usr/bin/env",...u,...jQe(s),...o?["NODE_USE_ENV_PROXY=1",...s.openTrust?["SSL_CERT_FILE","REQUESTS_CA_BUNDLE","CURL_CA_BUNDLE"].map(l=>`${l}=${s.openTrust}`):[]]:[],...e],env:c}}function jQe(e){let t=e.noProxy??"";return[`NO_PROXY=${t}`,`no_proxy=${t}`,...e.tmp?["TMPDIR","TMP","TEMP"].map(r=>`${r}=${e.tmp}`):[]]}function qQe(e,t={},r,n){let s=qu(e);if(!s||s.failure||!s.env)return t;let i=t.env,o={...r,...i},a=Object.entries(o).filter(([g,y])=>ej.test(g)&&!DQe.test(g)&&y!==void 0),c=i?{...t,env:Object.fromEntries(Object.entries(i).filter(([g])=>!ej.test(g)))}:t;for(let[g,y]of a)if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(g)||/^(?:SHELLOPTS|BASHOPTS)$/.test(g)||typeof y!="string"||y.includes("\0"))throw Zr(s,`the Bash application environment cannot safely restore loader variable (${g})`);if(!s.node||!xI(s.node))throw Zr(s,"a trusted native runtime is required for the Bash application environment");let u=g=>`'${g.replace(/'/g,"'\\''")}'`,l=Ct.join(n,"bash-environment-hook.cjs"),d=Ct.join(n,"bash-environment.sh"),p=[...jQe(s).map(g=>[g.slice(0,g.indexOf("=")),g.slice(g.indexOf("=")+1)]),...a].map(([g,y])=>`${g}=${u(y)}`);ct.writeFileSync(d,`export ${p.join(" ")}
|
|
178
|
+
`,{mode:493})}catch{return}return`bash ${ju(t)}`}}function ju(e){return`'${e.split("'").join("'\\''")}'`}var rE="data-safety-isolation.json",CI="data-safety-isolation-ready.json",Oi=new Map,L7=new Map;function U7(){let e=process.versions.bun&&process.argv[1]?.startsWith("/$bunfs/")?process.execPath:process.argv[1];return ct.realpathSync(e)}function OQe(){let e=U7();return[e,Ct.join(Ct.dirname(e),"data-safety-worker.js")]}function xI(e){let t=ct.openSync(e,"r"),r=Buffer.alloc(4);try{if(ct.readSync(t,r,0,4,0)!==4)return!1}finally{ct.closeSync(t)}let n=r.readUInt32BE(0);return n===2135247942||[4277009102,4277009103,3405691582,3405691583,3472551422,3489328638,3199925962,3216703178].includes(n)}function rj(e,t){e.protectedPaths?.includes(t)||(e.protectedPaths??=[]).push(t)}function II(e){let t=e.map(n=>{try{return ct.realpathSync(n)}catch{return Ct.resolve(n)}}),r=process.versions.bun?(process.env.PATH??"/usr/bin:/bin").split(Ct.delimiter).filter(Ct.isAbsolute).map(n=>Ct.join(n,"node")):[process.execPath];for(let n of r)try{let s=ct.realpathSync(n);if(ct.accessSync(s,ct.constants.X_OK),af(t,s)||!ct.statSync(s).isFile()||!xI(s))continue;let i=qu(e[0]);return i&&rj(i,s),s}catch{}throw new Error("an absolute native Node executable outside sandbox-writable locations is required for isolation")}var ej=/^(NODE_OPTIONS|NODE_PATH|BASH_ENV|BASHOPTS|SHELLOPTS|PS4|PROMPT_COMMAND|BASH_XTRACEFD|BASH_LOADABLES_PATH|ENV|ZDOTDIR|PYTHONPATH|PYTHONHOME|RUBYOPT|PERL5OPT|PERL5LIB|GCONV_PATH|OPENSSL_CONF|OPENSSL_ENGINES|LD_.*|DYLD_.*|BASH_FUNC_.*)$/,DQe=/^(BASH_FUNC_.*|PS4|PROMPT_COMMAND)$/;function cf(e,t){let r={...t};r.PATH=e.bootstrapPath??nj(e.roots,process.env.PATH??"/usr/bin:/bin").map(n=>(rj(e,n),n)).join(Ct.delimiter),e.bootstrapPath=r.PATH,r.HOME=process.env.HOME,r.SHELL="/bin/bash";for(let n of["TMPDIR","TMP","TEMP"])process.env[n]?r[n]=process.env[n]:delete r[n];for(let n of Object.keys(r))ej.test(n)&&delete r[n];return r}function nj(e,t){return t.split(Ct.delimiter).flatMap(r=>{if(!Ct.isAbsolute(r))return[];try{let n=ct.realpathSync(r);if(af(e,n)||e.some(s=>tE(n,s)))return[];for(let s of ct.readdirSync(n)){let i=Ct.join(n,s);try{ct.accessSync(i,ct.constants.X_OK)}catch{continue}if(ct.statSync(i).isFile()&&af(e,ct.realpathSync(i)))return[]}return[n]}catch{return[]}})}var tE=(e,t)=>t===e||t.startsWith(e+Ct.sep);function af(e,t){let r=["/tmp/claude","/private/tmp/claude"].map(n=>{try{return ct.realpathSync(n)}catch{return n}});return[...e,...r].some(n=>tE(n,t))}var j7="Testbot could not install it because the Ubuntu package source was unavailable. Run the validation again later",MQe=new Set;function q7(e){MQe=new Set(e)}function kP(e,t,r,n=s=>Zr(e,s)){let s=t.includes(Ct.sep)?[Ct.resolve(r,t)]:(cf(e,{PATH:process.env.PATH}).PATH??"").split(Ct.delimiter).map(i=>Ct.join(i,t));for(let i of s)try{if(ct.accessSync(i,ct.constants.X_OK),ct.statSync(i).isFile())return ct.realpathSync(i)}catch{}throw n(`a trusted executable could not be resolved (${t})${MQe.has(t)?`: ${j7}`:""}`)}function Py(e,t,r,n=[],s=[]){let i=f=>{try{return ct.realpathSync(f)}catch{return Ct.resolve(f)}},o=i(t),a=[...new Set([o,...s,...[...Oi.values()].flatMap(f=>f.roots)].map(i))],c={roots:a,ctx:{outputsDir:o},statusFile:""},u=cf(c,r),l=kP(c,e,o,f=>new Error(`Host transport unavailable: ${f}`));if(af(a,l)||!xI(l))throw new Error(`Host transport requires a native host executable outside writable run roots (${e})`);let d=[l,...c.protectedPaths??[]];for(let f of n){let h;try{h=ct.realpathSync(f)}catch{throw new Error(`Host transport asset is unavailable (${f})`)}if(af(a,h)||!ct.statSync(h).isFile())throw new Error(`Host transport asset must be a file outside writable run roots (${f})`);d.push(h)}let p=L7.get(o)??new Set;d.forEach(f=>p.add(f)),L7.set(o,p);for(let f of Oi.values())d.forEach(h=>rj(f,h));return{executable:l,env:u}}function sj(e,t){let r=e.bootstrapExecutables?.get(t);if(r)return r;let n=kP(e,t,e.roots[0]);return kI(e.roots[0],[{command:n}],[],[],!0),(e.bootstrapExecutables??=new Map).set(t,n),n}function FQe(e,t=process.platform){let r=qu(e);if(!r)return{};let n=["which","bash","sh","env",...t==="linux"?["rg","bwrap","socat"]:["sandbox-exec","log"]];return Object.fromEntries(n.map(s=>[s,sj(r,s)]))}function RI(e,t){let r=qu(e);return r?{executable:sj(r,t),env:cf(r,{PATH:process.env.PATH,HOME:process.env.HOME})}:{executable:t,env:process.env}}function qu(e){let t=Ct.resolve(e);try{t=ct.realpathSync(e)}catch{}let r=[...Oi.values()],n=r.find(s=>s.roots.some(i=>tE(i,t)));if(n)return n;if(r.length===1)return r[0];if(r.length>1)throw Zr(r[0],"a command outside the run roots has no unambiguous safety boundary")}function Zr(e,t){return e.failure=t,dm(e.ctx,t),new Error(`Shared-environment isolation unavailable: ${t}`)}function dm(e,t){let r=Oi.get(e.outputsDir);r&&(r.incident=t),ct.mkdirSync(e.outputsDir,{recursive:!0});let n=Ct.join(e.outputsDir,rE),s=`${n}.${(0,$Qe.randomUUID)()}.tmp`;ct.writeFileSync(s,JSON.stringify({reason:"isolation_unavailable",detail:t,actionRequired:!0},null,2),{mode:384,flag:"wx"}),ct.renameSync(s,n)}var QQe="Testbot cannot yet start part of the app on the runner for a shared-environment run: inside its sandbox, a server one command starts cannot be reached from the next. Test against a Test Environment where the whole app is already deployed";function LQe(e,t){let r=qu(e);if(r)throw Zr(r,t)}function z7(e,t){let r=qu(e);r&&dm(r.ctx,t)}function UQe(e){return Oi.get(e.outputsDir)?.enforced===!0&&!Zi(e)}function Zi(e){let t=Oi.get(e.outputsDir);if(t?.failure||t?.incident)return t.failure??t.incident;try{let r=JSON.parse(ct.readFileSync(Ct.join(e.outputsDir,rE),"utf8"));return typeof r.detail=="string"&&r.detail?r.detail:"the isolation failure record is unreadable or incomplete"}catch(r){return r.code==="ENOENT"?void 0:"the isolation failure record is unreadable or incomplete"}}function kI(e,t,r=[],n=[],s=!1){let i=qu(e);if(!i)return t.map(f=>({command:f.command,args:[...f.args??[]]}));let o=f=>{i.protectedPaths?.includes(f)||(i.protectedPaths??=[]).push(f)},a=new Set,c=new Set,u=f=>{try{return ct.realpathSync(f)}catch{throw Zr(i,`unresolved tool asset: ${f}`)}},l=f=>{let h=u(f);if(af(i.roots,h)||i.roots.some(y=>tE(h,y)))throw Zr(i,"a configured tool package or dependency is installed in a sandbox-writable location");o(h);let g=y=>{if(!a.has(y)){a.add(y);for(let m of ct.readdirSync(y,{withFileTypes:!0})){let A=Ct.join(y,m.name);if(m.isSymbolicLink()){let w=u(A);if(af(i.roots,w))throw Zr(i,"a configured tool dependency is installed in a sandbox-writable location");ct.statSync(w).isDirectory()?l(w):d(w)}else m.isDirectory()&&g(A)}}};g(h)},d=(f,h=!1,g=!1)=>{let y=u(f);if(af(i.roots,y))throw Zr(i,"a configured tool executable or package is installed in a sandbox-writable location");if(o(y),!h&&c.has(y))return;c.add(y);let m,A=ct.openSync(y,"r"),w=Buffer.alloc(256);try{ct.readSync(A,w,0,w.length,0)}finally{ct.closeSync(A)}if(h){let E=w.toString().split(/\r?\n/,1)[0];if(E.startsWith("#!")){let x=E.slice(2).trim().split(/\s+/),R=x[0];if(Ct.basename(R)==="env"){let N=kP(i,R,e);if(af(i.roots,N)||!xI(N))throw Zr(i,`unsafe shebang launcher: ${R}`);o(N),x.shift(),x[0]==="-S"&&x.shift()}let v=ct.statSync(y),I=s&&(tE("/usr/bin",y)||tE("/bin",y))&&v.uid===0&&(v.mode&18)===0&&/^(?:sh|bash)$/.test(Ct.basename(x[0]));if(x.length!==1||!/^(?:node|nodejs|bun)$/.test(Ct.basename(x[0]))&&!I)throw Zr(i,"unsupported tool launcher: use a native executable or a plain Node/Bun script without interpreter flags");if(m=kP(i,x[0],e),af(i.roots,m)||!xI(m))throw Zr(i,`unsafe shebang interpreter: ${x[0]}`);o(m)}else if(!xI(y))throw Zr(i,"unsupported tool launcher: use a native executable or a plain Node/Bun script")}if(g||/\.[cm]?[jt]s$/.test(y)||/^#![^\n]*(?:node|nodejs|bun)\b/.test(w.toString())){let E=Ct.dirname(y);for(let x=E;;x=Ct.dirname(x)){if(ct.existsSync(Ct.join(x,"package.json"))){E=x;break}if(Ct.dirname(x)===x)break}l(E);for(let x=E;;x=Ct.dirname(x)){let R=Ct.join(x,"node_modules");if(ct.existsSync(R)&&ct.statSync(R).isDirectory()&&l(R),Ct.basename(x)==="node_modules"&&l(x),Ct.dirname(x)===x)break}}return m},p=[];for(let f of t){let h=kP(i,f.command,e),g=d(h,!0),y=Ct.basename(ct.realpathSync(h));if(!s&&/^(?:sh|bash|dash|zsh|ksh|fish|csh|tcsh|python[\d.]*|pypy[\d.]*|perl[\d.]*|ruby[\d.]*|php[\d.]*|lua[\d.]*|java|deno|uv|uvx|pipx|poetry|pdm|Rscript|pwsh|powershell|env|xargs|nohup|nice|stdbuf|timeout)$/.test(y))throw Zr(i,"unsupported tool launcher: dynamic interpreters and forwarding wrappers cannot retain their executable dependencies");if(!s&&/^(?:npm-cli|npx-cli)\.js$/.test(y)&&f.args?.length)throw Zr(i,"unsupported tool launcher: dynamic package commands cannot retain their executable dependencies");let m;if(!s&&/^(?:node|nodejs|bun)$/.test(y)){let A=f.args??[],w=A[0]==="--"||y==="bun"&&A[0]==="run"?A[1]:A[0];if(!w||w.startsWith("-")||!ct.existsSync(Ct.resolve(e,w))||!ct.statSync(Ct.resolve(e,w)).isFile())throw Zr(i,"unsupported tool launcher: Node/Bun tools require a script file entry without eval, module or preload flags");m=Ct.resolve(e,w)}p.push(g&&!s?{command:g,args:[h,...f.args??[]]}:{command:h,args:[...f.args??[]]});for(let A of f.args??[]){let w=Ct.resolve(e,A);!A.startsWith("-")&&ct.existsSync(w)&&ct.statSync(w).isFile()&&d(w,!1,w===m)}}for(let f of r)d(f);for(let f of n){let h=u(f);l(h);let g=w=>{d(w);try{return JSON.parse(ct.readFileSync(w,"utf8"))}catch{throw Zr(i,`the plugin configuration could not be read: ${w}`)}},y=w=>{if(!w||typeof w!="object")return;if(Array.isArray(w)){w.forEach(y);return}let E=w;if(E.type==="command"){if(typeof E.command!="string")throw Zr(i,"the plugin command hook has no literal command");let x=ic(E.command.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g,h));if(!x.steps)throw Zr(i,"the plugin command hook needs a literal native/Node command whose assets can be retained");for(let R of x.steps)kI(e,[{command:R[0],args:R.slice(1)}])}Object.values(E).forEach(y)},m=Ct.join(h,".claude-plugin/plugin.json");if(ct.existsSync(m)){let w=g(m);if(!w||typeof w!="object"||Array.isArray(w))throw Zr(i,"the plugin manifest is not an object");let E=w;if(E.mcpServers)throw Zr(i,"declare plugin MCP servers through the run's validated MCP configuration");let x=R=>{typeof R=="string"?y(g(Ct.resolve(h,R))):Array.isArray(R)?R.forEach(x):y(R)};x(E.hooks)}let A=Ct.join(h,"hooks/hooks.json");if(ct.existsSync(A)&&y(g(A)),ct.existsSync(Ct.join(h,".mcp.json")))throw Zr(i,"declare plugin MCP servers through the run's validated MCP configuration")}return p}function G7(e){let t=Ct.dirname(e.NODE_EXTRA_CA_CERTS);return["ca.key","leaf.key","leaf.csr","leaf.ext","ca.srl"].map(r=>Ct.join(t,r))}function Ro(e,t,r,n="data-safety-proxy"){let s=qu(t);if(!s)return{argv:[...e],env:r};let i=n==="open"?s.openSettings:s.settings;if(s.failure||!s.cli||!s.node||!i||!s.env)throw Zr(s,s.failure??"the run boundary has not finished initialization");if(!ct.existsSync(s.cli)||!ct.existsSync(i)||!ct.existsSync(s.node))throw Zr(s,"the pinned sandbox runtime or its configuration is unavailable");try{if(JSON.parse(ct.readFileSync(s.statusFile,"utf8")).notRun)throw new Error("the guarded proxy is unavailable")}catch{throw Zr(s,"the guarded proxy is unavailable")}let o=n==="open",a=o?{...r,PATH:nj(s.roots,r.PATH??"").join(Ct.delimiter)}:r,c=cf(s,o?{...a}:{...a,...s.env}),u=Object.keys(a).filter(l=>(["PATH","HOME","SHELL"].includes(l)||ej.test(l)&&!DQe.test(l))&&a[l]!==void 0).map(l=>`${l}=${a[l]}`);return{argv:[s.node,s.cli,"--settings",i,"--","/usr/bin/env",...u,...jQe(s),...o?["NODE_USE_ENV_PROXY=1",...s.openTrust?["SSL_CERT_FILE","REQUESTS_CA_BUNDLE","CURL_CA_BUNDLE"].map(l=>`${l}=${s.openTrust}`):[]]:[],...e],env:c}}function jQe(e){let t=e.noProxy??"";return[`NO_PROXY=${t}`,`no_proxy=${t}`,...e.tmp?["TMPDIR","TMP","TEMP"].map(r=>`${r}=${e.tmp}`):[]]}function qQe(e,t={},r,n){let s=qu(e);if(!s||s.failure||!s.env)return t;let i=t.env,o={...r,...i},a=Object.entries(o).filter(([y,m])=>ej.test(y)&&!DQe.test(y)&&m!==void 0),c=i?{...t,env:Object.fromEntries(Object.entries(i).filter(([y])=>!ej.test(y)))}:t;for(let[y,m]of a)if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(y)||/^(?:SHELLOPTS|BASHOPTS)$/.test(y)||typeof m!="string"||m.includes("\0"))throw Zr(s,`the Bash application environment cannot safely restore loader variable (${y})`);if(!s.node||!xI(s.node))throw Zr(s,"a trusted native runtime is required for the Bash application environment");let u=y=>`'${y.replace(/'/g,"'\\''")}'`,l=Ct.join(n,"bash-environment-hook.cjs"),d=Ct.join(n,"bash-environment.sh"),p=[...jQe(s).map(y=>[y.slice(0,y.indexOf("=")),y.slice(y.indexOf("=")+1)]),...a].map(([y,m])=>`${y}=${u(m)}`);ct.writeFileSync(d,`export ${p.join(" ")}
|
|
179
179
|
`,{mode:384}),ct.writeFileSync(l,`const deny=(reason)=>process.stdout.write(JSON.stringify({hookSpecificOutput:{hookEventName:'PreToolUse',permissionDecision:'deny',permissionDecisionReason:'Bash environment hook: '+reason}}));let raw='';process.stdin.on('data',chunk=>raw+=chunk);process.stdin.on('end',()=>{let event,prefix;try{event=JSON.parse(raw);prefix=require('fs').readFileSync(process.argv[2],'utf8');}catch(err){return deny(String(err&&err.message||err));}if(event.tool_name!=='Bash'||typeof event.tool_input?.command!=='string')return deny('invalid input');if(!prefix.startsWith('export ')||!prefix.endsWith('\\n'))return deny('invalid environment');process.stdout.write(JSON.stringify({hookSpecificOutput:{hookEventName:'PreToolUse',updatedInput:{...event.tool_input,command:prefix+event.tool_input.command}}}));});
|
|
180
|
-
`,{mode:384});for(let g of[n,l,d,s.node])rj(s,g);let f=c.hooks,h=Array.isArray(f?.PreToolUse)?f.PreToolUse:[];return{...c,hooks:{...f,PreToolUse:[...h,{matcher:"Bash",hooks:[{type:"command",command:[s.node,l,d].map(u).join(" "),timeout:10}]}]}}}function H7(e,t={},r=[]){let n=qu(e);if(!n)return t;if(n.failure||!n.env)throw Zr(n,n.failure??"the boundary is not initialized");let s=Number(new URL(n.env.HTTP_PROXY).port),i=[n.dir,Ct.join(Ct.dirname(n.env.NODE_EXTRA_CA_CERTS),"ledger"),...G7(n.env)],o=[...L7].flatMap(([l,d])=>n.roots.some(p=>tE(p,l))?[...d]:[]),a=[...n.protectedPaths??[],...o,Ct.dirname(n.env.NODE_EXTRA_CA_CERTS),...r],c=t.permissions??{},u=(l,d)=>d.flatMap(p=>[`${l}(/${p})`,`${l}(/${p}/**)`]);return{...t,permissions:{...c,deny:[...c.deny??[],...u("Read",i),...u("Edit",a)]},sandbox:{enabled:!0,failIfUnavailable:!0,autoAllowBashIfSandboxed:!0,allowUnsandboxedCommands:!1,excludedCommands:[],enableWeakerNestedSandbox:!1,enableWeakerNetworkIsolation:!1,network:{allowedDomains:[],deniedDomains:[],httpProxyPort:s,socksProxyPort:s,allowUnixSockets:[],allowAllUnixSockets:!1,allowLocalBinding:!1},filesystem:{denyRead:i,denyWrite:a,allowWrite:n.roots}}}}function ei(e){return!!qu(e)}function zQe(e){return{detached:ei(e)&&process.platform!=="win32"}}function GQe(e,t){if(!(!t||!ei(e)||process.platform==="win32"))try{process.kill(-t,"SIGKILL")}catch{}}function nE(e,t=process.env){let r=qu(e);return r?cf(r,{...t,...r.env}):t}function V7(e,t,r=[]){let n=qu(t);if(!n)return;let s=(0,tj.spawnSync)(e,[...r,"--version"],{cwd:t,env:cf(n,{PATH:process.env.PATH,HOME:process.env.HOME}),encoding:"utf8",timeout:1e4,stdio:"pipe"}),i=s.stdout?.match(/\b(\d+)\.(\d+)\.(\d+)\b/);if(s.status!==0||!i||Number(i[1])<2||Number(i[1])===2&&(Number(i[2])<1||Number(i[2])===1&&Number(i[3])<285))throw Zr(n,"Claude Code 2.1.285 or newer is required for mandatory Bash isolation")}function Ta(e,t,r){let n=Ro(e,t,r.env),s=(0,tj.spawnSync)(n.argv[0],n.argv.slice(1),{cwd:t,...zQe(t),env:n.env,encoding:"utf8",timeout:r.timeout,maxBuffer:r.maxBuffer,stdio:["ignore","pipe","pipe"]});GQe(t,s.pid);let i=s.stdout??"",o=s.stderr??"",a=Ml(t,s.status),c=s.error?.code,u=s.status!==0&&(c==="ENOENT"||s.status===127),l=u&&r.check&&a?`${r.check} could not start inside the shared-environment protection (${a}), so its result could not be verified`:void 0;return{status:s.status,stdout:i,stderr:o,errorCode:c,errorMessage:s.error?.message,notInstalled:u&&!l,unavailable:l}}function W7(e){if(e.probePort===void 0)return;if(!e.node||!e.cli||!e.settings)return"the run boundary has not finished initialization";let t=`const s=require('net').connect({host:'127.0.0.1',port:${e.probePort}});s.once('connect',()=>{s.destroy();process.exit(23)});s.once('error',()=>{console.log('ISOLATION_BLOCKED');process.exit(0)});setTimeout(()=>process.exit(24),1500)`,r=(0,tj.spawnSync)(e.node,[e.cli,"--settings",e.settings,"--",e.node,"-e",t],{cwd:e.roots[0],env:cf(e,{...process.env,...e.env}),encoding:"utf8",timeout:1e4,stdio:"pipe"});if(!(r.status===0&&r.stdout.trim()==="ISOLATION_BLOCKED"))return r.status===23?"the OS sandbox no longer blocks direct connections":"the OS sandbox could not start a command"}function Ml(e,t){if(t===0)return;let r=qu(e);if(!r)return;let n=W7(r);return n&&dm(r.ctx,n),n}function TP(e){let t=Oi.get(e.outputsDir);Oi.delete(e.outputsDir),t?.probeListener?.close(),t?.openTunnel?.close(),t?.onExit&&(process.removeListener("exit",t.onExit),t.onExit())}function J7(e){let t=Oi.get(e.outputsDir);t&&(Zr(t,"an active stage did not settle during shutdown; late commands remain refused"),t.onExit&&(process.removeListener("exit",t.onExit),t.onExit(),t.onExit=void 0))}function Y7(e){return eE().length>0||ei(e)}function $Vt(e){if(eE().length>0&&!ei(e))throw new Error("protected repository SCM commands require an initialized shared-environment boundary")}var _P=["--no-pager","-c","core.hooksPath=/dev/null","-c","core.fsmonitor=false","-c","commit.gpgsign=false","-c","tag.gpgsign=false","-c","core.sshCommand=/usr/bin/false","-c","credential.helper=","-c","core.askPass=/usr/bin/false","-c","core.alternateRefsCommand=","-c","diff.external=","-c","protocol.allow=never","-c","protocol.https.allow=always"],OVt="^(filter\\..*\\.(clean|smudge|process)|merge\\..*\\.driver|diff\\..*\\.(command|textconv))$";function HQe(e){let t={...e,GIT_ALLOW_PROTOCOL:"https",GIT_TERMINAL_PROMPT:"0",GIT_ASKPASS:"/usr/bin/false",GIT_EDITOR:"/usr/bin/true",GIT_SEQUENCE_EDITOR:"/usr/bin/true"};for(let r of["GIT_CONFIG","GIT_CONFIG_PARAMETERS","GIT_EXEC_PATH","GIT_EXTERNAL_DIFF","GIT_SSH","GIT_SSH_COMMAND","GIT_SSH_VARIANT","GIT_PROXY_COMMAND","GIT_PAGER"])delete t[r];for(let r of SI)delete t[r];return t}function VQe(e,t){let r=RI(e,"git"),n=r.executable,s=nE(e,{...HQe(t),PATH:r.env.PATH}),i=Ro([n,..._P,"config","--null","--name-only","--get-regexp",OVt],e,s),o=[];try{o=(0,NP.execFileSync)(i.argv[0],i.argv.slice(1),{cwd:e,env:i.env,encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:3e4}).split("\0").filter(Boolean)}catch(c){if(c.status!==1)throw c}if(o.some(c=>c.includes("=")))throw new Error("protected Git cannot safely disable an executable Git configuration key containing '='");let a=o.flatMap(c=>["-c",`${c}=${c.startsWith("merge.")?"false":""}`]);return{binary:n,env:s,config:[..._P,...a]}}function PP(e,t,r=process.env){if(!ei(t))return{argv:["git",...e],env:r};let n=VQe(t,r),s=[...e],i=new Set(["-c","-C","--config-env","--git-dir","--work-tree","--namespace","--super-prefix","--exec-path"]);for(let o=0;o<s.length;o++){if(i.has(s[o])){o++;continue}if(!s[o].startsWith("-")){s[o]==="diff"&&s.splice(o+1,0,"--no-ext-diff","--no-textconv");break}}return Ro([n.binary,...n.config,...s],t,n.env)}function WQe(e,t,r,n=process.env){let s=pm.basename(e);if((s==="git"||s==="gh")&&$Vt(r),s==="git")return PP(t,r,n);if(s!=="gh")return{argv:[e,...t],env:n};if(!ei(r))return{argv:[e,...t],env:n};let i=VQe(r,n),o={...i.env},a=Number(o.GIT_CONFIG_COUNT??0);if(!Number.isSafeInteger(a)||a<0)throw new Error("invalid Git transport configuration count");for(let c=0;c<i.config.length;c++){if(i.config[c]!=="-c")continue;let u=i.config[++c],l=u.indexOf("=");o[`GIT_CONFIG_KEY_${a}`]=u.slice(0,l),o[`GIT_CONFIG_VALUE_${a++}`]=u.slice(l+1)}return o.GIT_CONFIG_COUNT=String(a),Ro([RI(r,"gh").executable,...t],r,o)}function yt(e,t){let r=PP(e,t.cwd,t.env??process.env);return(0,NP.execFileSync)(r.argv[0],r.argv.slice(1),{...t,env:r.env})}function oj(e,t){let r=PP(e,t.cwd,t.env??process.env);return(0,NP.spawnSync)(r.argv[0],r.argv.slice(1),{...t,env:r.env})}function JQe(e,t,r){let n=e.indexOf("-R"),s=e[0]==="api",i=e.slice(3),a=i.length%2===0&&i.every((h,g)=>g%2!==0||["-R","--json","-q","--jq"].includes(h))&&!e[2]?.startsWith("-")&&e[0]==="pr"&&e[1]==="view"&&n>=2&&/^[^/\\\s]+\/[^/\\\s]+$/.test(e[n+1]??"")&&!e.includes("--web");if(!s&&!a)throw new Error("trusted SCM control calls require gh api or an explicit-repository PR view");let c=r.GH_CONFIG_DIR??pm.join(r.XDG_CONFIG_HOME??pm.join(r.HOME??ij.homedir(),".config"),"gh"),u=pm.join(c,"hosts.yml"),l=Fl.existsSync(u)?Fl.realpathSync(u):void 0,d=Py("gh",t,HQe(r),l?[l]:[],eE()),p=Fl.mkdtempSync(pm.join(ij.tmpdir(),"skyramp-scm-api-"));Fl.chmodSync(p,448);let f=()=>Fl.rmSync(p,{recursive:!0,force:!0});try{l&&Fl.copyFileSync(l,pm.join(p,"hosts.yml"));let h={...d.env};for(let y of Object.keys(h))(y.startsWith("GIT_")||y.startsWith("INPUT_"))&&delete h[y];Object.assign(h,{HOME:p,XDG_CONFIG_HOME:p,GH_CONFIG_DIR:p,GH_PROMPT_DISABLED:"1",GH_NO_UPDATE_NOTIFIER:"1",GH_NO_EXTENSION_UPDATE_NOTIFIER:"1",GIT_ALLOW_PROTOCOL:"https",GIT_TERMINAL_PROMPT:"0",GIT_CONFIG_NOSYSTEM:"1",GIT_CONFIG_GLOBAL:"/dev/null",GIT_CONFIG_SYSTEM:"/dev/null",GIT_DIR:pm.join(p,"no-repository")});let g=0;for(let y=0;y<_P.length;y++){if(_P[y]!=="-c")continue;let m=_P[++y],A=m.indexOf("=");h[`GIT_CONFIG_KEY_${g}`]=m.slice(0,A),h[`GIT_CONFIG_VALUE_${g++}`]=m.slice(A+1)}return h.GIT_CONFIG_COUNT=String(g),{argv:[d.executable,...e],env:h,cwd:p,cleanup:f}}catch(h){throw f(),h}}function DVt(e){try{return fm.lstatSync(e),!0}catch{return!1}}function TI(e){let t=ko.resolve(e),r=[];for(;!DVt(t);){let s=ko.dirname(t);if(s===t)break;r.unshift(ko.basename(t)),t=s}let n=t;try{n=fm.realpathSync(t)}catch{try{fm.lstatSync(t).isSymbolicLink()&&(n=ko.resolve(ko.dirname(t),fm.readlinkSync(t)))}catch{}}return r.length?ko.join(n,...r):n}function By(e,t){let r=TI(e),n=TI(ko.resolve(e,t)),s=ko.relative(r,n);if(s==="")return".";if(!(s===".."||s.startsWith(`..${ko.sep}`)||ko.isAbsolute(s)))return s}function Jn(e,t){return By(e,t)!==void 0}function uf(e,t){return Jn(e,t)&&fm.existsSync(ko.resolve(e,t))}function Gc(e){let t=e.split(/[\\/]/)[0];return t===".skyramp"||t===".testbot"}function BP(e){try{return yt([...Er,"ls-files","-z","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",env:Ue(),maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"]}).split("\0").filter(Boolean)}catch{return}}function $y(){let e=new Map;return t=>()=>e.has(t)?e.get(t):e.set(t,BP(t)).get(t)}function aj(e,t,r,n){let s=o=>!r||o.startsWith(`${r}/`),i=o=>o===t||o.endsWith(`/${t}`);return s(e)&&i(e)&&!!n?.includes(e)&&n.filter(o=>s(o)&&i(o)).length===1}var aLe=H(require("path"));var b={};Ia(b,{BRAND:()=>cWt,DIRTY:()=>sE,EMPTY_PATH:()=>LVt,INVALID:()=>$t,NEVER:()=>HWt,OK:()=>_a,ParseStatus:()=>Zo,Schema:()=>fr,ZodAny:()=>My,ZodArray:()=>ym,ZodBigInt:()=>oE,ZodBoolean:()=>aE,ZodBranded:()=>OP,ZodCatch:()=>AE,ZodDate:()=>cE,ZodDefault:()=>yE,ZodDiscriminatedUnion:()=>lj,ZodEffects:()=>Ul,ZodEnum:()=>mE,ZodError:()=>Hc,ZodFirstPartyTypeKind:()=>jt,ZodFunction:()=>pj,ZodIntersection:()=>pE,ZodIssueCode:()=>Pe,ZodLazy:()=>fE,ZodLiteral:()=>hE,ZodMap:()=>OI,ZodNaN:()=>MI,ZodNativeEnum:()=>gE,ZodNever:()=>Zd,ZodNull:()=>lE,ZodNullable:()=>pf,ZodNumber:()=>iE,ZodObject:()=>Vc,ZodOptional:()=>Ql,ZodParsedType:()=>rt,ZodPipeline:()=>DP,ZodPromise:()=>Fy,ZodReadonly:()=>bE,ZodRecord:()=>dj,ZodSchema:()=>fr,ZodSet:()=>DI,ZodString:()=>Dy,ZodSymbol:()=>BI,ZodTransformer:()=>Ul,ZodTuple:()=>df,ZodType:()=>fr,ZodUndefined:()=>uE,ZodUnion:()=>dE,ZodUnknown:()=>gm,ZodVoid:()=>$I,addIssueToContext:()=>Ge,any:()=>yWt,array:()=>EWt,bigint:()=>pWt,boolean:()=>oLe,coerce:()=>GWt,custom:()=>nLe,date:()=>fWt,datetimeRegex:()=>tLe,defaultErrorMap:()=>hm,discriminatedUnion:()=>CWt,effect:()=>MWt,enum:()=>$Wt,function:()=>NWt,getErrorMap:()=>_I,getParsedType:()=>lf,instanceof:()=>lWt,intersection:()=>IWt,isAborted:()=>cj,isAsync:()=>NI,isDirty:()=>uj,isValid:()=>Oy,late:()=>uWt,lazy:()=>PWt,literal:()=>BWt,makeIssue:()=>$P,map:()=>TWt,nan:()=>dWt,nativeEnum:()=>OWt,never:()=>bWt,null:()=>gWt,nullable:()=>QWt,number:()=>iLe,object:()=>vWt,objectUtil:()=>K7,oboolean:()=>zWt,onumber:()=>qWt,optional:()=>FWt,ostring:()=>jWt,pipeline:()=>UWt,preprocess:()=>LWt,promise:()=>DWt,quotelessJson:()=>MVt,record:()=>kWt,set:()=>_Wt,setErrorMap:()=>QVt,strictObject:()=>SWt,string:()=>sLe,symbol:()=>hWt,transformer:()=>MWt,tuple:()=>RWt,undefined:()=>mWt,union:()=>xWt,unknown:()=>AWt,util:()=>kr,void:()=>wWt});var kr;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(kr||(kr={}));var K7;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(K7||(K7={}));var rt=kr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lf=e=>{switch(typeof e){case"undefined":return rt.undefined;case"string":return rt.string;case"number":return Number.isNaN(e)?rt.nan:rt.number;case"boolean":return rt.boolean;case"function":return rt.function;case"bigint":return rt.bigint;case"symbol":return rt.symbol;case"object":return Array.isArray(e)?rt.array:e===null?rt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?rt.promise:typeof Map<"u"&&e instanceof Map?rt.map:typeof Set<"u"&&e instanceof Set?rt.set:typeof Date<"u"&&e instanceof Date?rt.date:rt.object;default:return rt.unknown}};var Pe=kr.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"]),MVt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Hc=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let u=o.path[c],l=c===o.path.length-1;if(u==="_errors"){l&&a._errors.push(r(o)),c++;continue}Object.prototype.hasOwnProperty.call(a,u)||(u==="__proto__"?Object.defineProperty(a,u,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):a[u]={_errors:[]}),a=a[u],l&&a._errors.push(r(o)),c++}}};return s(this),n}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,kr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Hc.create=e=>new Hc(e);var FVt=(e,t)=>{let r;switch(e.code){case Pe.invalid_type:e.received===rt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Pe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,kr.jsonStringifyReplacer)}`;break;case Pe.unrecognized_keys:r=`Unrecognized key(s) in object: ${kr.joinValues(e.keys,", ")}`;break;case Pe.invalid_union:r="Invalid input";break;case Pe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${kr.joinValues(e.options)}`;break;case Pe.invalid_enum_value:r=`Invalid enum value. Expected ${kr.joinValues(e.options)}, received '${e.received}'`;break;case Pe.invalid_arguments:r="Invalid function arguments";break;case Pe.invalid_return_type:r="Invalid function return type";break;case Pe.invalid_date:r="Invalid date";break;case Pe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:kr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Pe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Pe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Pe.custom:r="Invalid input";break;case Pe.invalid_intersection_types:r="Intersection results could not be merged";break;case Pe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Pe.not_finite:r="Number must be finite";break;default:r=t.defaultError,kr.assertNever(e)}return{message:r}},hm=FVt;var YQe=hm;function QVt(e){YQe=e}function _I(){return YQe}var $P=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},LVt=[];function Ge(e,t){let r=_I(),n=$P({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hm?void 0:hm].filter(s=>!!s)});e.common.issues.push(n)}var Zo=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return $t;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return $t;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},$t=Object.freeze({status:"aborted"}),sE=e=>({status:"dirty",value:e}),_a=e=>({status:"valid",value:e}),cj=e=>e.status==="aborted",uj=e=>e.status==="dirty",Oy=e=>e.status==="valid",NI=e=>typeof Promise<"u"&&e instanceof Promise;var At;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(At||(At={}));var Ll=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},KQe=(e,t)=>{if(Oy(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 r=new Hc(e.common.issues);return this._error=r,this._error}}};function ir(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var fr=class{get description(){return this._def.description}_getType(t){return lf(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:lf(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Zo,ctx:{common:t.parent.common,data:t.data,parsedType:lf(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(NI(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lf(t)},s=this._parseSync({data:t,path:n.path,parent:n});return KQe(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lf(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Oy(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Oy(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lf(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(NI(s)?s:Promise.resolve(s));return KQe(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:Pe.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ul({schema:this,typeName:jt.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:r=>this["~validate"](r)}}optional(){return Ql.create(this,this._def)}nullable(){return pf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ym.create(this)}promise(){return Fy.create(this,this._def)}or(t){return dE.create([this,t],this._def)}and(t){return pE.create(this,t,this._def)}transform(t){return new Ul({...ir(this._def),schema:this,typeName:jt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new yE({...ir(this._def),innerType:this,defaultValue:r,typeName:jt.ZodDefault})}brand(){return new OP({typeName:jt.ZodBranded,type:this,...ir(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new AE({...ir(this._def),innerType:this,catchValue:r,typeName:jt.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return DP.create(this,t)}readonly(){return bE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},UVt=/^c[^\s-]{8,}$/i,jVt=/^[0-9a-z]+$/,qVt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zVt=/^[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,GVt=/^[a-z0-9_-]{21}$/i,HVt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VVt=/^[-+]?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)?)??$/,WVt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JVt="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Z7,YVt=/^(?:(?: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])$/,KVt=/^(?:(?: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])$/,ZVt=/^(([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]))$/,XVt=/^(([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])$/,eWt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tWt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,XQe="((\\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])))",rWt=new RegExp(`^${XQe}$`);function eLe(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function nWt(e){return new RegExp(`^${eLe(e)}$`)}function tLe(e){let t=`${XQe}T${eLe(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sWt(e,t){return!!((t==="v4"||!t)&&YVt.test(e)||(t==="v6"||!t)&&ZVt.test(e))}function iWt(e,t){if(!HVt.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function oWt(e,t){return!!((t==="v4"||!t)&&KVt.test(e)||(t==="v6"||!t)&&XVt.test(e))}var Dy=class e extends fr{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==rt.string){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_type,expected:rt.string,received:i.parsedType}),$t}let n=new Zo,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?Ge(s,{code:Pe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Ge(s,{code:Pe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")WVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"email",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Z7||(Z7=new RegExp(JVt,"u")),Z7.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"emoji",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")zVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"uuid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")GVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"nanoid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")UVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"cuid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")jVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"cuid2",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")qVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"ulid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),Ge(s,{validation:"url",code:Pe.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"regex",code:Pe.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.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)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?tLe(i).test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?rWt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?nWt(i).test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?VVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"duration",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?sWt(t.data,i.version)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"ip",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?iWt(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"jwt",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?oWt(t.data,i.version)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"cidr",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?eWt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"base64",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?tWt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"base64url",code:Pe.invalid_string,message:i.message}),n.dirty()):kr.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Pe.invalid_string,...At.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...At.errToObj(t)})}url(t){return this._addCheck({kind:"url",...At.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...At.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...At.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...At.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...At.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...At.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...At.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...At.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...At.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...At.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...At.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...At.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,...At.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,...At.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...At.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...At.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...At.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...At.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...At.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...At.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...At.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...At.errToObj(r)})}nonempty(t){return this.min(1,At.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Dy.create=e=>new Dy({checks:[],typeName:jt.ZodString,coerce:e?.coerce??!1,...ir(e)});function aWt(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var iE=class e extends fr{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)!==rt.number){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_type,expected:rt.number,received:i.parsedType}),$t}let n,s=new Zo;for(let i of this._def.checks)i.kind==="int"?kr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?aWt(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.not_finite,message:i.message}),s.dirty()):kr.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,At.toString(r))}gt(t,r){return this.setLimit("min",t,!1,At.toString(r))}lte(t,r){return this.setLimit("max",t,!0,At.toString(r))}lt(t,r){return this.setLimit("max",t,!1,At.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:At.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:At.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:At.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:At.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:At.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:At.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:At.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:At.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:At.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:At.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&kr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};iE.create=e=>new iE({checks:[],typeName:jt.ZodNumber,coerce:e?.coerce||!1,...ir(e)});var oE=class e extends fr{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)!==rt.bigint)return this._getInvalidInput(t);let n,s=new Zo;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):kr.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return Ge(r,{code:Pe.invalid_type,expected:rt.bigint,received:r.parsedType}),$t}gte(t,r){return this.setLimit("min",t,!0,At.toString(r))}gt(t,r){return this.setLimit("min",t,!1,At.toString(r))}lte(t,r){return this.setLimit("max",t,!0,At.toString(r))}lt(t,r){return this.setLimit("max",t,!1,At.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:At.toString(s)}]})}_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:At.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:At.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:At.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:At.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:At.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};oE.create=e=>new oE({checks:[],typeName:jt.ZodBigInt,coerce:e?.coerce??!1,...ir(e)});var aE=class extends fr{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==rt.boolean){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.boolean,received:n.parsedType}),$t}return _a(t.data)}};aE.create=e=>new aE({typeName:jt.ZodBoolean,coerce:e?.coerce||!1,...ir(e)});var cE=class e extends fr{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==rt.date){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_type,expected:rt.date,received:i.parsedType}),$t}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_date}),$t}let n=new Zo,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):kr.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:At.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:At.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};cE.create=e=>new cE({checks:[],coerce:e?.coerce||!1,typeName:jt.ZodDate,...ir(e)});var BI=class extends fr{_parse(t){if(this._getType(t)!==rt.symbol){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.symbol,received:n.parsedType}),$t}return _a(t.data)}};BI.create=e=>new BI({typeName:jt.ZodSymbol,...ir(e)});var uE=class extends fr{_parse(t){if(this._getType(t)!==rt.undefined){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.undefined,received:n.parsedType}),$t}return _a(t.data)}};uE.create=e=>new uE({typeName:jt.ZodUndefined,...ir(e)});var lE=class extends fr{_parse(t){if(this._getType(t)!==rt.null){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.null,received:n.parsedType}),$t}return _a(t.data)}};lE.create=e=>new lE({typeName:jt.ZodNull,...ir(e)});var My=class extends fr{constructor(){super(...arguments),this._any=!0}_parse(t){return _a(t.data)}};My.create=e=>new My({typeName:jt.ZodAny,...ir(e)});var gm=class extends fr{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _a(t.data)}};gm.create=e=>new gm({typeName:jt.ZodUnknown,...ir(e)});var Zd=class extends fr{_parse(t){let r=this._getOrReturnCtx(t);return Ge(r,{code:Pe.invalid_type,expected:rt.never,received:r.parsedType}),$t}};Zd.create=e=>new Zd({typeName:jt.ZodNever,...ir(e)});var $I=class extends fr{_parse(t){if(this._getType(t)!==rt.undefined){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.void,received:n.parsedType}),$t}return _a(t.data)}};$I.create=e=>new $I({typeName:jt.ZodVoid,...ir(e)});var ym=class e extends fr{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==rt.array)return Ge(r,{code:Pe.invalid_type,expected:rt.array,received:r.parsedType}),$t;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(Ge(r,{code:o?Pe.too_big:Pe.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(Ge(r,{code:Pe.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(Ge(r,{code:Pe.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Ll(r,o,r.path,a)))).then(o=>Zo.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new Ll(r,o,r.path,a)));return Zo.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:At.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:At.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:At.toString(r)}})}nonempty(t){return this.min(1,t)}};ym.create=(e,t)=>new ym({type:e,minLength:null,maxLength:null,exactLength:null,typeName:jt.ZodArray,...ir(t)});function PI(e){if(e instanceof Vc){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Ql.create(PI(n))}return new Vc({...e._def,shape:()=>t})}else return e instanceof ym?new ym({...e._def,type:PI(e.element)}):e instanceof Ql?Ql.create(PI(e.unwrap())):e instanceof pf?pf.create(PI(e.unwrap())):e instanceof df?df.create(e.items.map(t=>PI(t))):e}var Vc=class e extends fr{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(),r=kr.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==rt.object){let u=this._getOrReturnCtx(t);return Ge(u,{code:Pe.invalid_type,expected:rt.object,received:u.parsedType}),$t}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zd&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Ll(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Zd){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(Ge(s,{code:Pe.unrecognized_keys,keys:a}),n.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 d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Ll(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>Zo.mergeObjectSync(n,u)):Zo.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return At.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:At.errToObj(t).message??s}:{message:s}}}:{}})}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:jt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of kr.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of kr.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return PI(this)}partial(t){let r={};for(let n of kr.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of kr.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ql;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return rLe(kr.objectKeys(this.shape))}};Vc.create=(e,t)=>new Vc({shape:()=>e,unknownKeys:"strip",catchall:Zd.create(),typeName:jt.ZodObject,...ir(t)});Vc.strictCreate=(e,t)=>new Vc({shape:()=>e,unknownKeys:"strict",catchall:Zd.create(),typeName:jt.ZodObject,...ir(t)});Vc.lazycreate=(e,t)=>new Vc({shape:e,unknownKeys:"strip",catchall:Zd.create(),typeName:jt.ZodObject,...ir(t)});var dE=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(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 r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Hc(a.ctx.common.issues));return Ge(r,{code:Pe.invalid_union,unionErrors:o}),$t}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.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 r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Hc(c));return Ge(r,{code:Pe.invalid_union,unionErrors:a}),$t}}get options(){return this._def.options}};dE.create=(e,t)=>new dE({options:e,typeName:jt.ZodUnion,...ir(t)});var mm=e=>e instanceof fE?mm(e.schema):e instanceof Ul?mm(e.innerType()):e instanceof hE?[e.value]:e instanceof mE?e.options:e instanceof gE?kr.objectValues(e.enum):e instanceof yE?mm(e._def.innerType):e instanceof uE?[void 0]:e instanceof lE?[null]:e instanceof Ql?[void 0,...mm(e.unwrap())]:e instanceof pf?[null,...mm(e.unwrap())]:e instanceof OP||e instanceof bE?mm(e.unwrap()):e instanceof AE?mm(e._def.innerType):[],lj=class e extends fr{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.object)return Ge(r,{code:Pe.invalid_type,expected:rt.object,received:r.parsedType}),$t;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Ge(r,{code:Pe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),$t)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=mm(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(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:jt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...ir(n)})}};function X7(e,t){let r=lf(e),n=lf(t);if(e===t)return{valid:!0,data:e};if(r===rt.object&&n===rt.object){let s=kr.objectKeys(t),i=kr.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let a of i){if(a==="__proto__")continue;let c=X7(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===rt.array&&n===rt.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=X7(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===rt.date&&n===rt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var pE=class extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(cj(i)||cj(o))return $t;let a=X7(i.value,o.value);return a.valid?((uj(i)||uj(o))&&r.dirty(),{status:r.value,value:a.data}):(Ge(n,{code:Pe.invalid_intersection_types}),$t)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};pE.create=(e,t,r)=>new pE({left:e,right:t,typeName:jt.ZodIntersection,...ir(r)});var df=class e extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.array)return Ge(n,{code:Pe.invalid_type,expected:rt.array,received:n.parsedType}),$t;if(n.data.length<this._def.items.length)return Ge(n,{code:Pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$t;!this._def.rest&&n.data.length>this._def.items.length&&(Ge(n,{code:Pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Ll(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>Zo.mergeArray(r,o)):Zo.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};df.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new df({items:e,typeName:jt.ZodTuple,rest:null,...ir(t)})};var dj=class e extends fr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.object)return Ge(n,{code:Pe.invalid_type,expected:rt.object,received:n.parsedType}),$t;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new Ll(n,a,n.path,a)),value:o._parse(new Ll(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Zo.mergeObjectAsync(r,s):Zo.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof fr?new e({keyType:t,valueType:r,typeName:jt.ZodRecord,...ir(n)}):new e({keyType:Dy.create(),valueType:t,typeName:jt.ZodRecord,...ir(r)})}},OI=class extends fr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.map)return Ge(n,{code:Pe.invalid_type,expected:rt.map,received:n.parsedType}),$t;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Ll(n,a,n.path,[u,"key"])),value:i._parse(new Ll(n,c,n.path,[u,"value"]))}));if(n.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 $t;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.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 $t;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};OI.create=(e,t,r)=>new OI({valueType:t,keyType:e,typeName:jt.ZodMap,...ir(r)});var DI=class e extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.set)return Ge(n,{code:Pe.invalid_type,expected:rt.set,received:n.parsedType}),$t;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(Ge(n,{code:Pe.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(Ge(n,{code:Pe.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return $t;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new Ll(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:At.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:At.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};DI.create=(e,t)=>new DI({valueType:e,minSize:null,maxSize:null,typeName:jt.ZodSet,...ir(t)});var pj=class e extends fr{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.function)return Ge(r,{code:Pe.invalid_type,expected:rt.function,received:r.parsedType}),$t;function n(a,c){return $P({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,_I(),hm].filter(u=>!!u),issueData:{code:Pe.invalid_arguments,argumentsError:c}})}function s(a,c){return $P({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,_I(),hm].filter(u=>!!u),issueData:{code:Pe.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Fy){let a=this;return _a(async function(...c){let u=new Hc([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return _a(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Hc([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Hc([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:df.create(t).rest(gm.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,r,n){return new e({args:t||df.create([]).rest(gm.create()),returns:r||gm.create(),typeName:jt.ZodFunction,...ir(n)})}},fE=class extends fr{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};fE.create=(e,t)=>new fE({getter:e,typeName:jt.ZodLazy,...ir(t)});var hE=class extends fr{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return Ge(r,{received:r.data,code:Pe.invalid_literal,expected:this._def.value}),$t}return{status:"valid",value:t.data}}get value(){return this._def.value}};hE.create=(e,t)=>new hE({value:e,typeName:jt.ZodLiteral,...ir(t)});function rLe(e,t){return new mE({values:e,typeName:jt.ZodEnum,...ir(t)})}var mE=class e extends fr{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return Ge(r,{expected:kr.joinValues(n),received:r.parsedType,code:Pe.invalid_type}),$t}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return Ge(r,{received:r.data,code:Pe.invalid_enum_value,options:n}),$t}return _a(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};mE.create=rLe;var gE=class extends fr{_parse(t){let r=kr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==rt.string&&n.parsedType!==rt.number){let s=kr.objectValues(r);return Ge(n,{expected:kr.joinValues(s),received:n.parsedType,code:Pe.invalid_type}),$t}if(this._cache||(this._cache=new Set(kr.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=kr.objectValues(r);return Ge(n,{received:n.data,code:Pe.invalid_enum_value,options:s}),$t}return _a(t.data)}get enum(){return this._def.values}};gE.create=(e,t)=>new gE({values:e,typeName:jt.ZodNativeEnum,...ir(t)});var Fy=class extends fr{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.promise&&r.common.async===!1)return Ge(r,{code:Pe.invalid_type,expected:rt.promise,received:r.parsedType}),$t;let n=r.parsedType===rt.promise?r.data:Promise.resolve(r.data);return _a(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Fy.create=(e,t)=>new Fy({type:e,typeName:jt.ZodPromise,...ir(t)});var Ul=class extends fr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===jt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{Ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return $t;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?$t:c.status==="dirty"?sE(c.value):r.value==="dirty"?sE(c.value):c});{if(r.value==="aborted")return $t;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?$t:a.status==="dirty"?sE(a.value):r.value==="dirty"?sE(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.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(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?$t:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?$t:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Oy(o))return $t;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Oy(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):$t);kr.assertNever(s)}};Ul.create=(e,t,r)=>new Ul({schema:e,typeName:jt.ZodEffects,effect:t,...ir(r)});Ul.createWithPreprocess=(e,t,r)=>new Ul({schema:t,effect:{type:"preprocess",transform:e},typeName:jt.ZodEffects,...ir(r)});var Ql=class extends fr{_parse(t){return this._getType(t)===rt.undefined?_a(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ql.create=(e,t)=>new Ql({innerType:e,typeName:jt.ZodOptional,...ir(t)});var pf=class extends fr{_parse(t){return this._getType(t)===rt.null?_a(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};pf.create=(e,t)=>new pf({innerType:e,typeName:jt.ZodNullable,...ir(t)});var yE=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===rt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};yE.create=(e,t)=>new yE({innerType:e,typeName:jt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ir(t)});var AE=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return NI(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Hc(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Hc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};AE.create=(e,t)=>new AE({innerType:e,typeName:jt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ir(t)});var MI=class extends fr{_parse(t){if(this._getType(t)!==rt.nan){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.nan,received:n.parsedType}),$t}return{status:"valid",value:t.data}}};MI.create=e=>new MI({typeName:jt.ZodNaN,...ir(e)});var cWt=Symbol("zod_brand"),OP=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},DP=class e extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?$t:i.status==="dirty"?(r.dirty(),sE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?$t:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:jt.ZodPipeline})}},bE=class extends fr{_parse(t){let r=this._def.innerType._parse(t),n=s=>(Oy(s)&&(s.value=Object.freeze(s.value)),s);return NI(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};bE.create=(e,t)=>new bE({innerType:e,typeName:jt.ZodReadonly,...ir(t)});function ZQe(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function nLe(e,t={},r){return e?My.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=ZQe(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=ZQe(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):My.create()}var uWt={object:Vc.lazycreate},jt;(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"})(jt||(jt={}));var lWt=(e,t={message:`Input not instance of ${e.name}`})=>nLe(r=>r instanceof e,t),sLe=Dy.create,iLe=iE.create,dWt=MI.create,pWt=oE.create,oLe=aE.create,fWt=cE.create,hWt=BI.create,mWt=uE.create,gWt=lE.create,yWt=My.create,AWt=gm.create,bWt=Zd.create,wWt=$I.create,EWt=ym.create,vWt=Vc.create,SWt=Vc.strictCreate,xWt=dE.create,CWt=lj.create,IWt=pE.create,RWt=df.create,kWt=dj.create,TWt=OI.create,_Wt=DI.create,NWt=pj.create,PWt=fE.create,BWt=hE.create,$Wt=mE.create,OWt=gE.create,DWt=Fy.create,MWt=Ul.create,FWt=Ql.create,QWt=pf.create,LWt=Ul.createWithPreprocess,UWt=DP.create,jWt=()=>sLe().optional(),qWt=()=>iLe().optional(),zWt=()=>oLe().optional(),GWt={string:(e=>Dy.create({...e,coerce:!0})),number:(e=>iE.create({...e,coerce:!0})),boolean:(e=>aE.create({...e,coerce:!0})),bigint:(e=>oE.create({...e,coerce:!0})),date:(e=>cE.create({...e,coerce:!0}))};var HWt=$t;var wE=(s=>(s.ModelProvider="model_provider",s.SutAccess="sut_access",s.Skyramp="skyramp",s.Other="other",s))(wE||{}),Am=(n=>(n.Ready="ready",n.Blocked="blocked",n.NeedsInputs="needs_inputs",n))(Am||{}),FI=e=>e==="ready"||e==="needs_inputs",MP=300,Qs=b.string().trim().min(1),VWt=b.object({action:b.enum(["start","run","wait"]),text:Qs,source:b.enum(["file","notes","testbot"]).describe("file: a file in the repository; notes: the Target's notes; testbot: Testbot's own finding"),file:Qs.nullable().describe("the file the step came from, relative to the component's repository; null unless source is file")}).strict().refine(e=>e.source==="file"==(e.file!==null),{path:["file"],message:"a file exactly when the step came from one"}),FP=/^[A-Za-z_][A-Za-z0-9_]*$/,Wc=/^(?!GITHUB_)(?!SKYRAMP_RUNNER_)[A-Z][A-Z0-9_]{0,99}$/,QI=(o=>(o.VersionEndpoint="version_endpoint",o.DeployWorkflow="deploy_workflow",o.KubernetesLabels="kubernetes_labels",o.Command="command",o.Api="api",o.NotTracked="not_tracked",o))(QI||{}),Nn="shared",WWt=Qs.refine(e=>{try{let t=new URL(e);return["http:","https:"].includes(t.protocol)&&!t.username&&!t.password}catch{return!1}},"an http(s) URL with no login in it"),LI=b.object({address:WWt,readyWhen:Qs.nullable(),credentials:b.array(b.string().regex(Wc)).max(50),revisionSources:b.array(b.object({method:b.nativeEnum(QI),detail:Qs.describe("what Testbot reads, such as GET /version or the deploy workflow's name; for not_tracked, why nothing shows it"),components:b.array(Qs).min(1).describe("the components it tells the revision of, by name")}).strict()).max(50)}).strict(),eee={steps:b.array(VWt).max(20).optional().describe("how it starts, in order"),kind:b.enum(["web_app","service","database","external_service"]).optional(),from:b.object({file:Qs,service:Qs.nullable()}).strict().optional(),credentials:b.array(b.string().max(100).regex(FP)).max(50).optional().describe("the Target's credentials this component's recipe uses: a sign-in (a test user, password or token) or an API key, which the workflow supplies from a GitHub Actions secret as the environment variable of the credential's name; give each name exactly as the recipe reads it. Names only, never a value, and not a secret the recipe generates itself")},QP=b.object({name:Qs,repository:Qs.describe("owner/repo of the Target repository the component is built or started from, such as the one whose compose file starts its database"),healthy:b.boolean(),...eee,deployed:Qs.nullable().optional().describe('only with "environment": the revision the component runs, as you read it from its revision source, or null when you could not tell')}),JWt=b.object({name:b.string().regex(Wc).describe("the credential's environment variable name, as the recipe reads it and the credentials event names it"),purpose:b.enum(["sut_access","other"]).describe("sut_access: it signs in to or calls the SUT or a service it needs; other: anything else"),required:b.boolean().describe("false only when the SUT starts without it, with less working"),how:Qs.max(MP).describe('one short sentence: what the value is and where a person gets it, such as "A Mattermost Enterprise licence key, from the customer portal"; never a value')}),YWt=b.object({component:Qs,problem:Qs,evidence:Qs.describe("the exact command and output that shows it"),fix:Qs.describe("what the user must provide, and where")}),KWt=b.object({framework:Qs,file:Qs.describe("the test file run, relative to its repository root"),result:b.enum(["pass","fail","error"])}),ZWt=b.object({input:Qs.describe("the part of the user's SUT input, as given"),reason:Qs}),UI=b.object({schemaVersion:b.literal(1),status:b.nativeEnum(Am).describe("ready only if every component came up healthy and the recipe is written; needs_inputs when the recipe is written but a component cannot start without a credential this run has no value for"),components:b.array(QP),suites:b.array(KWt).default([]).describe("one run per test suite the Target's repositories have; empty when they have none"),inputsUsed:b.array(Qs).default([]).describe("the parts of the user's SUT input the recipe used as given"),inputsUsedHow:b.array(b.object({input:Qs.describe("exactly as written in inputsUsed; an entry that is not there is left out"),how:Qs.describe("what the recipe did with it")})).optional(),inputsNotUsed:b.array(ZWt).default([]).describe("the parts it did not use, and why. A part that is wrong goes here, with what was wrong, even when the recipe does something like it instead: one the repositories or the app show is wrong, such as a file, command, port, route or setting that is not there. Something outside them that does not answer is not one: that is a blocker"),blockers:b.array(YWt).describe("required (non-empty) when status is blocked"),inputs:b.array(JWt).max(50).optional().describe("required (non-empty) when status is needs_inputs, else left out: each credential the candidate recipe needs a value for"),environment:LI.optional().describe("only when the whole SUT is an existing deployment you tested where it runs, building and starting nothing: its address, what says it is ready, the credentials that reach it, and how to read what each component runs. Leave it out when any part was built or started on the runner, or reaching it needed something there (a tunnel, port-forward, proxy or client certificate)")});function tee(e){let t=XWt(e);if(t.length>0)return t;if(e.status==="blocked"&&!(Array.isArray(e.blockers)&&e.blockers.length>0))return['status "blocked" requires at least one blocker { component, problem, evidence, fix } \u2014 say what stopped the bring-up'];let r=Array.isArray(e.inputs)?e.inputs:[];if(e.status==="needs_inputs"&&r.length===0)return['status "needs_inputs" requires at least one input { name, purpose, required, how } \u2014 say which credential the recipe needs a value for'];if(e.status!=="needs_inputs"&&r.length>0)return['"inputs" only with status "needs_inputs": leave it out, or answer "needs_inputs"'];if(e.status==="ready"||e.status==="needs_inputs"){let n=Array.isArray(e.components)?e.components:[];if(n.length===0)return[`status "${String(e.status)}" requires at least one component \u2014 name each component the recipe brought up healthy`];let s=new Set(r.map(u=>u.name)),i=u=>Array.isArray(u.credentials)&&u.credentials.some(l=>s.has(l)),o=n.filter(u=>u?.healthy!==!0&&!i(u)).map(u=>String(u?.name??"?"));if(o.length>0)return[`status "${String(e.status)}" requires every component healthy${s.size>0?", except one that reads an input":""}; not healthy: ${o.join(", ")} \u2014 answer "blocked" with a blocker for each, or bring them up and answer "${String(e.status)}" again`];let a=new Set(n.flatMap(u=>Array.isArray(u.credentials)?u.credentials:[])),c=r.map(u=>String(u.name)).filter(u=>!a.has(u));if(c.length>0)return[`each input is a credential a component reads: ${c.join(", ")} ${c.length>1?"are":"is"} in no component's "credentials"`]}return[]}function XWt(e){let t=Array.isArray(e.components)?e.components:[],r=e.environment;if(!r){let a=t.filter(c=>c?.deployed!==void 0||c?.repository===Nn).map(c=>String(c?.name??"?"));return a.length>0?[`"deployed" and a "${Nn}" repository belong only to an answer with "environment"; remove them from: ${a.join(", ")}`]:[]}let n=[],s=t.filter(a=>a?.deployed===void 0).map(a=>String(a?.name??"?"));s.length>0&&n.push(`with "environment", every component says what it runs in "deployed" (null when you could not tell); missing for: ${s.join(", ")}`);let i=new Set(t.map(a=>a?.name)),o=(r.revisionSources??[]).flatMap(a=>a?.components??[]).filter(a=>!i.has(a));return o.length>0&&n.push(`each revision source names components of this answer; not one of them: ${o.map(String).join(", ")}`),n}var EE=64*1024,vE=512*1024,fj=/[\u0000-\u0008\u000b\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;var Jc=(s=>(s.Clean="clean",s.RecipeDrift="recipe-drift",s.ChangeBrokeBringup="change-broke-bringup",s.BringupFailed="bringup-failed",s))(Jc||{}),Xd=b.string().trim().min(1),ree=b.object({url:b.string().optional().describe("the URL probed, if the check is an HTTP request"),command:b.string().optional().describe("the command run, if the check is a script \u2014 preferred when auth is needed"),headers:b.record(b.string()).optional(),status:b.union([b.number(),b.string()]).optional().describe("expected HTTP status for a url check (default 200)"),output:Xd.describe("what the check returned, VERBATIM \u2014 the bytes, nothing appended; this gate RE-RUNS the check")}),nee=b.array(b.object({component:Xd.describe("a shared component listed above"),url:Xd.describe("the URL on the component's own origin (scheme, host and port) that answers with its deployed commit"),output:Xd.describe("what the URL returned, VERBATIM; this gate FETCHES each url")})).describe("only when shared components are listed above: one check per component whose deployed commit you found"),e4t=b.object({name:Xd.describe("the credential's environment variable name, as listed above; never its value"),component:Xd.describe("the component that refused it"),status:b.number().int().min(400).max(599).optional().describe("the HTTP status it got, such as 401 or 403; leave it out when the refusal was not an HTTP answer"),evidence:Xd.describe("the request or command you tested it with and what came back, never the value")}),LP=b.object({schemaVersion:b.literal(1),baseUrls:b.record(b.string()).optional().describe("service \u2192 base URL of the running app; omit on a failed bring-up, never invent one"),health:ree.optional(),teardown:Xd.describe("command that tears the SUT down"),dependencies:b.record(b.boolean()).optional().describe("EVERY backing service: true = really deployed, false = mocked; REQUIRED when the app came up"),outcome:b.nativeEnum(Jc).describe("clean | recipe-drift (you corrected the recipe) | change-broke-bringup (the PR broke it) | bringup-failed (environment, not the PR)"),recipeFixes:b.array(b.string()).optional().describe("required when outcome is recipe-drift: what was corrected"),bringupError:b.object({command:Xd,output:Xd}).optional().describe("required when bring-up failed: the exact failing command and what it printed"),suspectFiles:b.array(b.string()).optional().describe("required for change-broke-bringup: files THIS PR changed that the failure points at, relative to your working directory (a file in another checkout of the run: its absolute path)"),seeded:b.boolean(),startedAt:Xd.describe("ISO timestamp"),revisions:nee.optional(),missingSecrets:b.array(b.string().regex(FP)).optional().describe("bringup-failed only: each secret the app cannot start without that this run has no value for, by its environment variable name; never a value"),credentialsRefused:b.array(e4t).optional().describe("only for credentials the prompt lists to test: each that was refused when you tested it, such as with a 401 or 403; leave it out when none was, or when none is listed"),recipeRecorded:b.boolean().optional().describe("[derived] whether the checkout had a recorded recipe before bring-up")});function see(e){let t=[],r=s=>!!s&&typeof s=="object"&&!Array.isArray(s);return e.outcome!=="change-broke-bringup"&&e.outcome!=="bringup-failed"?(!r(e.baseUrls)||Object.keys(e.baseUrls).length===0?t.push("baseUrls must be a non-empty object of service \u2192 url"):Object.values(e.baseUrls).every(s=>typeof s=="string"&&s.trim())||t.push("every baseUrls value must be a non-empty url string"),r(e.health)?!(typeof e.health.url=="string"&&e.health.url.trim())&&!(typeof e.health.command=="string"&&e.health.command.trim())&&t.push("health must record a url or a command (what you actually ran)"):t.push("health must be an object"),(!r(e.dependencies)||Object.keys(e.dependencies).length===0)&&t.push("dependencies must be a non-empty object of name \u2192 boolean (real vs mocked) when the SUT came up \u2014 account for every backing service so a mocked one can't be hidden behind a green run")):(r(e.bringupError)||t.push(`outcome "${String(e.outcome)}" requires bringupError { command, output } \u2014 the exact failing bring-up command and what it printed`),e.outcome==="change-broke-bringup"&&!(Array.isArray(e.suspectFiles)&&e.suspectFiles.length>0&&e.suspectFiles.every(s=>typeof s=="string"&&s.trim()))&&t.push("change-broke-bringup requires non-empty suspectFiles[] \u2014 the changed file(s) the failure points at; if you cannot point at a file this PR changed, the outcome is bringup-failed (environment/harness), not the PR's fault")),e.outcome==="recipe-drift"&&!(Array.isArray(e.recipeFixes)&&e.recipeFixes.length>0)&&t.push("recipe-drift outcome requires a non-empty recipeFixes[] describing what was corrected"),t}var Xo=b.string().trim().min(1),hj=Xo,iee=(r=>(r.TestbotManaged="testbot_managed",r.CustomerDeployed="customer_deployed",r))(iee||{}),jI=[".skyramp/sut/setup.sh",".skyramp/sut/teardown.sh"],UP=b.object({schemaVersion:b.literal(1),type:b.nativeEnum(iee).optional(),repository:hj.optional().describe("namespace/name of the source whose checkout the recipe was written and proven in (SKYR-5380); a run replays it from there. Never on a customer_deployed plan"),status:b.enum(["ready","blocked"]),environment:LI.optional(),components:b.array(b.object({name:Xo,repository:Xo.describe(`owner/repo, or "${Nn}" for a customer-deployed component no repository builds`),healthy:b.boolean(),url:b.string().min(1).nullable(),...eee,credentials:b.array(b.string().regex(Wc)).max(50).optional(),deployed:Xo.nullable().optional().describe("customer_deployed only: the revision the component runs, as setup read it (WF-SETUP-22's Deployed now), or null when it could not tell")}).strict()),suites:b.array(b.object({framework:Xo,file:Xo,result:b.enum(["pass","fail","error"])}).strict()),inputsUsed:b.array(Xo),inputsUsedHow:b.array(b.object({input:Xo,how:Xo}).strict()).optional(),inputsNotUsed:b.array(b.object({input:Xo,reason:Xo}).strict()),blockers:b.array(b.object({component:Xo,problem:Xo,evidence:Xo,fix:Xo}).strict()),replay:b.object({outcome:Xo,durationSeconds:b.number().nonnegative().nullable()}).strict().nullable(),files:b.array(b.object({path:Xo,content:b.string()}).strict())}).strict().superRefine((e,t)=>{e.inputsUsedHow?.forEach((s,i)=>{e.inputsUsed.includes(s.input)||t.addIssue({code:b.ZodIssueCode.custom,path:["inputsUsedHow",i,"input"],message:"not one of inputsUsed"})}),e.components.forEach((s,i)=>{s.credentials&&new Set(s.credentials).size!==s.credentials.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"credentials"],message:"names a credential twice"})});let r=e.type==="customer_deployed";r!==(e.environment!==void 0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["environment"],message:"an environment exactly when the plan's type is customer_deployed"}),r&&e.repository!==void 0&&t.addIssue({code:b.ZodIssueCode.custom,path:["repository"],message:"a customer_deployed plan names no repository"}),e.environment&&new Set(e.environment.credentials).size!==e.environment.credentials.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["environment","credentials"],message:"names a credential twice"});let n=new Set(e.components.map(s=>s.name));if(e.environment?.revisionSources.forEach((s,i)=>{s.components.forEach((o,a)=>{n.has(o)||t.addIssue({code:b.ZodIssueCode.custom,path:["environment","revisionSources",i,"components",a],message:"not one of components"})})}),e.components.forEach((s,i)=>{s.deployed!==void 0!==r&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"deployed"],message:"what a component runs exactly when the plan is customer_deployed"}),s.repository===Nn&&!r&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"repository"],message:`only a customer_deployed component is ${Nn}`})}),r&&(e.components.forEach((s,i)=>{e.components.findIndex(o=>o.name===s.name)!==i&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"name"],message:"names a component twice"})}),e.replay!==null&&t.addIssue({code:b.ZodIssueCode.custom,path:["replay"],message:"a customer_deployed plan is never replayed"}),e.files.forEach((s,i)=>{jI.includes(s.path)&&t.addIssue({code:b.ZodIssueCode.custom,path:["files",i,"path"],message:"a customer_deployed plan has no script that starts or stops the system"})})),r&&e.status==="ready"){let s=new Set(e.environment?.revisionSources.flatMap(i=>i.components));e.components.forEach((i,o)=>{i.repository!==Nn&&!s.has(i.name)&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",o,"name"],message:"a ready customer_deployed plan reads what every component a repository builds runs"})})}}),oee="awaits_credential_check",bm="Time limit reached",cLe="time_limit";var t4t=["clean","recipe-drift"];function Qy(e){let t=aLe.posix.normalize(e);return t===e&&(t===".skyramp/workspace.yml"||t.startsWith(".skyramp/sut/")&&t.length>13)}function r4t(e,t,r,n){let s=t.bringupError;if(e.environment)return{component:e.components.map(o=>o.name).join(", ")||"SUT",problem:`onboard reached the deployment, but deploy's fresh check of it ended ${t.outcome}`,evidence:s?`$ ${s.command}
|
|
180
|
+
`,{mode:384});for(let y of[n,l,d,s.node])rj(s,y);let f=c.hooks,h=Array.isArray(f?.PreToolUse)?f.PreToolUse:[],g=c.permissions;return{...c,permissions:{...g,allow:[...g?.allow??[],"Bash"]},hooks:{...f,PreToolUse:[...h,{matcher:"Bash",hooks:[{type:"command",command:[s.node,l,d].map(u).join(" "),timeout:10}]}]}}}function H7(e,t={},r=[]){let n=qu(e);if(!n)return t;if(n.failure||!n.env)throw Zr(n,n.failure??"the boundary is not initialized");let s=Number(new URL(n.env.HTTP_PROXY).port),i=[n.dir,Ct.join(Ct.dirname(n.env.NODE_EXTRA_CA_CERTS),"ledger"),...G7(n.env)],o=[...L7].flatMap(([l,d])=>n.roots.some(p=>tE(p,l))?[...d]:[]),a=[...n.protectedPaths??[],...o,Ct.dirname(n.env.NODE_EXTRA_CA_CERTS),...r],c=t.permissions??{},u=(l,d)=>d.flatMap(p=>[`${l}(/${p})`,`${l}(/${p}/**)`]);return{...t,permissions:{...c,deny:[...c.deny??[],...u("Read",i),...u("Edit",a)]},sandbox:{enabled:!0,failIfUnavailable:!0,autoAllowBashIfSandboxed:!0,allowUnsandboxedCommands:!1,excludedCommands:[],enableWeakerNestedSandbox:!1,enableWeakerNetworkIsolation:!1,network:{allowedDomains:[],deniedDomains:[],httpProxyPort:s,socksProxyPort:s,allowUnixSockets:[],allowAllUnixSockets:!1,allowLocalBinding:!1},filesystem:{denyRead:i,denyWrite:a,allowWrite:n.roots}}}}function ei(e){return!!qu(e)}function zQe(e){return{detached:ei(e)&&process.platform!=="win32"}}function GQe(e,t){if(!(!t||!ei(e)||process.platform==="win32"))try{process.kill(-t,"SIGKILL")}catch{}}function nE(e,t=process.env){let r=qu(e);return r?cf(r,{...t,...r.env}):t}function V7(e,t,r=[]){let n=qu(t);if(!n)return;let s=(0,tj.spawnSync)(e,[...r,"--version"],{cwd:t,env:cf(n,{PATH:process.env.PATH,HOME:process.env.HOME}),encoding:"utf8",timeout:1e4,stdio:"pipe"}),i=s.stdout?.match(/\b(\d+)\.(\d+)\.(\d+)\b/);if(s.status!==0||!i||Number(i[1])<2||Number(i[1])===2&&(Number(i[2])<1||Number(i[2])===1&&Number(i[3])<285))throw Zr(n,"Claude Code 2.1.285 or newer is required for mandatory Bash isolation")}function Ta(e,t,r){let n=Ro(e,t,r.env),s=(0,tj.spawnSync)(n.argv[0],n.argv.slice(1),{cwd:t,...zQe(t),env:n.env,encoding:"utf8",timeout:r.timeout,maxBuffer:r.maxBuffer,stdio:["ignore","pipe","pipe"]});GQe(t,s.pid);let i=s.stdout??"",o=s.stderr??"",a=Ml(t,s.status),c=s.error?.code,u=s.status!==0&&(c==="ENOENT"||s.status===127),l=u&&r.check&&a?`${r.check} could not start inside the shared-environment protection (${a}), so its result could not be verified`:void 0;return{status:s.status,stdout:i,stderr:o,errorCode:c,errorMessage:s.error?.message,notInstalled:u&&!l,unavailable:l}}function W7(e){if(e.probePort===void 0)return;if(!e.node||!e.cli||!e.settings)return"the run boundary has not finished initialization";let t=`const s=require('net').connect({host:'127.0.0.1',port:${e.probePort}});s.once('connect',()=>{s.destroy();process.exit(23)});s.once('error',()=>{console.log('ISOLATION_BLOCKED');process.exit(0)});setTimeout(()=>process.exit(24),1500)`,r=(0,tj.spawnSync)(e.node,[e.cli,"--settings",e.settings,"--",e.node,"-e",t],{cwd:e.roots[0],env:cf(e,{...process.env,...e.env}),encoding:"utf8",timeout:1e4,stdio:"pipe"});if(!(r.status===0&&r.stdout.trim()==="ISOLATION_BLOCKED"))return r.status===23?"the OS sandbox no longer blocks direct connections":"the OS sandbox could not start a command"}function Ml(e,t){if(t===0)return;let r=qu(e);if(!r)return;let n=W7(r);return n&&dm(r.ctx,n),n}function TP(e){let t=Oi.get(e.outputsDir);Oi.delete(e.outputsDir),t?.probeListener?.close(),t?.openTunnel?.close(),t?.onExit&&(process.removeListener("exit",t.onExit),t.onExit())}function J7(e){let t=Oi.get(e.outputsDir);t&&(Zr(t,"an active stage did not settle during shutdown; late commands remain refused"),t.onExit&&(process.removeListener("exit",t.onExit),t.onExit(),t.onExit=void 0))}function Y7(e){return eE().length>0||ei(e)}function $Vt(e){if(eE().length>0&&!ei(e))throw new Error("protected repository SCM commands require an initialized shared-environment boundary")}var _P=["--no-pager","-c","core.hooksPath=/dev/null","-c","core.fsmonitor=false","-c","commit.gpgsign=false","-c","tag.gpgsign=false","-c","core.sshCommand=/usr/bin/false","-c","credential.helper=","-c","core.askPass=/usr/bin/false","-c","core.alternateRefsCommand=","-c","diff.external=","-c","protocol.allow=never","-c","protocol.https.allow=always"],OVt="^(filter\\..*\\.(clean|smudge|process)|merge\\..*\\.driver|diff\\..*\\.(command|textconv))$";function HQe(e){let t={...e,GIT_ALLOW_PROTOCOL:"https",GIT_TERMINAL_PROMPT:"0",GIT_ASKPASS:"/usr/bin/false",GIT_EDITOR:"/usr/bin/true",GIT_SEQUENCE_EDITOR:"/usr/bin/true"};for(let r of["GIT_CONFIG","GIT_CONFIG_PARAMETERS","GIT_EXEC_PATH","GIT_EXTERNAL_DIFF","GIT_SSH","GIT_SSH_COMMAND","GIT_SSH_VARIANT","GIT_PROXY_COMMAND","GIT_PAGER"])delete t[r];for(let r of SI)delete t[r];return t}function VQe(e,t){let r=RI(e,"git"),n=r.executable,s=nE(e,{...HQe(t),PATH:r.env.PATH}),i=Ro([n,..._P,"config","--null","--name-only","--get-regexp",OVt],e,s),o=[];try{o=(0,NP.execFileSync)(i.argv[0],i.argv.slice(1),{cwd:e,env:i.env,encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:3e4}).split("\0").filter(Boolean)}catch(c){if(c.status!==1)throw c}if(o.some(c=>c.includes("=")))throw new Error("protected Git cannot safely disable an executable Git configuration key containing '='");let a=o.flatMap(c=>["-c",`${c}=${c.startsWith("merge.")?"false":""}`]);return{binary:n,env:s,config:[..._P,...a]}}function PP(e,t,r=process.env){if(!ei(t))return{argv:["git",...e],env:r};let n=VQe(t,r),s=[...e],i=new Set(["-c","-C","--config-env","--git-dir","--work-tree","--namespace","--super-prefix","--exec-path"]);for(let o=0;o<s.length;o++){if(i.has(s[o])){o++;continue}if(!s[o].startsWith("-")){s[o]==="diff"&&s.splice(o+1,0,"--no-ext-diff","--no-textconv");break}}return Ro([n.binary,...n.config,...s],t,n.env)}function WQe(e,t,r,n=process.env){let s=pm.basename(e);if((s==="git"||s==="gh")&&$Vt(r),s==="git")return PP(t,r,n);if(s!=="gh")return{argv:[e,...t],env:n};if(!ei(r))return{argv:[e,...t],env:n};let i=VQe(r,n),o={...i.env},a=Number(o.GIT_CONFIG_COUNT??0);if(!Number.isSafeInteger(a)||a<0)throw new Error("invalid Git transport configuration count");for(let c=0;c<i.config.length;c++){if(i.config[c]!=="-c")continue;let u=i.config[++c],l=u.indexOf("=");o[`GIT_CONFIG_KEY_${a}`]=u.slice(0,l),o[`GIT_CONFIG_VALUE_${a++}`]=u.slice(l+1)}return o.GIT_CONFIG_COUNT=String(a),Ro([RI(r,"gh").executable,...t],r,o)}function yt(e,t){let r=PP(e,t.cwd,t.env??process.env);return(0,NP.execFileSync)(r.argv[0],r.argv.slice(1),{...t,env:r.env})}function oj(e,t){let r=PP(e,t.cwd,t.env??process.env);return(0,NP.spawnSync)(r.argv[0],r.argv.slice(1),{...t,env:r.env})}function JQe(e,t,r){let n=e.indexOf("-R"),s=e[0]==="api",i=e.slice(3),a=i.length%2===0&&i.every((h,g)=>g%2!==0||["-R","--json","-q","--jq"].includes(h))&&!e[2]?.startsWith("-")&&e[0]==="pr"&&e[1]==="view"&&n>=2&&/^[^/\\\s]+\/[^/\\\s]+$/.test(e[n+1]??"")&&!e.includes("--web");if(!s&&!a)throw new Error("trusted SCM control calls require gh api or an explicit-repository PR view");let c=r.GH_CONFIG_DIR??pm.join(r.XDG_CONFIG_HOME??pm.join(r.HOME??ij.homedir(),".config"),"gh"),u=pm.join(c,"hosts.yml"),l=Fl.existsSync(u)?Fl.realpathSync(u):void 0,d=Py("gh",t,HQe(r),l?[l]:[],eE()),p=Fl.mkdtempSync(pm.join(ij.tmpdir(),"skyramp-scm-api-"));Fl.chmodSync(p,448);let f=()=>Fl.rmSync(p,{recursive:!0,force:!0});try{l&&Fl.copyFileSync(l,pm.join(p,"hosts.yml"));let h={...d.env};for(let y of Object.keys(h))(y.startsWith("GIT_")||y.startsWith("INPUT_"))&&delete h[y];Object.assign(h,{HOME:p,XDG_CONFIG_HOME:p,GH_CONFIG_DIR:p,GH_PROMPT_DISABLED:"1",GH_NO_UPDATE_NOTIFIER:"1",GH_NO_EXTENSION_UPDATE_NOTIFIER:"1",GIT_ALLOW_PROTOCOL:"https",GIT_TERMINAL_PROMPT:"0",GIT_CONFIG_NOSYSTEM:"1",GIT_CONFIG_GLOBAL:"/dev/null",GIT_CONFIG_SYSTEM:"/dev/null",GIT_DIR:pm.join(p,"no-repository")});let g=0;for(let y=0;y<_P.length;y++){if(_P[y]!=="-c")continue;let m=_P[++y],A=m.indexOf("=");h[`GIT_CONFIG_KEY_${g}`]=m.slice(0,A),h[`GIT_CONFIG_VALUE_${g++}`]=m.slice(A+1)}return h.GIT_CONFIG_COUNT=String(g),{argv:[d.executable,...e],env:h,cwd:p,cleanup:f}}catch(h){throw f(),h}}function DVt(e){try{return fm.lstatSync(e),!0}catch{return!1}}function TI(e){let t=ko.resolve(e),r=[];for(;!DVt(t);){let s=ko.dirname(t);if(s===t)break;r.unshift(ko.basename(t)),t=s}let n=t;try{n=fm.realpathSync(t)}catch{try{fm.lstatSync(t).isSymbolicLink()&&(n=ko.resolve(ko.dirname(t),fm.readlinkSync(t)))}catch{}}return r.length?ko.join(n,...r):n}function By(e,t){let r=TI(e),n=TI(ko.resolve(e,t)),s=ko.relative(r,n);if(s==="")return".";if(!(s===".."||s.startsWith(`..${ko.sep}`)||ko.isAbsolute(s)))return s}function Jn(e,t){return By(e,t)!==void 0}function uf(e,t){return Jn(e,t)&&fm.existsSync(ko.resolve(e,t))}function Gc(e){let t=e.split(/[\\/]/)[0];return t===".skyramp"||t===".testbot"}function BP(e){try{return yt([...Er,"ls-files","-z","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",env:Ue(),maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"]}).split("\0").filter(Boolean)}catch{return}}function $y(){let e=new Map;return t=>()=>e.has(t)?e.get(t):e.set(t,BP(t)).get(t)}function aj(e,t,r,n){let s=o=>!r||o.startsWith(`${r}/`),i=o=>o===t||o.endsWith(`/${t}`);return s(e)&&i(e)&&!!n?.includes(e)&&n.filter(o=>s(o)&&i(o)).length===1}var aLe=H(require("path"));var b={};Ia(b,{BRAND:()=>cWt,DIRTY:()=>sE,EMPTY_PATH:()=>LVt,INVALID:()=>$t,NEVER:()=>HWt,OK:()=>_a,ParseStatus:()=>Zo,Schema:()=>fr,ZodAny:()=>My,ZodArray:()=>ym,ZodBigInt:()=>oE,ZodBoolean:()=>aE,ZodBranded:()=>OP,ZodCatch:()=>AE,ZodDate:()=>cE,ZodDefault:()=>yE,ZodDiscriminatedUnion:()=>lj,ZodEffects:()=>Ul,ZodEnum:()=>mE,ZodError:()=>Hc,ZodFirstPartyTypeKind:()=>jt,ZodFunction:()=>pj,ZodIntersection:()=>pE,ZodIssueCode:()=>Pe,ZodLazy:()=>fE,ZodLiteral:()=>hE,ZodMap:()=>OI,ZodNaN:()=>MI,ZodNativeEnum:()=>gE,ZodNever:()=>Zd,ZodNull:()=>lE,ZodNullable:()=>pf,ZodNumber:()=>iE,ZodObject:()=>Vc,ZodOptional:()=>Ql,ZodParsedType:()=>rt,ZodPipeline:()=>DP,ZodPromise:()=>Fy,ZodReadonly:()=>bE,ZodRecord:()=>dj,ZodSchema:()=>fr,ZodSet:()=>DI,ZodString:()=>Dy,ZodSymbol:()=>BI,ZodTransformer:()=>Ul,ZodTuple:()=>df,ZodType:()=>fr,ZodUndefined:()=>uE,ZodUnion:()=>dE,ZodUnknown:()=>gm,ZodVoid:()=>$I,addIssueToContext:()=>Ge,any:()=>yWt,array:()=>EWt,bigint:()=>pWt,boolean:()=>oLe,coerce:()=>GWt,custom:()=>nLe,date:()=>fWt,datetimeRegex:()=>tLe,defaultErrorMap:()=>hm,discriminatedUnion:()=>CWt,effect:()=>MWt,enum:()=>$Wt,function:()=>NWt,getErrorMap:()=>_I,getParsedType:()=>lf,instanceof:()=>lWt,intersection:()=>IWt,isAborted:()=>cj,isAsync:()=>NI,isDirty:()=>uj,isValid:()=>Oy,late:()=>uWt,lazy:()=>PWt,literal:()=>BWt,makeIssue:()=>$P,map:()=>TWt,nan:()=>dWt,nativeEnum:()=>OWt,never:()=>bWt,null:()=>gWt,nullable:()=>QWt,number:()=>iLe,object:()=>vWt,objectUtil:()=>K7,oboolean:()=>zWt,onumber:()=>qWt,optional:()=>FWt,ostring:()=>jWt,pipeline:()=>UWt,preprocess:()=>LWt,promise:()=>DWt,quotelessJson:()=>MVt,record:()=>kWt,set:()=>_Wt,setErrorMap:()=>QVt,strictObject:()=>SWt,string:()=>sLe,symbol:()=>hWt,transformer:()=>MWt,tuple:()=>RWt,undefined:()=>mWt,union:()=>xWt,unknown:()=>AWt,util:()=>kr,void:()=>wWt});var kr;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(kr||(kr={}));var K7;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(K7||(K7={}));var rt=kr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lf=e=>{switch(typeof e){case"undefined":return rt.undefined;case"string":return rt.string;case"number":return Number.isNaN(e)?rt.nan:rt.number;case"boolean":return rt.boolean;case"function":return rt.function;case"bigint":return rt.bigint;case"symbol":return rt.symbol;case"object":return Array.isArray(e)?rt.array:e===null?rt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?rt.promise:typeof Map<"u"&&e instanceof Map?rt.map:typeof Set<"u"&&e instanceof Set?rt.set:typeof Date<"u"&&e instanceof Date?rt.date:rt.object;default:return rt.unknown}};var Pe=kr.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"]),MVt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Hc=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let u=o.path[c],l=c===o.path.length-1;if(u==="_errors"){l&&a._errors.push(r(o)),c++;continue}Object.prototype.hasOwnProperty.call(a,u)||(u==="__proto__"?Object.defineProperty(a,u,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):a[u]={_errors:[]}),a=a[u],l&&a._errors.push(r(o)),c++}}};return s(this),n}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,kr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Hc.create=e=>new Hc(e);var FVt=(e,t)=>{let r;switch(e.code){case Pe.invalid_type:e.received===rt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Pe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,kr.jsonStringifyReplacer)}`;break;case Pe.unrecognized_keys:r=`Unrecognized key(s) in object: ${kr.joinValues(e.keys,", ")}`;break;case Pe.invalid_union:r="Invalid input";break;case Pe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${kr.joinValues(e.options)}`;break;case Pe.invalid_enum_value:r=`Invalid enum value. Expected ${kr.joinValues(e.options)}, received '${e.received}'`;break;case Pe.invalid_arguments:r="Invalid function arguments";break;case Pe.invalid_return_type:r="Invalid function return type";break;case Pe.invalid_date:r="Invalid date";break;case Pe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:kr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Pe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Pe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Pe.custom:r="Invalid input";break;case Pe.invalid_intersection_types:r="Intersection results could not be merged";break;case Pe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Pe.not_finite:r="Number must be finite";break;default:r=t.defaultError,kr.assertNever(e)}return{message:r}},hm=FVt;var YQe=hm;function QVt(e){YQe=e}function _I(){return YQe}var $P=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},LVt=[];function Ge(e,t){let r=_I(),n=$P({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hm?void 0:hm].filter(s=>!!s)});e.common.issues.push(n)}var Zo=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return $t;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return $t;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},$t=Object.freeze({status:"aborted"}),sE=e=>({status:"dirty",value:e}),_a=e=>({status:"valid",value:e}),cj=e=>e.status==="aborted",uj=e=>e.status==="dirty",Oy=e=>e.status==="valid",NI=e=>typeof Promise<"u"&&e instanceof Promise;var At;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(At||(At={}));var Ll=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},KQe=(e,t)=>{if(Oy(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 r=new Hc(e.common.issues);return this._error=r,this._error}}};function ir(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var fr=class{get description(){return this._def.description}_getType(t){return lf(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:lf(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Zo,ctx:{common:t.parent.common,data:t.data,parsedType:lf(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(NI(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lf(t)},s=this._parseSync({data:t,path:n.path,parent:n});return KQe(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lf(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Oy(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Oy(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lf(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(NI(s)?s:Promise.resolve(s));return KQe(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:Pe.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ul({schema:this,typeName:jt.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:r=>this["~validate"](r)}}optional(){return Ql.create(this,this._def)}nullable(){return pf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ym.create(this)}promise(){return Fy.create(this,this._def)}or(t){return dE.create([this,t],this._def)}and(t){return pE.create(this,t,this._def)}transform(t){return new Ul({...ir(this._def),schema:this,typeName:jt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new yE({...ir(this._def),innerType:this,defaultValue:r,typeName:jt.ZodDefault})}brand(){return new OP({typeName:jt.ZodBranded,type:this,...ir(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new AE({...ir(this._def),innerType:this,catchValue:r,typeName:jt.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return DP.create(this,t)}readonly(){return bE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},UVt=/^c[^\s-]{8,}$/i,jVt=/^[0-9a-z]+$/,qVt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zVt=/^[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,GVt=/^[a-z0-9_-]{21}$/i,HVt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VVt=/^[-+]?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)?)??$/,WVt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JVt="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",Z7,YVt=/^(?:(?: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])$/,KVt=/^(?:(?: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])$/,ZVt=/^(([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]))$/,XVt=/^(([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])$/,eWt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tWt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,XQe="((\\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])))",rWt=new RegExp(`^${XQe}$`);function eLe(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function nWt(e){return new RegExp(`^${eLe(e)}$`)}function tLe(e){let t=`${XQe}T${eLe(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sWt(e,t){return!!((t==="v4"||!t)&&YVt.test(e)||(t==="v6"||!t)&&ZVt.test(e))}function iWt(e,t){if(!HVt.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function oWt(e,t){return!!((t==="v4"||!t)&&KVt.test(e)||(t==="v6"||!t)&&XVt.test(e))}var Dy=class e extends fr{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==rt.string){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_type,expected:rt.string,received:i.parsedType}),$t}let n=new Zo,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?Ge(s,{code:Pe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Ge(s,{code:Pe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")WVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"email",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Z7||(Z7=new RegExp(JVt,"u")),Z7.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"emoji",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")zVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"uuid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")GVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"nanoid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")UVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"cuid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")jVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"cuid2",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")qVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"ulid",code:Pe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),Ge(s,{validation:"url",code:Pe.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"regex",code:Pe.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.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)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?tLe(i).test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?rWt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?nWt(i).test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?VVt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"duration",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?sWt(t.data,i.version)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"ip",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?iWt(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"jwt",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?oWt(t.data,i.version)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"cidr",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?eWt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"base64",code:Pe.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?tWt.test(t.data)||(s=this._getOrReturnCtx(t,s),Ge(s,{validation:"base64url",code:Pe.invalid_string,message:i.message}),n.dirty()):kr.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Pe.invalid_string,...At.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...At.errToObj(t)})}url(t){return this._addCheck({kind:"url",...At.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...At.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...At.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...At.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...At.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...At.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...At.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...At.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...At.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...At.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...At.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...At.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,...At.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,...At.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...At.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...At.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...At.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...At.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...At.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...At.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...At.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...At.errToObj(r)})}nonempty(t){return this.min(1,At.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Dy.create=e=>new Dy({checks:[],typeName:jt.ZodString,coerce:e?.coerce??!1,...ir(e)});function aWt(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var iE=class e extends fr{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)!==rt.number){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_type,expected:rt.number,received:i.parsedType}),$t}let n,s=new Zo;for(let i of this._def.checks)i.kind==="int"?kr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?aWt(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.not_finite,message:i.message}),s.dirty()):kr.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,At.toString(r))}gt(t,r){return this.setLimit("min",t,!1,At.toString(r))}lte(t,r){return this.setLimit("max",t,!0,At.toString(r))}lt(t,r){return this.setLimit("max",t,!1,At.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:At.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:At.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:At.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:At.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:At.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:At.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:At.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:At.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:At.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:At.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&kr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};iE.create=e=>new iE({checks:[],typeName:jt.ZodNumber,coerce:e?.coerce||!1,...ir(e)});var oE=class e extends fr{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)!==rt.bigint)return this._getInvalidInput(t);let n,s=new Zo;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Pe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):kr.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return Ge(r,{code:Pe.invalid_type,expected:rt.bigint,received:r.parsedType}),$t}gte(t,r){return this.setLimit("min",t,!0,At.toString(r))}gt(t,r){return this.setLimit("min",t,!1,At.toString(r))}lte(t,r){return this.setLimit("max",t,!0,At.toString(r))}lt(t,r){return this.setLimit("max",t,!1,At.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:At.toString(s)}]})}_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:At.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:At.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:At.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:At.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:At.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};oE.create=e=>new oE({checks:[],typeName:jt.ZodBigInt,coerce:e?.coerce??!1,...ir(e)});var aE=class extends fr{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==rt.boolean){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.boolean,received:n.parsedType}),$t}return _a(t.data)}};aE.create=e=>new aE({typeName:jt.ZodBoolean,coerce:e?.coerce||!1,...ir(e)});var cE=class e extends fr{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==rt.date){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_type,expected:rt.date,received:i.parsedType}),$t}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return Ge(i,{code:Pe.invalid_date}),$t}let n=new Zo,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),Ge(s,{code:Pe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):kr.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:At.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:At.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};cE.create=e=>new cE({checks:[],coerce:e?.coerce||!1,typeName:jt.ZodDate,...ir(e)});var BI=class extends fr{_parse(t){if(this._getType(t)!==rt.symbol){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.symbol,received:n.parsedType}),$t}return _a(t.data)}};BI.create=e=>new BI({typeName:jt.ZodSymbol,...ir(e)});var uE=class extends fr{_parse(t){if(this._getType(t)!==rt.undefined){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.undefined,received:n.parsedType}),$t}return _a(t.data)}};uE.create=e=>new uE({typeName:jt.ZodUndefined,...ir(e)});var lE=class extends fr{_parse(t){if(this._getType(t)!==rt.null){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.null,received:n.parsedType}),$t}return _a(t.data)}};lE.create=e=>new lE({typeName:jt.ZodNull,...ir(e)});var My=class extends fr{constructor(){super(...arguments),this._any=!0}_parse(t){return _a(t.data)}};My.create=e=>new My({typeName:jt.ZodAny,...ir(e)});var gm=class extends fr{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _a(t.data)}};gm.create=e=>new gm({typeName:jt.ZodUnknown,...ir(e)});var Zd=class extends fr{_parse(t){let r=this._getOrReturnCtx(t);return Ge(r,{code:Pe.invalid_type,expected:rt.never,received:r.parsedType}),$t}};Zd.create=e=>new Zd({typeName:jt.ZodNever,...ir(e)});var $I=class extends fr{_parse(t){if(this._getType(t)!==rt.undefined){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.void,received:n.parsedType}),$t}return _a(t.data)}};$I.create=e=>new $I({typeName:jt.ZodVoid,...ir(e)});var ym=class e extends fr{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==rt.array)return Ge(r,{code:Pe.invalid_type,expected:rt.array,received:r.parsedType}),$t;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(Ge(r,{code:o?Pe.too_big:Pe.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(Ge(r,{code:Pe.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(Ge(r,{code:Pe.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Ll(r,o,r.path,a)))).then(o=>Zo.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new Ll(r,o,r.path,a)));return Zo.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:At.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:At.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:At.toString(r)}})}nonempty(t){return this.min(1,t)}};ym.create=(e,t)=>new ym({type:e,minLength:null,maxLength:null,exactLength:null,typeName:jt.ZodArray,...ir(t)});function PI(e){if(e instanceof Vc){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Ql.create(PI(n))}return new Vc({...e._def,shape:()=>t})}else return e instanceof ym?new ym({...e._def,type:PI(e.element)}):e instanceof Ql?Ql.create(PI(e.unwrap())):e instanceof pf?pf.create(PI(e.unwrap())):e instanceof df?df.create(e.items.map(t=>PI(t))):e}var Vc=class e extends fr{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(),r=kr.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==rt.object){let u=this._getOrReturnCtx(t);return Ge(u,{code:Pe.invalid_type,expected:rt.object,received:u.parsedType}),$t}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zd&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Ll(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Zd){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(Ge(s,{code:Pe.unrecognized_keys,keys:a}),n.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 d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Ll(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>Zo.mergeObjectSync(n,u)):Zo.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return At.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:At.errToObj(t).message??s}:{message:s}}}:{}})}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:jt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of kr.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of kr.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return PI(this)}partial(t){let r={};for(let n of kr.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of kr.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ql;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return rLe(kr.objectKeys(this.shape))}};Vc.create=(e,t)=>new Vc({shape:()=>e,unknownKeys:"strip",catchall:Zd.create(),typeName:jt.ZodObject,...ir(t)});Vc.strictCreate=(e,t)=>new Vc({shape:()=>e,unknownKeys:"strict",catchall:Zd.create(),typeName:jt.ZodObject,...ir(t)});Vc.lazycreate=(e,t)=>new Vc({shape:e,unknownKeys:"strip",catchall:Zd.create(),typeName:jt.ZodObject,...ir(t)});var dE=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(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 r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Hc(a.ctx.common.issues));return Ge(r,{code:Pe.invalid_union,unionErrors:o}),$t}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.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 r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Hc(c));return Ge(r,{code:Pe.invalid_union,unionErrors:a}),$t}}get options(){return this._def.options}};dE.create=(e,t)=>new dE({options:e,typeName:jt.ZodUnion,...ir(t)});var mm=e=>e instanceof fE?mm(e.schema):e instanceof Ul?mm(e.innerType()):e instanceof hE?[e.value]:e instanceof mE?e.options:e instanceof gE?kr.objectValues(e.enum):e instanceof yE?mm(e._def.innerType):e instanceof uE?[void 0]:e instanceof lE?[null]:e instanceof Ql?[void 0,...mm(e.unwrap())]:e instanceof pf?[null,...mm(e.unwrap())]:e instanceof OP||e instanceof bE?mm(e.unwrap()):e instanceof AE?mm(e._def.innerType):[],lj=class e extends fr{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.object)return Ge(r,{code:Pe.invalid_type,expected:rt.object,received:r.parsedType}),$t;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Ge(r,{code:Pe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),$t)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=mm(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(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:jt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...ir(n)})}};function X7(e,t){let r=lf(e),n=lf(t);if(e===t)return{valid:!0,data:e};if(r===rt.object&&n===rt.object){let s=kr.objectKeys(t),i=kr.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let a of i){if(a==="__proto__")continue;let c=X7(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===rt.array&&n===rt.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=X7(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===rt.date&&n===rt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var pE=class extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(cj(i)||cj(o))return $t;let a=X7(i.value,o.value);return a.valid?((uj(i)||uj(o))&&r.dirty(),{status:r.value,value:a.data}):(Ge(n,{code:Pe.invalid_intersection_types}),$t)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};pE.create=(e,t,r)=>new pE({left:e,right:t,typeName:jt.ZodIntersection,...ir(r)});var df=class e extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.array)return Ge(n,{code:Pe.invalid_type,expected:rt.array,received:n.parsedType}),$t;if(n.data.length<this._def.items.length)return Ge(n,{code:Pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$t;!this._def.rest&&n.data.length>this._def.items.length&&(Ge(n,{code:Pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Ll(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>Zo.mergeArray(r,o)):Zo.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};df.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new df({items:e,typeName:jt.ZodTuple,rest:null,...ir(t)})};var dj=class e extends fr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.object)return Ge(n,{code:Pe.invalid_type,expected:rt.object,received:n.parsedType}),$t;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new Ll(n,a,n.path,a)),value:o._parse(new Ll(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Zo.mergeObjectAsync(r,s):Zo.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof fr?new e({keyType:t,valueType:r,typeName:jt.ZodRecord,...ir(n)}):new e({keyType:Dy.create(),valueType:t,typeName:jt.ZodRecord,...ir(r)})}},OI=class extends fr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.map)return Ge(n,{code:Pe.invalid_type,expected:rt.map,received:n.parsedType}),$t;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Ll(n,a,n.path,[u,"key"])),value:i._parse(new Ll(n,c,n.path,[u,"value"]))}));if(n.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 $t;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.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 $t;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};OI.create=(e,t,r)=>new OI({valueType:t,keyType:e,typeName:jt.ZodMap,...ir(r)});var DI=class e extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==rt.set)return Ge(n,{code:Pe.invalid_type,expected:rt.set,received:n.parsedType}),$t;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(Ge(n,{code:Pe.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(Ge(n,{code:Pe.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return $t;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new Ll(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:At.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:At.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};DI.create=(e,t)=>new DI({valueType:e,minSize:null,maxSize:null,typeName:jt.ZodSet,...ir(t)});var pj=class e extends fr{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.function)return Ge(r,{code:Pe.invalid_type,expected:rt.function,received:r.parsedType}),$t;function n(a,c){return $P({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,_I(),hm].filter(u=>!!u),issueData:{code:Pe.invalid_arguments,argumentsError:c}})}function s(a,c){return $P({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,_I(),hm].filter(u=>!!u),issueData:{code:Pe.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Fy){let a=this;return _a(async function(...c){let u=new Hc([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return _a(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Hc([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Hc([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:df.create(t).rest(gm.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,r,n){return new e({args:t||df.create([]).rest(gm.create()),returns:r||gm.create(),typeName:jt.ZodFunction,...ir(n)})}},fE=class extends fr{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};fE.create=(e,t)=>new fE({getter:e,typeName:jt.ZodLazy,...ir(t)});var hE=class extends fr{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return Ge(r,{received:r.data,code:Pe.invalid_literal,expected:this._def.value}),$t}return{status:"valid",value:t.data}}get value(){return this._def.value}};hE.create=(e,t)=>new hE({value:e,typeName:jt.ZodLiteral,...ir(t)});function rLe(e,t){return new mE({values:e,typeName:jt.ZodEnum,...ir(t)})}var mE=class e extends fr{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return Ge(r,{expected:kr.joinValues(n),received:r.parsedType,code:Pe.invalid_type}),$t}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return Ge(r,{received:r.data,code:Pe.invalid_enum_value,options:n}),$t}return _a(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};mE.create=rLe;var gE=class extends fr{_parse(t){let r=kr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==rt.string&&n.parsedType!==rt.number){let s=kr.objectValues(r);return Ge(n,{expected:kr.joinValues(s),received:n.parsedType,code:Pe.invalid_type}),$t}if(this._cache||(this._cache=new Set(kr.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=kr.objectValues(r);return Ge(n,{received:n.data,code:Pe.invalid_enum_value,options:s}),$t}return _a(t.data)}get enum(){return this._def.values}};gE.create=(e,t)=>new gE({values:e,typeName:jt.ZodNativeEnum,...ir(t)});var Fy=class extends fr{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==rt.promise&&r.common.async===!1)return Ge(r,{code:Pe.invalid_type,expected:rt.promise,received:r.parsedType}),$t;let n=r.parsedType===rt.promise?r.data:Promise.resolve(r.data);return _a(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Fy.create=(e,t)=>new Fy({type:e,typeName:jt.ZodPromise,...ir(t)});var Ul=class extends fr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===jt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{Ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return $t;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?$t:c.status==="dirty"?sE(c.value):r.value==="dirty"?sE(c.value):c});{if(r.value==="aborted")return $t;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?$t:a.status==="dirty"?sE(a.value):r.value==="dirty"?sE(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.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(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?$t:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?$t:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Oy(o))return $t;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Oy(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):$t);kr.assertNever(s)}};Ul.create=(e,t,r)=>new Ul({schema:e,typeName:jt.ZodEffects,effect:t,...ir(r)});Ul.createWithPreprocess=(e,t,r)=>new Ul({schema:t,effect:{type:"preprocess",transform:e},typeName:jt.ZodEffects,...ir(r)});var Ql=class extends fr{_parse(t){return this._getType(t)===rt.undefined?_a(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ql.create=(e,t)=>new Ql({innerType:e,typeName:jt.ZodOptional,...ir(t)});var pf=class extends fr{_parse(t){return this._getType(t)===rt.null?_a(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};pf.create=(e,t)=>new pf({innerType:e,typeName:jt.ZodNullable,...ir(t)});var yE=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===rt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};yE.create=(e,t)=>new yE({innerType:e,typeName:jt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ir(t)});var AE=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return NI(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Hc(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Hc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};AE.create=(e,t)=>new AE({innerType:e,typeName:jt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ir(t)});var MI=class extends fr{_parse(t){if(this._getType(t)!==rt.nan){let n=this._getOrReturnCtx(t);return Ge(n,{code:Pe.invalid_type,expected:rt.nan,received:n.parsedType}),$t}return{status:"valid",value:t.data}}};MI.create=e=>new MI({typeName:jt.ZodNaN,...ir(e)});var cWt=Symbol("zod_brand"),OP=class extends fr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},DP=class e extends fr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?$t:i.status==="dirty"?(r.dirty(),sE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?$t:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:jt.ZodPipeline})}},bE=class extends fr{_parse(t){let r=this._def.innerType._parse(t),n=s=>(Oy(s)&&(s.value=Object.freeze(s.value)),s);return NI(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};bE.create=(e,t)=>new bE({innerType:e,typeName:jt.ZodReadonly,...ir(t)});function ZQe(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function nLe(e,t={},r){return e?My.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=ZQe(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=ZQe(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):My.create()}var uWt={object:Vc.lazycreate},jt;(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"})(jt||(jt={}));var lWt=(e,t={message:`Input not instance of ${e.name}`})=>nLe(r=>r instanceof e,t),sLe=Dy.create,iLe=iE.create,dWt=MI.create,pWt=oE.create,oLe=aE.create,fWt=cE.create,hWt=BI.create,mWt=uE.create,gWt=lE.create,yWt=My.create,AWt=gm.create,bWt=Zd.create,wWt=$I.create,EWt=ym.create,vWt=Vc.create,SWt=Vc.strictCreate,xWt=dE.create,CWt=lj.create,IWt=pE.create,RWt=df.create,kWt=dj.create,TWt=OI.create,_Wt=DI.create,NWt=pj.create,PWt=fE.create,BWt=hE.create,$Wt=mE.create,OWt=gE.create,DWt=Fy.create,MWt=Ul.create,FWt=Ql.create,QWt=pf.create,LWt=Ul.createWithPreprocess,UWt=DP.create,jWt=()=>sLe().optional(),qWt=()=>iLe().optional(),zWt=()=>oLe().optional(),GWt={string:(e=>Dy.create({...e,coerce:!0})),number:(e=>iE.create({...e,coerce:!0})),boolean:(e=>aE.create({...e,coerce:!0})),bigint:(e=>oE.create({...e,coerce:!0})),date:(e=>cE.create({...e,coerce:!0}))};var HWt=$t;var wE=(s=>(s.ModelProvider="model_provider",s.SutAccess="sut_access",s.Skyramp="skyramp",s.Other="other",s))(wE||{}),Am=(n=>(n.Ready="ready",n.Blocked="blocked",n.NeedsInputs="needs_inputs",n))(Am||{}),FI=e=>e==="ready"||e==="needs_inputs",MP=300,Qs=b.string().trim().min(1),VWt=b.object({action:b.enum(["start","run","wait"]),text:Qs,source:b.enum(["file","notes","testbot"]).describe("file: a file in the repository; notes: the Target's notes; testbot: Testbot's own finding"),file:Qs.nullable().describe("the file the step came from, relative to the component's repository; null unless source is file")}).strict().refine(e=>e.source==="file"==(e.file!==null),{path:["file"],message:"a file exactly when the step came from one"}),FP=/^[A-Za-z_][A-Za-z0-9_]*$/,Wc=/^(?!GITHUB_)(?!SKYRAMP_RUNNER_)[A-Z][A-Z0-9_]{0,99}$/,QI=(o=>(o.VersionEndpoint="version_endpoint",o.DeployWorkflow="deploy_workflow",o.KubernetesLabels="kubernetes_labels",o.Command="command",o.Api="api",o.NotTracked="not_tracked",o))(QI||{}),Nn="shared",WWt=Qs.refine(e=>{try{let t=new URL(e);return["http:","https:"].includes(t.protocol)&&!t.username&&!t.password}catch{return!1}},"an http(s) URL with no login in it"),LI=b.object({address:WWt,readyWhen:Qs.nullable(),credentials:b.array(b.string().regex(Wc)).max(50),revisionSources:b.array(b.object({method:b.nativeEnum(QI),detail:Qs.describe("what Testbot reads, such as GET /version or the deploy workflow's name; for not_tracked, why nothing shows it"),components:b.array(Qs).min(1).describe("the components it tells the revision of, by name")}).strict()).max(50)}).strict(),eee={steps:b.array(VWt).max(20).optional().describe("how it starts, in order"),kind:b.enum(["web_app","service","database","external_service"]).optional(),from:b.object({file:Qs,service:Qs.nullable()}).strict().optional(),credentials:b.array(b.string().max(100).regex(FP)).max(50).optional().describe("the Target's credentials this component's recipe uses: a sign-in (a test user, password or token) or an API key, which the workflow supplies from a GitHub Actions secret as the environment variable of the credential's name; give each name exactly as the recipe reads it. Names only, never a value, and not a secret the recipe generates itself")},QP=b.object({name:Qs,repository:Qs.describe("owner/repo of the Target repository the component is built or started from, such as the one whose compose file starts its database"),healthy:b.boolean(),...eee,deployed:Qs.nullable().optional().describe('only with "environment": the revision the component runs, as you read it from its revision source, or null when you could not tell')}),JWt=b.object({name:b.string().regex(Wc).describe("the credential's environment variable name, as the recipe reads it and the credentials event names it"),purpose:b.enum(["sut_access","other"]).describe("sut_access: it signs in to or calls the SUT or a service it needs; other: anything else"),required:b.boolean().describe("false only when the SUT starts without it, with less working"),how:Qs.max(MP).describe('one short sentence: what the value is and where a person gets it, such as "A Mattermost Enterprise licence key, from the customer portal"; never a value')}),YWt=b.object({component:Qs,problem:Qs,evidence:Qs.describe("the exact command and output that shows it"),fix:Qs.describe("what the user must provide, and where")}),KWt=b.object({framework:Qs,file:Qs.describe("the test file run, relative to its repository root"),result:b.enum(["pass","fail","error"])}),ZWt=b.object({input:Qs.describe("the part of the user's SUT input, as given"),reason:Qs}),UI=b.object({schemaVersion:b.literal(1),status:b.nativeEnum(Am).describe("ready only if every component came up healthy and the recipe is written; needs_inputs when the recipe is written but a component cannot start without a credential this run has no value for"),components:b.array(QP),suites:b.array(KWt).default([]).describe("one run per test suite the Target's repositories have; empty when they have none"),inputsUsed:b.array(Qs).default([]).describe("the parts of the user's SUT input the recipe used as given"),inputsUsedHow:b.array(b.object({input:Qs.describe("exactly as written in inputsUsed; an entry that is not there is left out"),how:Qs.describe("what the recipe did with it")})).optional(),inputsNotUsed:b.array(ZWt).default([]).describe("the parts it did not use, and why. A part that is wrong goes here, with what was wrong, even when the recipe does something like it instead: one the repositories or the app show is wrong, such as a file, command, port, route or setting that is not there. Something outside them that does not answer is not one: that is a blocker"),blockers:b.array(YWt).describe("required (non-empty) when status is blocked"),inputs:b.array(JWt).max(50).optional().describe("required (non-empty) when status is needs_inputs, else left out: each credential the candidate recipe needs a value for"),environment:LI.optional().describe("only when the whole SUT is an existing deployment you tested where it runs, building and starting nothing: its address, what says it is ready, the credentials that reach it, and how to read what each component runs. Leave it out when any part was built or started on the runner, or reaching it needed something there (a tunnel, port-forward, proxy or client certificate)")});function tee(e){let t=XWt(e);if(t.length>0)return t;if(e.status==="blocked"&&!(Array.isArray(e.blockers)&&e.blockers.length>0))return['status "blocked" requires at least one blocker { component, problem, evidence, fix } \u2014 say what stopped the bring-up'];let r=Array.isArray(e.inputs)?e.inputs:[];if(e.status==="needs_inputs"&&r.length===0)return['status "needs_inputs" requires at least one input { name, purpose, required, how } \u2014 say which credential the recipe needs a value for'];if(e.status!=="needs_inputs"&&r.length>0)return['"inputs" only with status "needs_inputs": leave it out, or answer "needs_inputs"'];if(e.status==="ready"||e.status==="needs_inputs"){let n=Array.isArray(e.components)?e.components:[];if(n.length===0)return[`status "${String(e.status)}" requires at least one component \u2014 name each component the recipe brought up healthy`];let s=new Set(r.map(u=>u.name)),i=u=>Array.isArray(u.credentials)&&u.credentials.some(l=>s.has(l)),o=n.filter(u=>u?.healthy!==!0&&!i(u)).map(u=>String(u?.name??"?"));if(o.length>0)return[`status "${String(e.status)}" requires every component healthy${s.size>0?", except one that reads an input":""}; not healthy: ${o.join(", ")} \u2014 answer "blocked" with a blocker for each, or bring them up and answer "${String(e.status)}" again`];let a=new Set(n.flatMap(u=>Array.isArray(u.credentials)?u.credentials:[])),c=r.map(u=>String(u.name)).filter(u=>!a.has(u));if(c.length>0)return[`each input is a credential a component reads: ${c.join(", ")} ${c.length>1?"are":"is"} in no component's "credentials"`]}return[]}function XWt(e){let t=Array.isArray(e.components)?e.components:[],r=e.environment;if(!r){let a=t.filter(c=>c?.deployed!==void 0||c?.repository===Nn).map(c=>String(c?.name??"?"));return a.length>0?[`"deployed" and a "${Nn}" repository belong only to an answer with "environment"; remove them from: ${a.join(", ")}`]:[]}let n=[],s=t.filter(a=>a?.deployed===void 0).map(a=>String(a?.name??"?"));s.length>0&&n.push(`with "environment", every component says what it runs in "deployed" (null when you could not tell); missing for: ${s.join(", ")}`);let i=new Set(t.map(a=>a?.name)),o=(r.revisionSources??[]).flatMap(a=>a?.components??[]).filter(a=>!i.has(a));return o.length>0&&n.push(`each revision source names components of this answer; not one of them: ${o.map(String).join(", ")}`),n}var EE=64*1024,vE=512*1024,fj=/[\u0000-\u0008\u000b\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;var Jc=(s=>(s.Clean="clean",s.RecipeDrift="recipe-drift",s.ChangeBrokeBringup="change-broke-bringup",s.BringupFailed="bringup-failed",s))(Jc||{}),Xd=b.string().trim().min(1),ree=b.object({url:b.string().optional().describe("the URL probed, if the check is an HTTP request"),command:b.string().optional().describe("the command run, if the check is a script \u2014 preferred when auth is needed"),headers:b.record(b.string()).optional(),status:b.union([b.number(),b.string()]).optional().describe("expected HTTP status for a url check (default 200)"),output:Xd.describe("what the check returned, VERBATIM \u2014 the bytes, nothing appended; this gate RE-RUNS the check")}),nee=b.array(b.object({component:Xd.describe("a shared component listed above"),url:Xd.describe("the URL on the component's own origin (scheme, host and port) that answers with its deployed commit"),output:Xd.describe("what the URL returned, VERBATIM; this gate FETCHES each url")})).describe("only when shared components are listed above: one check per component whose deployed commit you found"),e4t=b.object({name:Xd.describe("the credential's environment variable name, as listed above; never its value"),component:Xd.describe("the component that refused it"),status:b.number().int().min(400).max(599).optional().describe("the HTTP status it got, such as 401 or 403; leave it out when the refusal was not an HTTP answer"),evidence:Xd.describe("the request or command you tested it with and what came back, never the value")}),LP=b.object({schemaVersion:b.literal(1),baseUrls:b.record(b.string()).optional().describe("service \u2192 base URL of the running app; omit on a failed bring-up, never invent one"),health:ree.optional(),teardown:Xd.describe("command that tears the SUT down"),dependencies:b.record(b.boolean()).optional().describe("EVERY backing service: true = really deployed, false = mocked; REQUIRED when the app came up"),outcome:b.nativeEnum(Jc).describe("clean | recipe-drift (you corrected the recipe) | change-broke-bringup (the PR broke it) | bringup-failed (environment, not the PR)"),recipeFixes:b.array(b.string()).optional().describe("required when outcome is recipe-drift: what was corrected"),bringupError:b.object({command:Xd,output:Xd}).optional().describe("required when bring-up failed: the exact failing command and what it printed"),suspectFiles:b.array(b.string()).optional().describe("required for change-broke-bringup: files THIS PR changed that the failure points at, relative to your working directory (a file in another checkout of the run: its absolute path)"),seeded:b.boolean(),startedAt:Xd.describe("ISO timestamp"),revisions:nee.optional(),missingSecrets:b.array(b.string().regex(FP)).optional().describe("bringup-failed only: each secret the app cannot start without that this run has no value for, by its environment variable name; never a value"),credentialsRefused:b.array(e4t).optional().describe("only for credentials the prompt lists to test: each that was refused when you tested it, such as with a 401 or 403; leave it out when none was, or when none is listed"),recipeRecorded:b.boolean().optional().describe("[derived] whether the checkout had a recorded recipe before bring-up")});function see(e){let t=[],r=s=>!!s&&typeof s=="object"&&!Array.isArray(s);return e.outcome!=="change-broke-bringup"&&e.outcome!=="bringup-failed"?(!r(e.baseUrls)||Object.keys(e.baseUrls).length===0?t.push("baseUrls must be a non-empty object of service \u2192 url"):Object.values(e.baseUrls).every(s=>typeof s=="string"&&s.trim())||t.push("every baseUrls value must be a non-empty url string"),r(e.health)?!(typeof e.health.url=="string"&&e.health.url.trim())&&!(typeof e.health.command=="string"&&e.health.command.trim())&&t.push("health must record a url or a command (what you actually ran)"):t.push("health must be an object"),(!r(e.dependencies)||Object.keys(e.dependencies).length===0)&&t.push("dependencies must be a non-empty object of name \u2192 boolean (real vs mocked) when the SUT came up \u2014 account for every backing service so a mocked one can't be hidden behind a green run")):(r(e.bringupError)||t.push(`outcome "${String(e.outcome)}" requires bringupError { command, output } \u2014 the exact failing bring-up command and what it printed`),e.outcome==="change-broke-bringup"&&!(Array.isArray(e.suspectFiles)&&e.suspectFiles.length>0&&e.suspectFiles.every(s=>typeof s=="string"&&s.trim()))&&t.push("change-broke-bringup requires non-empty suspectFiles[] \u2014 the changed file(s) the failure points at; if you cannot point at a file this PR changed, the outcome is bringup-failed (environment/harness), not the PR's fault")),e.outcome==="recipe-drift"&&!(Array.isArray(e.recipeFixes)&&e.recipeFixes.length>0)&&t.push("recipe-drift outcome requires a non-empty recipeFixes[] describing what was corrected"),t}var Xo=b.string().trim().min(1),hj=Xo,iee=(r=>(r.TestbotManaged="testbot_managed",r.CustomerDeployed="customer_deployed",r))(iee||{}),jI=[".skyramp/sut/setup.sh",".skyramp/sut/teardown.sh"],UP=b.object({schemaVersion:b.literal(1),type:b.nativeEnum(iee).optional(),repository:hj.optional().describe("namespace/name of the source whose checkout the recipe was written and proven in (SKYR-5380); a run replays it from there. Never on a customer_deployed plan"),status:b.enum(["ready","blocked"]),environment:LI.optional(),components:b.array(b.object({name:Xo,repository:Xo.describe(`owner/repo, or "${Nn}" for a customer-deployed component no repository builds`),healthy:b.boolean(),url:b.string().min(1).nullable(),...eee,credentials:b.array(b.string().regex(Wc)).max(50).optional(),deployed:Xo.nullable().optional().describe("customer_deployed only: the revision the component runs, as setup read it (WF-SETUP-22's Deployed now), or null when it could not tell")}).strict()),suites:b.array(b.object({framework:Xo,file:Xo,result:b.enum(["pass","fail","error"])}).strict()),inputsUsed:b.array(Xo),inputsUsedHow:b.array(b.object({input:Xo,how:Xo}).strict()).optional(),inputsNotUsed:b.array(b.object({input:Xo,reason:Xo}).strict()),blockers:b.array(b.object({component:Xo,problem:Xo,evidence:Xo,fix:Xo}).strict()),replay:b.object({outcome:Xo,durationSeconds:b.number().nonnegative().nullable()}).strict().nullable(),files:b.array(b.object({path:Xo,content:b.string()}).strict())}).strict().superRefine((e,t)=>{e.inputsUsedHow?.forEach((s,i)=>{e.inputsUsed.includes(s.input)||t.addIssue({code:b.ZodIssueCode.custom,path:["inputsUsedHow",i,"input"],message:"not one of inputsUsed"})}),e.components.forEach((s,i)=>{s.credentials&&new Set(s.credentials).size!==s.credentials.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"credentials"],message:"names a credential twice"})});let r=e.type==="customer_deployed";r!==(e.environment!==void 0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["environment"],message:"an environment exactly when the plan's type is customer_deployed"}),r&&e.repository!==void 0&&t.addIssue({code:b.ZodIssueCode.custom,path:["repository"],message:"a customer_deployed plan names no repository"}),e.environment&&new Set(e.environment.credentials).size!==e.environment.credentials.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["environment","credentials"],message:"names a credential twice"});let n=new Set(e.components.map(s=>s.name));if(e.environment?.revisionSources.forEach((s,i)=>{s.components.forEach((o,a)=>{n.has(o)||t.addIssue({code:b.ZodIssueCode.custom,path:["environment","revisionSources",i,"components",a],message:"not one of components"})})}),e.components.forEach((s,i)=>{s.deployed!==void 0!==r&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"deployed"],message:"what a component runs exactly when the plan is customer_deployed"}),s.repository===Nn&&!r&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"repository"],message:`only a customer_deployed component is ${Nn}`})}),r&&(e.components.forEach((s,i)=>{e.components.findIndex(o=>o.name===s.name)!==i&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",i,"name"],message:"names a component twice"})}),e.replay!==null&&t.addIssue({code:b.ZodIssueCode.custom,path:["replay"],message:"a customer_deployed plan is never replayed"}),e.files.forEach((s,i)=>{jI.includes(s.path)&&t.addIssue({code:b.ZodIssueCode.custom,path:["files",i,"path"],message:"a customer_deployed plan has no script that starts or stops the system"})})),r&&e.status==="ready"){let s=new Set(e.environment?.revisionSources.flatMap(i=>i.components));e.components.forEach((i,o)=>{i.repository!==Nn&&!s.has(i.name)&&t.addIssue({code:b.ZodIssueCode.custom,path:["components",o,"name"],message:"a ready customer_deployed plan reads what every component a repository builds runs"})})}}),oee="awaits_credential_check",bm="Time limit reached",cLe="time_limit";var t4t=["clean","recipe-drift"];function Qy(e){let t=aLe.posix.normalize(e);return t===e&&(t===".skyramp/workspace.yml"||t.startsWith(".skyramp/sut/")&&t.length>13)}function r4t(e,t,r,n){let s=t.bringupError;if(e.environment)return{component:e.components.map(o=>o.name).join(", ")||"SUT",problem:`onboard reached the deployment, but deploy's fresh check of it ended ${t.outcome}`,evidence:s?`$ ${s.command}
|
|
181
181
|
${s.output}`:`deploy reported ${t.outcome} without the failing command`,fix:n?"make sure the deployment answers and is ready, then Check again; if .skyramp/sut/health.json's check itself is wrong, Run setup again":"make .skyramp/sut/health.json's check pass from a fresh session (its address, sign-in and ready route), then set it up again"};let i=t.suspectFiles?.length?` \u2014 it points at ${t.suspectFiles.join(", ")}`:"";return{component:e.components.map(o=>o.name).join(", ")||"SUT",problem:`the recipe worked once but not from nothing: deploy's fresh replay of .skyramp/sut/setup.sh ended ${t.outcome}`,evidence:s?`$ ${s.command}
|
|
182
|
-
${s.output}`:`deploy reported ${t.outcome} without the failing command`,fix:t.outcome==="change-broke-bringup"?`fix the change that broke bring-up${i}, then ${n?"Run setup again":"onboard again"}`:r.length>0?s4t(r):n?"if it failed for a reason that has passed, such as a service that was down, Check again; otherwise make .skyramp/sut/setup.sh bring the SUT up from a clean checkout, then Run setup again":"make .skyramp/sut/setup.sh bring the SUT up from a clean checkout (what onboard's session had that a fresh run lacks), then onboard again"}}function Ly(e){return[...new Set([...e.components.flatMap(t=>t.credentials??[]),...e.environment?.credentials??[]])].filter(t=>Wc.test(t))}function n4t(e,t,r){let n=new Set(Ly(e)),s=new Map;for(let i of t?.credentialsRefused??[]){let o=`${i.name}\0${i.component}`;n.has(i.name)&&!s.has(o)&&s.set(o,i)}return[...s.values()].map(({name:i,component:o,status:a,evidence:c})=>({component:o,problem:`${i} was refused${a?` (${a})`:""} by ${o}`,evidence:c,fix:`Fix ${i}'s value in its secret on the workflow host (${Uy}), or pick another secret for it under Credentials, then ${r?"Check again":"Retry"}.`}))}var Uy="a GitHub Actions secret, or on Azure DevOps a secret variable in the host repository's skyramp-testbot variable group under Pipelines \u203A Library";function s4t(e){let t=e.length===1;return`add ${t?"a secret":"secrets"} named ${e.join(", ")} on the workflow host, ${t?"as":"each as"} ${Uy}, then Retry: Skyramp adds ${t?"it":"them"} to the Target's credentials, and the replay gets ${t?"its value":"their values"}. If it still fails, make .skyramp/sut/setup.sh bring the SUT up from a clean checkout`}function i4t(e){return e.environment?{component:e.components.map(t=>t.name).join(", ")||"SUT",problem:"the deployment was never checked from a fresh session: deploy did not run or wrote no deploy.json",evidence:"outputs/deploy.json is missing from this run",fix:"run deploy after onboard in the same run so it checks the deployment is ready; if deploy ran, its stage log says why it wrote no deploy.json"}:{component:e.components.map(t=>t.name).join(", ")||"SUT",problem:"the recipe was never replayed: deploy did not run or wrote no deploy.json",evidence:"outputs/deploy.json is missing from this run",fix:"run deploy after onboard in the same run so it replays .skyramp/sut/setup.sh from a clean start; if deploy ran, its stage log says why it wrote no deploy.json"}}function o4t(e){return{component:e.components.map(t=>t.name).join(", ")||"SUT",problem:`${bm}: setup ran out of time while checking ${e.environment?"that the deployment is ready":"that the app comes up from a clean start"}. Every component was up before that.`,evidence:"The check from a fresh session didn't finish.",fix:"Retry: setup carries on from what this one found and finishes checking."}}function a4t(e){return{component:"SUT recipe",problem:"deploy fixed recipe drift, but the recipe it fixed was not collected \u2014 onboard's copy is the recipe from before the fix",evidence:`deploy reported recipe-drift: ${(e.recipeFixes??[]).join("; ")||"no fixes listed"}`,fix:"collect .skyramp/sut/ after deploy (collectRecipeFiles) and build the plan from that collection"}}var aee=[".skyramp/sut/setup.sh",".skyramp/sut/teardown.sh",".skyramp/sut/health.json"],cee=[".skyramp/sut/health.json"];function c4t(e){return`Onboard again so it leaves the whole recipe in the checkout: ${e.map(r=>`write ${r} as a regular file (a symlink is not uploaded)`).join("; ")}.`}function uee(e,t,r){return t&&r||e}function jP(e,t,r={}){let n=t!==void 0&&!t4t.includes(t.outcome),s=uee(e,t,r.recipeFiles),i=t?.outcome==="recipe-drift"&&!r.recipeFiles,o=(s.recipeFilesOmitted??[]).filter(I=>Qy(I.path)),a=o.length?[{component:"SUT recipe",problem:`The recipe could not be uploaded whole: ${o.map(I=>I.path).join(", ")} left out.`,evidence:o.map(I=>`${I.path}: ${I.reason}`).join("; "),fix:"Keep each recipe file text-only and under 64 KiB, and the recipe under 512 KiB in total \u2014 move large generated content out of .skyramp/sut/ and have setup.sh produce it."}]:[],c=FI(e.status),u=e.environment,l=new Set(s.recipeFiles.map(I=>I.path)),d=c?(u?cee:aee).filter(I=>!l.has(I)):[],p=d.length?[{component:"SUT recipe",problem:`The recipe is missing ${d.join(", ")}, so it cannot be replayed.`,evidence:`collected: ${[...l].sort().join(", ")||"nothing"}`,fix:c4t(d)}]:[],f=c&&!u&&(r.awaitsCredentialCheck?.length??0)>0,h=n4t(e,t,r.recheck??!1),g=t&&n?r4t(e,t,r.unsupplied??[],r.recheck??!1):void 0,y=(r.unsupplied?.length??0)>0||t?.outcome==="change-broke-bringup",m=h.length>0?[...h,...g&&y?[g]:[]]:g?[g]:t?[]:c&&!f?[r.timeLimit?o4t(e):i4t(e)]:[],A=new Set(u?.revisionSources.flatMap(I=>I.components)),w=u&&c?e.components.filter(I=>I.repository!==Nn&&!A.has(I.name)).map(I=>I.name):[],E=w.length?[{component:w.join(", "),problem:`Testbot cannot tell which revision ${w.join(" and ")} ${w.length>1?"run":"runs"}, so a run could not say which changes it tested.`,evidence:`revision sources: ${u.revisionSources.map(I=>`${I.detail} (${I.components.join(", ")})`).join("; ")||"none"}`,fix:"Say in the Test Environment's notes how to tell what is deployed, such as a version route (GET /version), then set it up again."}]:[],x=(c?u?.revisionSources??[]:[]).filter(I=>I.method==="not_tracked").map(I=>({component:I.components.join(", "),problem:`Testbot can't tell which commit ${I.components.join(" and ")} ${I.components.length>1?"run":"runs"}, so a run can't say which of ${I.components.length>1?"their":"its"} changes it tested.`,evidence:I.detail,fix:`Say in the Test Environment's notes how to tell what ${I.components.join(" and ")} ${I.components.length>1?"run":"runs"}, such as a version route (GET /version) or a deploy workflow, then set it up again.`})),R=[...e.blockers,...m,...i&&t?[a4t(t)]:[],...a,...p,...E,...x,...r.revisionCheck?.blockers??[],...r.credentialBlockers??[]],v=t?.baseUrls??{};return{schemaVersion:1,...u?{type:"customer_deployed",environment:uLe(u)}:{},...!u&&r.repository?{repository:r.repository}:{},status:c&&(t!==void 0||f)&&!n&&!i&&o.length===0&&d.length===0&&w.length===0&&!r.credentialBlockers?.length&&h.length===0?"ready":"blocked",components:e.components.map(I=>({name:I.name,repository:I.repository,healthy:(I.healthy||r.recheck===!0&&t!==void 0)&&!n,url:Object.hasOwn(v,I.name)&&v[I.name]||null,...I.steps?{steps:I.steps.map(N=>({action:N.action,text:N.text,source:N.source,file:N.file}))}:{},...I.kind?{kind:I.kind}:{},...I.from?{from:{file:I.from.file,service:I.from.service}}:{},...I.credentials?{credentials:[...new Set(I.credentials)].filter(N=>Wc.test(N))}:{},...u?{deployed:u4t(I,r)}:{}})),suites:e.suites.map(I=>({framework:I.framework,file:I.file,result:I.result})),inputsUsed:[...e.inputsUsed],...e.inputsUsedHow?{inputsUsedHow:e.inputsUsedHow.filter(I=>e.inputsUsed.includes(I.input)).map(I=>({input:I.input,how:I.how}))}:{},inputsNotUsed:e.inputsNotUsed.map(I=>({input:I.input,reason:I.reason})),blockers:R.map(I=>({component:I.component,problem:I.problem,evidence:I.evidence,fix:I.fix})),replay:t&&!u?{outcome:t.outcome,durationSeconds:r.deployDurationSeconds??null}:f?{outcome:oee,durationSeconds:null}:!u&&R.some(I=>I.problem.startsWith(bm))?{outcome:cLe,durationSeconds:null}:null,files:s.recipeFiles.filter(I=>Qy(I.path)&&!(u&&jI.includes(I.path))).map(I=>({path:I.path,content:I.content}))}}function u4t(e,t){return e.repository===Nn?null:t.revisionCheck?t.revisionCheck.deployed[e.name]??null:t.deployed?.[e.name]??e.deployed??null}function uLe(e){return{address:e.address,readyWhen:e.readyWhen,credentials:[...new Set(e.credentials)],revisionSources:e.revisionSources.map(t=>({method:t.method,detail:t.detail,components:[...t.components]}))}}function lee(e){return{schemaVersion:1,status:"ready",components:e.components.map(({url:t,deployed:r,...n})=>({...n,healthy:!0})),suites:e.suites,inputsUsed:e.inputsUsed,...e.inputsUsedHow?{inputsUsedHow:e.inputsUsedHow}:{},inputsNotUsed:e.inputsNotUsed,blockers:[],recipeFiles:e.files,recipeFilesOmitted:[],...e.environment?{environment:uLe(e.environment)}:{}}}wr();wr();wr();var dee;(function(e){e.Pass="Pass",e.Fail="Fail",e.Error="Error",e.Skipped="Skipped",e.Unknown="Unknown"})(dee||(dee={}));var lLe;(function(e){e.High="high",e.Medium="medium",e.Low="low"})(lLe||(lLe={}));var dLe;(function(e){e.Skyramp="skyramp",e.External="external"})(dLe||(dLe={}));var pee;(function(e){e.Update="UPDATE",e.Regenerate="REGENERATE",e.Delete="DELETE",e.Verify="VERIFY",e.Ignore="IGNORE"})(pee||(pee={}));var pLe;(function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"})(pLe||(pLe={}));var Pt={};Ia(Pt,{BRAND:()=>O4t,DIRTY:()=>SE,EMPTY_PATH:()=>f4t,INVALID:()=>Ot,NEVER:()=>bJt,OK:()=>Na,ParseStatus:()=>ea,Schema:()=>hr,ZodAny:()=>zy,ZodArray:()=>Sm,ZodBigInt:()=>CE,ZodBoolean:()=>IE,ZodBranded:()=>zP,ZodCatch:()=>ME,ZodDate:()=>RE,ZodDefault:()=>DE,ZodDiscriminatedUnion:()=>yj,ZodEffects:()=>zl,ZodEnum:()=>$E,ZodError:()=>Yc,ZodFirstPartyTypeKind:()=>qt,ZodFunction:()=>bj,ZodIntersection:()=>NE,ZodIssueCode:()=>Be,ZodLazy:()=>PE,ZodLiteral:()=>BE,ZodMap:()=>WI,ZodNaN:()=>YI,ZodNativeEnum:()=>OE,ZodNever:()=>ep,ZodNull:()=>TE,ZodNullable:()=>mf,ZodNumber:()=>xE,ZodObject:()=>Kc,ZodOptional:()=>jl,ZodParsedType:()=>nt,ZodPipeline:()=>GP,ZodPromise:()=>Gy,ZodReadonly:()=>FE,ZodRecord:()=>Aj,ZodSchema:()=>hr,ZodSet:()=>JI,ZodString:()=>qy,ZodSymbol:()=>HI,ZodTransformer:()=>zl,ZodTuple:()=>hf,ZodType:()=>hr,ZodUndefined:()=>kE,ZodUnion:()=>_E,ZodUnknown:()=>vm,ZodVoid:()=>VI,addIssueToContext:()=>He,any:()=>z4t,array:()=>W4t,bigint:()=>Q4t,boolean:()=>SLe,coerce:()=>AJt,custom:()=>wLe,date:()=>L4t,datetimeRegex:()=>ALe,defaultErrorMap:()=>wm,discriminatedUnion:()=>Z4t,effect:()=>lJt,enum:()=>aJt,function:()=>sJt,getErrorMap:()=>qI,getParsedType:()=>ff,instanceof:()=>M4t,intersection:()=>X4t,isAborted:()=>mj,isAsync:()=>zI,isDirty:()=>gj,isValid:()=>jy,late:()=>D4t,lazy:()=>iJt,literal:()=>oJt,makeIssue:()=>qP,map:()=>rJt,nan:()=>F4t,nativeEnum:()=>cJt,never:()=>H4t,null:()=>q4t,nullable:()=>pJt,number:()=>vLe,object:()=>J4t,objectUtil:()=>fee,oboolean:()=>yJt,onumber:()=>gJt,optional:()=>dJt,ostring:()=>mJt,pipeline:()=>hJt,preprocess:()=>fJt,promise:()=>uJt,quotelessJson:()=>l4t,record:()=>tJt,set:()=>nJt,setErrorMap:()=>p4t,strictObject:()=>Y4t,string:()=>ELe,symbol:()=>U4t,transformer:()=>lJt,tuple:()=>eJt,undefined:()=>j4t,union:()=>K4t,unknown:()=>G4t,util:()=>Tr,void:()=>V4t});var Tr;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Tr||(Tr={}));var fee;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(fee||(fee={}));var nt=Tr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ff=e=>{switch(typeof e){case"undefined":return nt.undefined;case"string":return nt.string;case"number":return Number.isNaN(e)?nt.nan:nt.number;case"boolean":return nt.boolean;case"function":return nt.function;case"bigint":return nt.bigint;case"symbol":return nt.symbol;case"object":return Array.isArray(e)?nt.array:e===null?nt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?nt.promise:typeof Map<"u"&&e instanceof Map?nt.map:typeof Set<"u"&&e instanceof Set?nt.set:typeof Date<"u"&&e instanceof Date?nt.date:nt.object;default:return nt.unknown}};var Be=Tr.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"]),l4t=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Yc=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,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(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}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,Tr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Yc.create=e=>new Yc(e);var d4t=(e,t)=>{let r;switch(e.code){case Be.invalid_type:e.received===nt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Be.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Tr.jsonStringifyReplacer)}`;break;case Be.unrecognized_keys:r=`Unrecognized key(s) in object: ${Tr.joinValues(e.keys,", ")}`;break;case Be.invalid_union:r="Invalid input";break;case Be.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Tr.joinValues(e.options)}`;break;case Be.invalid_enum_value:r=`Invalid enum value. Expected ${Tr.joinValues(e.options)}, received '${e.received}'`;break;case Be.invalid_arguments:r="Invalid function arguments";break;case Be.invalid_return_type:r="Invalid function return type";break;case Be.invalid_date:r="Invalid date";break;case Be.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Tr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Be.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Be.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Be.custom:r="Invalid input";break;case Be.invalid_intersection_types:r="Intersection results could not be merged";break;case Be.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Be.not_finite:r="Number must be finite";break;default:r=t.defaultError,Tr.assertNever(e)}return{message:r}},wm=d4t;var fLe=wm;function p4t(e){fLe=e}function qI(){return fLe}var qP=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},f4t=[];function He(e,t){let r=qI(),n=qP({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===wm?void 0:wm].filter(s=>!!s)});e.common.issues.push(n)}var ea=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return Ot;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Ot;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},Ot=Object.freeze({status:"aborted"}),SE=e=>({status:"dirty",value:e}),Na=e=>({status:"valid",value:e}),mj=e=>e.status==="aborted",gj=e=>e.status==="dirty",jy=e=>e.status==="valid",zI=e=>typeof Promise<"u"&&e instanceof Promise;var bt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(bt||(bt={}));var ql=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},hLe=(e,t)=>{if(jy(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 r=new Yc(e.common.issues);return this._error=r,this._error}}};function or(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var hr=class{get description(){return this._def.description}_getType(t){return ff(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ff(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ea,ctx:{common:t.parent.common,data:t.data,parsedType:ff(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(zI(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ff(t)},s=this._parseSync({data:t,path:n.path,parent:n});return hLe(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ff(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return jy(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>jy(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ff(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(zI(s)?s:Promise.resolve(s));return hLe(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:Be.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new zl({schema:this,typeName:qt.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:r=>this["~validate"](r)}}optional(){return jl.create(this,this._def)}nullable(){return mf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sm.create(this)}promise(){return Gy.create(this,this._def)}or(t){return _E.create([this,t],this._def)}and(t){return NE.create(this,t,this._def)}transform(t){return new zl({...or(this._def),schema:this,typeName:qt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new DE({...or(this._def),innerType:this,defaultValue:r,typeName:qt.ZodDefault})}brand(){return new zP({typeName:qt.ZodBranded,type:this,...or(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ME({...or(this._def),innerType:this,catchValue:r,typeName:qt.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return GP.create(this,t)}readonly(){return FE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},h4t=/^c[^\s-]{8,}$/i,m4t=/^[0-9a-z]+$/,g4t=/^[0-9A-HJKMNP-TV-Z]{26}$/i,y4t=/^[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,A4t=/^[a-z0-9_-]{21}$/i,b4t=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,w4t=/^[-+]?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)?)??$/,E4t=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,v4t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hee,S4t=/^(?:(?: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])$/,x4t=/^(?:(?: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])$/,C4t=/^(([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]))$/,I4t=/^(([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])$/,R4t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,k4t=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gLe="((\\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])))",T4t=new RegExp(`^${gLe}$`);function yLe(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function _4t(e){return new RegExp(`^${yLe(e)}$`)}function ALe(e){let t=`${gLe}T${yLe(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function N4t(e,t){return!!((t==="v4"||!t)&&S4t.test(e)||(t==="v6"||!t)&&C4t.test(e))}function P4t(e,t){if(!b4t.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function B4t(e,t){return!!((t==="v4"||!t)&&x4t.test(e)||(t==="v6"||!t)&&I4t.test(e))}var qy=class e extends hr{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==nt.string){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_type,expected:nt.string,received:i.parsedType}),Ot}let n=new ea,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?He(s,{code:Be.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&He(s,{code:Be.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")E4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"email",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")hee||(hee=new RegExp(v4t,"u")),hee.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"emoji",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")y4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"uuid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")A4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"nanoid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")h4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"cuid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")m4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"cuid2",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")g4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"ulid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),He(s,{validation:"url",code:Be.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"regex",code:Be.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.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)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?ALe(i).test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?T4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?_4t(i).test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?w4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"duration",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?N4t(t.data,i.version)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"ip",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?P4t(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"jwt",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?B4t(t.data,i.version)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"cidr",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?R4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"base64",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?k4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"base64url",code:Be.invalid_string,message:i.message}),n.dirty()):Tr.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Be.invalid_string,...bt.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...bt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...bt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...bt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...bt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...bt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...bt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...bt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...bt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...bt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...bt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...bt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...bt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...bt.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,...bt.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,...bt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...bt.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...bt.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...bt.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...bt.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...bt.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...bt.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...bt.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...bt.errToObj(r)})}nonempty(t){return this.min(1,bt.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};qy.create=e=>new qy({checks:[],typeName:qt.ZodString,coerce:e?.coerce??!1,...or(e)});function $4t(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var xE=class e extends hr{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)!==nt.number){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_type,expected:nt.number,received:i.parsedType}),Ot}let n,s=new ea;for(let i of this._def.checks)i.kind==="int"?Tr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),He(n,{code:Be.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?$4t(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),He(n,{code:Be.not_finite,message:i.message}),s.dirty()):Tr.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,bt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,bt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,bt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,bt.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:bt.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:bt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:bt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:bt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:bt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:bt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:bt.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:bt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:bt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:bt.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Tr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};xE.create=e=>new xE({checks:[],typeName:qt.ZodNumber,coerce:e?.coerce||!1,...or(e)});var CE=class e extends hr{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)!==nt.bigint)return this._getInvalidInput(t);let n,s=new ea;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Tr.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return He(r,{code:Be.invalid_type,expected:nt.bigint,received:r.parsedType}),Ot}gte(t,r){return this.setLimit("min",t,!0,bt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,bt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,bt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,bt.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:bt.toString(s)}]})}_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:bt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:bt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:bt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:bt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:bt.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};CE.create=e=>new CE({checks:[],typeName:qt.ZodBigInt,coerce:e?.coerce??!1,...or(e)});var IE=class extends hr{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==nt.boolean){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.boolean,received:n.parsedType}),Ot}return Na(t.data)}};IE.create=e=>new IE({typeName:qt.ZodBoolean,coerce:e?.coerce||!1,...or(e)});var RE=class e extends hr{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==nt.date){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_type,expected:nt.date,received:i.parsedType}),Ot}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_date}),Ot}let n=new ea,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Tr.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:bt.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:bt.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};RE.create=e=>new RE({checks:[],coerce:e?.coerce||!1,typeName:qt.ZodDate,...or(e)});var HI=class extends hr{_parse(t){if(this._getType(t)!==nt.symbol){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.symbol,received:n.parsedType}),Ot}return Na(t.data)}};HI.create=e=>new HI({typeName:qt.ZodSymbol,...or(e)});var kE=class extends hr{_parse(t){if(this._getType(t)!==nt.undefined){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.undefined,received:n.parsedType}),Ot}return Na(t.data)}};kE.create=e=>new kE({typeName:qt.ZodUndefined,...or(e)});var TE=class extends hr{_parse(t){if(this._getType(t)!==nt.null){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.null,received:n.parsedType}),Ot}return Na(t.data)}};TE.create=e=>new TE({typeName:qt.ZodNull,...or(e)});var zy=class extends hr{constructor(){super(...arguments),this._any=!0}_parse(t){return Na(t.data)}};zy.create=e=>new zy({typeName:qt.ZodAny,...or(e)});var vm=class extends hr{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Na(t.data)}};vm.create=e=>new vm({typeName:qt.ZodUnknown,...or(e)});var ep=class extends hr{_parse(t){let r=this._getOrReturnCtx(t);return He(r,{code:Be.invalid_type,expected:nt.never,received:r.parsedType}),Ot}};ep.create=e=>new ep({typeName:qt.ZodNever,...or(e)});var VI=class extends hr{_parse(t){if(this._getType(t)!==nt.undefined){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.void,received:n.parsedType}),Ot}return Na(t.data)}};VI.create=e=>new VI({typeName:qt.ZodVoid,...or(e)});var Sm=class e extends hr{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==nt.array)return He(r,{code:Be.invalid_type,expected:nt.array,received:r.parsedType}),Ot;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(He(r,{code:o?Be.too_big:Be.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(He(r,{code:Be.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(He(r,{code:Be.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new ql(r,o,r.path,a)))).then(o=>ea.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new ql(r,o,r.path,a)));return ea.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:bt.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:bt.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:bt.toString(r)}})}nonempty(t){return this.min(1,t)}};Sm.create=(e,t)=>new Sm({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qt.ZodArray,...or(t)});function GI(e){if(e instanceof Kc){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=jl.create(GI(n))}return new Kc({...e._def,shape:()=>t})}else return e instanceof Sm?new Sm({...e._def,type:GI(e.element)}):e instanceof jl?jl.create(GI(e.unwrap())):e instanceof mf?mf.create(GI(e.unwrap())):e instanceof hf?hf.create(e.items.map(t=>GI(t))):e}var Kc=class e extends hr{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(),r=Tr.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==nt.object){let u=this._getOrReturnCtx(t);return He(u,{code:Be.invalid_type,expected:nt.object,received:u.parsedType}),Ot}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof ep&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new ql(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof ep){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(He(s,{code:Be.unrecognized_keys,keys:a}),n.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 d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new ql(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>ea.mergeObjectSync(n,u)):ea.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return bt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:bt.errToObj(t).message??s}:{message:s}}}:{}})}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:qt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of Tr.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of Tr.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return GI(this)}partial(t){let r={};for(let n of Tr.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of Tr.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof jl;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return bLe(Tr.objectKeys(this.shape))}};Kc.create=(e,t)=>new Kc({shape:()=>e,unknownKeys:"strip",catchall:ep.create(),typeName:qt.ZodObject,...or(t)});Kc.strictCreate=(e,t)=>new Kc({shape:()=>e,unknownKeys:"strict",catchall:ep.create(),typeName:qt.ZodObject,...or(t)});Kc.lazycreate=(e,t)=>new Kc({shape:e,unknownKeys:"strip",catchall:ep.create(),typeName:qt.ZodObject,...or(t)});var _E=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(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 r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Yc(a.ctx.common.issues));return He(r,{code:Be.invalid_union,unionErrors:o}),Ot}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.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 r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Yc(c));return He(r,{code:Be.invalid_union,unionErrors:a}),Ot}}get options(){return this._def.options}};_E.create=(e,t)=>new _E({options:e,typeName:qt.ZodUnion,...or(t)});var Em=e=>e instanceof PE?Em(e.schema):e instanceof zl?Em(e.innerType()):e instanceof BE?[e.value]:e instanceof $E?e.options:e instanceof OE?Tr.objectValues(e.enum):e instanceof DE?Em(e._def.innerType):e instanceof kE?[void 0]:e instanceof TE?[null]:e instanceof jl?[void 0,...Em(e.unwrap())]:e instanceof mf?[null,...Em(e.unwrap())]:e instanceof zP||e instanceof FE?Em(e.unwrap()):e instanceof ME?Em(e._def.innerType):[],yj=class e extends hr{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.object)return He(r,{code:Be.invalid_type,expected:nt.object,received:r.parsedType}),Ot;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(He(r,{code:Be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ot)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=Em(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(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:qt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...or(n)})}};function mee(e,t){let r=ff(e),n=ff(t);if(e===t)return{valid:!0,data:e};if(r===nt.object&&n===nt.object){let s=Tr.objectKeys(t),i=Tr.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=mee(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===nt.array&&n===nt.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=mee(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===nt.date&&n===nt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var NE=class extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(mj(i)||mj(o))return Ot;let a=mee(i.value,o.value);return a.valid?((gj(i)||gj(o))&&r.dirty(),{status:r.value,value:a.data}):(He(n,{code:Be.invalid_intersection_types}),Ot)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};NE.create=(e,t,r)=>new NE({left:e,right:t,typeName:qt.ZodIntersection,...or(r)});var hf=class e extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.array)return He(n,{code:Be.invalid_type,expected:nt.array,received:n.parsedType}),Ot;if(n.data.length<this._def.items.length)return He(n,{code:Be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ot;!this._def.rest&&n.data.length>this._def.items.length&&(He(n,{code:Be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ql(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>ea.mergeArray(r,o)):ea.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};hf.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hf({items:e,typeName:qt.ZodTuple,rest:null,...or(t)})};var Aj=class e extends hr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.object)return He(n,{code:Be.invalid_type,expected:nt.object,received:n.parsedType}),Ot;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new ql(n,a,n.path,a)),value:o._parse(new ql(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ea.mergeObjectAsync(r,s):ea.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof hr?new e({keyType:t,valueType:r,typeName:qt.ZodRecord,...or(n)}):new e({keyType:qy.create(),valueType:t,typeName:qt.ZodRecord,...or(r)})}},WI=class extends hr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.map)return He(n,{code:Be.invalid_type,expected:nt.map,received:n.parsedType}),Ot;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new ql(n,a,n.path,[u,"key"])),value:i._parse(new ql(n,c,n.path,[u,"value"]))}));if(n.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 Ot;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.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 Ot;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};WI.create=(e,t,r)=>new WI({valueType:t,keyType:e,typeName:qt.ZodMap,...or(r)});var JI=class e extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.set)return He(n,{code:Be.invalid_type,expected:nt.set,received:n.parsedType}),Ot;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(He(n,{code:Be.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(He(n,{code:Be.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Ot;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new ql(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:bt.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:bt.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};JI.create=(e,t)=>new JI({valueType:e,minSize:null,maxSize:null,typeName:qt.ZodSet,...or(t)});var bj=class e extends hr{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.function)return He(r,{code:Be.invalid_type,expected:nt.function,received:r.parsedType}),Ot;function n(a,c){return qP({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qI(),wm].filter(u=>!!u),issueData:{code:Be.invalid_arguments,argumentsError:c}})}function s(a,c){return qP({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qI(),wm].filter(u=>!!u),issueData:{code:Be.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Gy){let a=this;return Na(async function(...c){let u=new Yc([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return Na(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Yc([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Yc([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:hf.create(t).rest(vm.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,r,n){return new e({args:t||hf.create([]).rest(vm.create()),returns:r||vm.create(),typeName:qt.ZodFunction,...or(n)})}},PE=class extends hr{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};PE.create=(e,t)=>new PE({getter:e,typeName:qt.ZodLazy,...or(t)});var BE=class extends hr{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return He(r,{received:r.data,code:Be.invalid_literal,expected:this._def.value}),Ot}return{status:"valid",value:t.data}}get value(){return this._def.value}};BE.create=(e,t)=>new BE({value:e,typeName:qt.ZodLiteral,...or(t)});function bLe(e,t){return new $E({values:e,typeName:qt.ZodEnum,...or(t)})}var $E=class e extends hr{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return He(r,{expected:Tr.joinValues(n),received:r.parsedType,code:Be.invalid_type}),Ot}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return He(r,{received:r.data,code:Be.invalid_enum_value,options:n}),Ot}return Na(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};$E.create=bLe;var OE=class extends hr{_parse(t){let r=Tr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==nt.string&&n.parsedType!==nt.number){let s=Tr.objectValues(r);return He(n,{expected:Tr.joinValues(s),received:n.parsedType,code:Be.invalid_type}),Ot}if(this._cache||(this._cache=new Set(Tr.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=Tr.objectValues(r);return He(n,{received:n.data,code:Be.invalid_enum_value,options:s}),Ot}return Na(t.data)}get enum(){return this._def.values}};OE.create=(e,t)=>new OE({values:e,typeName:qt.ZodNativeEnum,...or(t)});var Gy=class extends hr{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.promise&&r.common.async===!1)return He(r,{code:Be.invalid_type,expected:nt.promise,received:r.parsedType}),Ot;let n=r.parsedType===nt.promise?r.data:Promise.resolve(r.data);return Na(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Gy.create=(e,t)=>new Gy({type:e,typeName:qt.ZodPromise,...or(t)});var zl=class extends hr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{He(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Ot;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Ot:c.status==="dirty"?SE(c.value):r.value==="dirty"?SE(c.value):c});{if(r.value==="aborted")return Ot;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Ot:a.status==="dirty"?SE(a.value):r.value==="dirty"?SE(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.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(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ot:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ot:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!jy(o))return Ot;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>jy(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):Ot);Tr.assertNever(s)}};zl.create=(e,t,r)=>new zl({schema:e,typeName:qt.ZodEffects,effect:t,...or(r)});zl.createWithPreprocess=(e,t,r)=>new zl({schema:t,effect:{type:"preprocess",transform:e},typeName:qt.ZodEffects,...or(r)});var jl=class extends hr{_parse(t){return this._getType(t)===nt.undefined?Na(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};jl.create=(e,t)=>new jl({innerType:e,typeName:qt.ZodOptional,...or(t)});var mf=class extends hr{_parse(t){return this._getType(t)===nt.null?Na(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};mf.create=(e,t)=>new mf({innerType:e,typeName:qt.ZodNullable,...or(t)});var DE=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===nt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};DE.create=(e,t)=>new DE({innerType:e,typeName:qt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...or(t)});var ME=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return zI(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yc(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ME.create=(e,t)=>new ME({innerType:e,typeName:qt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...or(t)});var YI=class extends hr{_parse(t){if(this._getType(t)!==nt.nan){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.nan,received:n.parsedType}),Ot}return{status:"valid",value:t.data}}};YI.create=e=>new YI({typeName:qt.ZodNaN,...or(e)});var O4t=Symbol("zod_brand"),zP=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},GP=class e extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ot:i.status==="dirty"?(r.dirty(),SE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ot:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:qt.ZodPipeline})}},FE=class extends hr{_parse(t){let r=this._def.innerType._parse(t),n=s=>(jy(s)&&(s.value=Object.freeze(s.value)),s);return zI(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};FE.create=(e,t)=>new FE({innerType:e,typeName:qt.ZodReadonly,...or(t)});function mLe(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function wLe(e,t={},r){return e?zy.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=mLe(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=mLe(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):zy.create()}var D4t={object:Kc.lazycreate},qt;(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"})(qt||(qt={}));var M4t=(e,t={message:`Input not instance of ${e.name}`})=>wLe(r=>r instanceof e,t),ELe=qy.create,vLe=xE.create,F4t=YI.create,Q4t=CE.create,SLe=IE.create,L4t=RE.create,U4t=HI.create,j4t=kE.create,q4t=TE.create,z4t=zy.create,G4t=vm.create,H4t=ep.create,V4t=VI.create,W4t=Sm.create,J4t=Kc.create,Y4t=Kc.strictCreate,K4t=_E.create,Z4t=yj.create,X4t=NE.create,eJt=hf.create,tJt=Aj.create,rJt=WI.create,nJt=JI.create,sJt=bj.create,iJt=PE.create,oJt=BE.create,aJt=$E.create,cJt=OE.create,uJt=Gy.create,lJt=zl.create,dJt=jl.create,pJt=mf.create,fJt=zl.createWithPreprocess,hJt=GP.create,mJt=()=>ELe().optional(),gJt=()=>vLe().optional(),yJt=()=>SLe().optional(),AJt={string:(e=>qy.create({...e,coerce:!0})),number:(e=>xE.create({...e,coerce:!0})),boolean:(e=>IE.create({...e,coerce:!0})),bigint:(e=>CE.create({...e,coerce:!0})),date:(e=>RE.create({...e,coerce:!0}))};var bJt=Ot;var xLe=["playwright","pytest","robot","junit","vitest","jest","mocha","go","rspec","jasmine"];var CLe="skyramp_session_storage.json";var gee;(function(e){e.PYTHON="python",e.TYPESCRIPT="typescript",e.JAVASCRIPT="javascript",e.JAVA="java"})(gee||(gee={}));var gf;(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"})(gf||(gf={}));var vZr=[gf.CONTRACT,gf.INTEGRATION,gf.E2E,gf.UI];var ILe;(function(e){e.Rest="rest",e.Grpc="grpc",e.Kafka="kafka"})(ILe||(ILe={}));var wj;(function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.HEAD="HEAD",e.OPTIONS="OPTIONS"})(wj||(wj={}));var HP;(function(e){e.LOCAL="local",e.DOCKER="docker",e.KUBERNETES="k8s"})(HP||(HP={}));var wJt=Pt.nativeEnum(HP),EJt=Pt.preprocess(e=>e==="kubernetes"?HP.KUBERNETES:e,wJt);var vJt=Pt.object({language:Pt.nativeEnum(gee).describe("Programming language for the generated test (default: python). Must be one of: python, typescript, javascript, java"),framework:Pt.string().describe(`Testing framework to use. Supported: ${xLe.join(", ")} (e.g. pytest for python, playwright/vitest/jest for js/ts, junit for java).`)}),RLe=Pt.object({...vJt.shape,deployDashboard:Pt.boolean().default(!1).describe("Whether to deploy the Skyramp dashboard for test monitoring"),runtime:EJt.default(HP.LOCAL).describe("Runtime environment (local, docker, or k8s; accepts kubernetes as an alias)"),dockerNetwork:Pt.string().default("").describe("Docker network name to use for containerized testing"),dockerWorkerPort:Pt.number().int().min(0).max(65535).default(0).describe("Port number for the Docker worker service"),k8sNamespace:Pt.string().default("").describe("Kubernetes namespace for deployment"),k8sConfig:Pt.string().default("").describe("Path to Kubernetes configuration file"),k8sContext:Pt.string().default("").describe("Kubernetes context to use"),authHeader:Pt.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:Pt.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:Pt.boolean().default(!1).describe("Whether to allow insecure SSL connections for HTTPS endpoints"),output:Pt.string().optional().refine(e=>!e||e===""?!0:[".py",".ts",".js",".java"].some(r=>e.endsWith(r)),{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:Pt.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:Pt.boolean().default(!0).describe("Whether to overwrite existing files in the output directory"),mockPort:Pt.number().int().min(0).max(65535).default(0).describe("Port number for the mock server"),optionalFields:Pt.boolean().default(!1).describe("Whether to include optional fields in the generated test/mock"),prompt:Pt.string().describe("The prompt user provided to generate the test")}),SZr=Pt.object({playwrightInput:Pt.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:Pt.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:Pt.string().optional().describe(`Path to SAVE Playwright session storage after trace collection. Omit this argument to use the default \u2014 \`${CLe}\` resolved against the active outputDir, which produces an absolute path like '/abs/outputDir/${CLe}'. 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:Pt.union([Pt.enum(["","hd","full-hd","2k"]),Pt.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:Pt.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:Pt.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.")}),xZr=Pt.object({trace:Pt.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:Pt.array(Pt.string()).default([]).describe("List of endpoints or patterns to include in test generation."),exclude:Pt.array(Pt.string()).default([]).describe("List of endpoints or patterns to exclude from test generation."),...RLe.shape}),CZr={endpointURL:Pt.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:Pt.union([Pt.nativeEnum(wj),Pt.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:Pt.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:Pt.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:Pt.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:Pt.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for form data parameters"),requestData:Pt.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:Pt.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"),...RLe.shape},IZr=Pt.object({codeReuse:Pt.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:Pt.boolean().default(!1).describe("Whether to modularize the code")}),RZr=[gf.INTEGRATION,gf.CONTRACT,gf.UI];var Ej;(function(e){e.Bug="bug",e.Lint="lint",e.Type="type",e.Config="config"})(Ej||(Ej={}));var vj;(function(e){e.NotMapped="not-mapped",e.DemotedByVerify="demoted-by-verify"})(vj||(vj={}));var Sj;(function(e){e.Passed="passed",e.Failed="failed",e.SkippedNoPom="skipped-no-pom"})(Sj||(Sj={}));var yee;(function(e){e.Passed="passed",e.Failed="failed",e.NoUtilsFile="no-utils-file"})(yee||(yee={}));wr();var xj=e=>`${e} POM call${e===1?"":"s"}`,kLe=(e,t)=>e===1?`1 ${t} test`:`${e} ${t} tests`,je={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=>`${xj(e)} reused and verified`,reusedThenVerified:(e,t)=>`${xj(e)} reused, ${t} of them verified`,reused:e=>`${xj(e)} reused`,verified:e=>`${xj(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 r=t?` Latest run: ${t}`:"";return`No final result was recorded for written cases: ${e}.${r}`},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}`,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}`,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,r)=>`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 \`${r}\` 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.",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.",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.`,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.`},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,r,n)=>`${e} (${t}) in the Test Environment runs ${r}, which does not contain ${n}, the commit this run validates.`,componentUnverified:(e,t,r,n)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${n}, the commit this run validates: it reports ${r}.`,componentUnread:(e,t,r)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${r}, 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,r)=>`**${e}**: ${t} unit test${t===1?"":"s"}${r?` for ${r}`:""}`,addedToExistingFile:"added to an existing test file",testPackagesHeader:"### \u{1F4E6} Running these tests",testPackageLine:(e,t,r="")=>`\`${e}/\` is a self-contained test package Skyramp Testbot owns and maintains, with its own manifest, lockfile and runner config.${r?` This run added it, with ${r}, 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,r)=>`Added \`${e}\` to \`${t}\` (and its lockfile)${r?`: ${r}`:""}`,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,r)=>`${e}/${t} passed${r?`, ${r} skipped`:""}`,behaviourCoverageHeader:"\u{1F517} Behaviour Coverage",coverageCaption:(e,t,r,n)=>` (${e} generated \xB7 ${t} modified \xB7 ${r} verified \xB7 ${n} 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)=>`${kLe(e,"new")} and ${kLe(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,r)=>`Test results: ${e} passed, ${t} failed, ${r} 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,r)=>`_\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.${r?` [Full report](${r})`:""}_`,testsReplaced:(e,t,r)=>[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}).`,r?`The tests of [the earlier run](${r}) 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,r)=>`Testbot PR${e?` (${e})`:""} : [${t}](${r})`,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,r)=>`${e}: ${t} ${t===1?"test":"tests"} written, ${r} 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,r,n)=>`${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: ${r}. Their changes are in the run artifact's ${n}.`,testsNotProposed:e=>`The tests were not proposed in a pull request: ${e}.`}};var TLe={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 r=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${r}`},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}`,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}`,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,r)=>`${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 \`${r}\` \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",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",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`,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`},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,r,n)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u306F ${r} \u3092\u5B9F\u884C\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${n} \u3092\u542B\u3093\u3067\u3044\u307E\u305B\u3093\u3002`,componentUnverified:(e,t,r,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\u5831\u544A\u3055\u308C\u305F\u30B3\u30DF\u30C3\u30C8: ${r}\u3002`,componentUnread:(e,t,r)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u304C\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${r} \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,r)=>`**${e}**: ${r?`${r} \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,r="")=>`\`${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${r?`\u3053\u306E\u5B9F\u884C\u3067\u8FFD\u52A0\u3057\u305F\u3082\u306E\u3067\u3001${r} \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,r)=>`\`${t}\`\uFF08\u304A\u3088\u3073\u305D\u306E\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\uFF09\u306B \`${e}\` \u3092\u8FFD\u52A0${r?`: ${r}`:""}`,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,r)=>`${t} \u4EF6\u4E2D ${e} \u4EF6\u5408\u683C${r?`\u3001${r} \u4EF6\u30B9\u30AD\u30C3\u30D7`:""}`,behaviourCoverageHeader:"\u{1F517} \u632F\u308B\u821E\u3044\u306E\u30AB\u30D0\u30EC\u30C3\u30B8",coverageCaption:(e,t,r,n)=>`\uFF08\u751F\u6210 ${e} \xB7 \u5909\u66F4 ${t} \xB7 \u691C\u8A3C ${r} \xB7 \u5B9F\u884C ${n}\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,r)=>`\u30C6\u30B9\u30C8\u7D50\u679C: \u5408\u683C ${e} \u4EF6\u3001\u4E0D\u5408\u683C ${t} \u4EF6\u3001\u672A\u5B9F\u884C ${r} \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,r)=>`_\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${r?` [\u5B8C\u5168\u306A\u30EC\u30DD\u30FC\u30C8](${r})`:""}_`,testsReplaced:(e,t,r)=>[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`,r?`[\u4EE5\u524D\u306E\u5B9F\u884C](${r})\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,r)=>`Testbot PR${e?`\uFF08${e}\uFF09`:""}: [${t}](${r})`,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,r)=>`${e}: ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u3092\u4F5C\u6210\u3057\u3001${r} \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,r,n)=>`${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: ${r}\u3002\u5909\u66F4\u5185\u5BB9\u306F\u5B9F\u884C\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306E ${n} \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 KI=(r=>(r.En="en",r.Ja="ja",r))(KI||{}),SJt={en:je,ja:TLe},Aee="en";function Cj(e){let t=e.trim().toLowerCase();if(t==="")return"en";let r=Object.values(KI);return r.includes(t)?t:($e(`Invalid language '${e}'. Supported: ${r.join(", ")}. Falling back to 'en'.`),"en")}function bee(e){Aee=e}function QE(){return Aee}function yf(e,t){return(Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0)??t}function Re(){return SJt[Aee]}var Ij=(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))(Ij||{});(t=>{function e(r,n){switch(r){case"provider_outage":return{headline:Re().providerOutageHeadline(n.provider.name,n.maxRetries),action:Re().providerOutageActionStatusPage(n.provider.statusUrl)};case"provider_rate_limit":return{headline:Re().providerRateLimitHeadline(n.provider.name),action:Re().providerRateLimitAction};case"provider_usage_limit":return{headline:Re().providerUsageLimitHeadline(n.provider.name),action:Re().providerUsageLimitAction};case"provider_auth_expired":return{headline:Re().providerAuthExpiredHeadline(n.provider.name),action:Re().providerAuthExpiredAction};case"timeout":return{headline:Re().providerTimeoutHeadline(n.timeoutMinutes),action:Re().providerTimeoutAction};case"no_report":case"render_failure":return}}t.buildNotice=e})(Ij||={});var wee=(r=>(r.SameBranch="same-branch",r.SeparateBranch="separate-branch",r))(wee||{}),VP=class{supportsNdjsonLog=!1;reusesPreinstalledCli=!0;setupAgentEnv(t,r){let n=t[this.apiKeyField];n&&Ty(this.envVar,n)}};wVe();var EVe=e=>Bne({...e});var $ne=(r=>(r.Sonnet="sonnet",r.Opus="opus",r))($ne||{}),SYt="opus",xYt={sonnet:"anthropic.claude-sonnet-5[1m]",opus:"anthropic.claude-opus-5-5[1m]"};function FB(e){return Object.values($ne).includes(e)}function vVe(e){let t=(e??"").trim();if(t==="")return SYt;let r=t.toLowerCase();return FB(r)?r:t}function CYt(e){let t=(e??"").trim().toLowerCase();return t.startsWith("us-gov-")?"us-gov":t.startsWith("eu-")?"eu":t.startsWith("ap-")?"apac":"us"}function One(e,t){return`${CYt(t)}.${xYt[e]}`}function SVe(e){return e||process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||""}async function xVe(e){return EVe({roleArn:e.roleArn,webIdentityToken:e.webIdentityToken,roleSessionName:e.roleSessionName,durationSeconds:e.durationSeconds,clientConfig:{region:e.region}})()}var IYt=28800;async function CVe(e){let t=e.env??process.env;if(!e.roleArn.trim())throw new Error("useBedrock on Azure Pipelines needs the awsRoleArn input: the role Testbot assumes with the job's OIDC token");if(!e.region.trim())throw new Error("useBedrock needs the awsRegion input");let r=await(e.assumeRole??xVe)({roleArn:e.roleArn.trim(),webIdentityToken:await e.token("sts.amazonaws.com"),roleSessionName:`testbot-${e.runId}`.replace(/[^A-Za-z0-9=,.@_-]/g,"").slice(0,64),region:e.region.trim(),durationSeconds:IYt});if(!r.accessKeyId||!r.secretAccessKey||!r.sessionToken)throw new Error("assume-role returned an incomplete credential triple");e.setSecret(r.accessKeyId),e.setSecret(r.secretAccessKey),e.setSecret(r.sessionToken),t.AWS_ACCESS_KEY_ID=r.accessKeyId,t.AWS_SECRET_ACCESS_KEY=r.secretAccessKey,t.AWS_SESSION_TOKEN=r.sessionToken}var MB=3600,RYt=43200,kYt=15;function TYt(e){let t=Math.ceil((e+kYt)*60);return Math.min(RYt,Math.max(MB,t))}function _Yt(e){return e instanceof Error?e.name==="ValidationError"&&/MaxSessionDuration|DurationSeconds/i.test(e.message):!1}async function IVe(e){let t=e.env??process.env,r=t.AWS_ROLE_ARN?.trim(),n=t.AWS_REGION?.trim()||t.AWS_DEFAULT_REGION?.trim();if(t.SKYRAMP_REFRESH_BEDROCK_SESSION!=="1"||t.CLAUDE_CODE_USE_BEDROCK!=="1")return!1;let s=e.identity;if(!r||!s||!n)return e.debug("Bedrock session refresh skipped: needs AWS_ROLE_ARN, AWS_REGION (or AWS_DEFAULT_REGION) and a web identity from the job"),!1;try{let i=await s.token("sts.amazonaws.com");if(!i)throw new Error("OIDC response carried no token value");let o=`testbot-agent-${s.runId??"local"}`.replace(/[^A-Za-z0-9=,.@_-]/g,"").slice(0,64),a=e.assumeRole??xVe,c={roleArn:r,webIdentityToken:i,roleSessionName:o,region:n},u=TYt(e.timeoutMinutes),l,d=MB;try{l=await a({...c,durationSeconds:u}),d=u}catch(p){if(u<=MB||!_Yt(p))throw p;e.warning(`The Bedrock role rejected a ${u}s session (its MaxSessionDuration is lower). Minting a ${MB}s session instead, which is shorter than the ${e.timeoutMinutes}m testbotTimeout; raise MaxSessionDuration on ${r} to at least ${u}s or the agent can lose its credentials mid-run.`),l=await a({...c,durationSeconds:MB})}if(!l.accessKeyId||!l.secretAccessKey||!l.sessionToken)throw new Error("assume-role returned an incomplete credential triple");return e.setSecret(l.accessKeyId),e.setSecret(l.secretAccessKey),e.setSecret(l.sessionToken),t.AWS_ACCESS_KEY_ID=l.accessKeyId,t.AWS_SECRET_ACCESS_KEY=l.secretAccessKey,t.AWS_SESSION_TOKEN=l.sessionToken,e.debug(`Minted a fresh Bedrock session for this agent attempt (${d}s)`),e.onMinted?.(l.expiration?.getTime()??Date.now()+d*1e3),!0}catch(i){return e.warning(`Could not refresh the Bedrock session; continuing with existing credentials: ${i instanceof Error?i.message:String(i)}`),!1}}var sz=(i=>(i.Low="low",i.Medium="medium",i.High="high",i.XHigh="xhigh",i.Max="max",i))(sz||{}),vR="high",RVe="medium";function kVe(e){return Object.values(sz).includes(e)}var TVe=5;function NYt(e){let t=e.split(/\r?\n/).map(r=>r.trim()).filter(Boolean);if(t.length>TVe)throw new Error(`relatedRepoPaths supports at most ${TVe} entries (got ${t.length}); the cap limits how much cross-repo context is loaded to avoid overflowing Testbot's context window.`);return t}function PYt(e){let t=e.trim().toLowerCase();return t===""?"separate-branch":Object.values(wee).includes(t)?t:($e(`Invalid generatedTestsMode '${e}'. Falling back to 'separate-branch'.`),"separate-branch")}function BYt(e){let t=(e??"").trim();if(t!==""){if(/^(?:[1-9]|10)$/.test(t))return Number(t);$e(`Ignoring perTestMaxFixAttempts="${e}": expected a whole number from 1 to 10; the Skyramp MCP default applies`)}}function $Yt(e){let t=(e??"").trim().toLowerCase();return t===""?vR:kVe(t)?t:($e(`Ignoring effort="${e}": expected one of ${Object.values(sz).join(", ")}; using "${vR}"`),vR)}function _Ve(){let e=vVe(st("model"));return FB(e)||$e(`model '${e}' is not a tested alias (sonnet, opus); passing it to the agent verbatim as a raw model id.`),{skyrampLicenseFile:st("skyrampLicenseFile"),cursorApiKey:st("cursorApiKey"),copilotApiKey:st("copilotApiKey"),anthropicApiKey:st("anthropicApiKey"),useBedrock:_y("useBedrock"),awsRegion:st("awsRegion"),useLocalAuth:st("useLocalAuth").toLowerCase()==="true",model:e,effort:$Yt(st("effort")),targetSetupCommand:st("targetSetupCommand"),authTokenCommand:st("authTokenCommand"),uiCredentials:st("uiCredentials"),targetTeardownCommand:st("targetTeardownCommand"),skipTargetTeardown:_y("skipTargetTeardown"),skyrampExecutorVersion:st("skyrampExecutorVersion"),skyrampMcpVersion:st("skyrampMcpVersion"),skyrampMcpSource:st("skyrampMcpSource"),skyrampMcpGithubToken:st("skyrampMcpGithubToken"),skyrampMcpGithubRef:st("skyrampMcpGithubRef"),nodeVersion:st("nodeVersion"),skipTargetSetup:_y("skipTargetSetup"),targetReadyCheckCommand:st("targetReadyCheckCommand"),targetReadyCheckTimeout:(()=>{let r=parseInt(st("targetReadyCheckTimeout"),10)||1800;return r<1?($e(`targetReadyCheckTimeout must be at least 1 second, got ${r}. Using 1s.`),1):r})(),targetReadyCheckInterval:(()=>{let r=parseInt(st("targetReadyCheckInterval"),10),n=isNaN(r)?30:r;return n<1?($e(`targetReadyCheckInterval must be at least 1 second, got ${n}. Using 1s.`),1):n})(),targetReadyCheckDiagnosticsCommand:(()=>{let r=st("targetReadyCheckDiagnosticsCommand");return r.trim().toLowerCase()==="none"?"":r})(),workingDirectory:st("workingDirectory"),autoCommit:_y("autoCommit"),commitMessage:st("commitMessage"),generatedTestsMode:PYt(st("generatedTestsMode")),postPrComment:_y("postPrComment"),testExecutionTimeout:parseInt(st("testExecutionTimeout"),10)||300,maxRecommendations:(()=>{let r=parseInt(st("maxRecommendations"),10);return isNaN(r)?void 0:Math.max(0,r)})(),maxGenerate:(()=>{let r=parseInt(st("maxGenerate"),10);return isNaN(r)?void 0:Math.max(0,r)})(),perTestMaxFixAttempts:BYt(st("perTestMaxFixAttempts")),testbotMaxRetries:parseInt(st("testbotMaxRetries"),10)||3,testbotRetryDelay:parseInt(st("testbotRetryDelay"),10)||10,testbotTimeout:parseInt(st("testbotTimeout"),10)||60,targetSetupRetries:parseInt(st("targetSetupRetries"),10)||3,targetSetupRetryDelay:parseInt(st("targetSetupRetryDelay"),10)||10,authTokenRetries:(()=>{let r=parseInt(st("authTokenRetries"),10);return Number.isFinite(r)&&r>=1?r:6})(),authTokenRetryDelay:(()=>{let r=parseInt(st("authTokenRetryDelay"),10);return Number.isFinite(r)&&r>=0?r:10})(),reportCollapsed:_y("reportCollapsed"),language:Cj(st("language")),enableDebug:_y("enableDebug"),testRepoPath:st("testRepoPath")||void 0,relatedRepoPaths:NYt(st("relatedRepoPaths")),allowedAuthors:st("allowedAuthors").split(/\r?\n/).map(r=>r.trim()).filter(Boolean)}}wr();D7();var BVe=H(require("child_process")),Dne=class extends Error{constructor(t){super(t),this.name="ExecTimeoutError"}},iz=class extends Error{constructor(t){super(t),this.name="ExecAbortedError"}};function NVe(e,t){if(!(!e||e.destroyed||e.writableEnded))try{e.write(t)}catch(r){$e(`stream write failed: ${r instanceof Error?r.message:String(r)}`)}}async function Xi(e,t=[],r={}){let n="",s="",i={cwd:r.cwd,silent:r.silent??!1,ignoreReturnCode:r.ignoreReturnCode??!1,env:r.env?{...process.env,...r.env}:void 0,input:r.input,listeners:{stdout:a=>{n+=a.toString(),NVe(r.stdoutStream,a)},stderr:a=>{s+=a.toString()}}};if(r.timeout||r.signal){let a=r.signal;return a?.aborted?Promise.reject(new iz(`Command aborted before start: ${e}`)):new Promise((c,u)=>{let l=BVe.spawn(e,t,{cwd:r.cwd,env:r.env?{...process.env,...r.env}:process.env,stdio:["pipe","pipe","pipe"],shell:!1});l.stdout?.on("data",g=>{n+=g.toString(),r.silent||process.stdout.write(g),NVe(r.stdoutStream,g)}),l.stderr?.on("data",g=>{s+=g.toString(),r.silent||process.stderr.write(g)}),r.input&&l.stdin?.end(r.input);let d=()=>{h&&clearTimeout(h),a?.removeEventListener("abort",f)},p=g=>{d();try{l.kill("SIGTERM")}catch{}u(g)},f=()=>p(new iz(`Command aborted: ${e}`)),h=r.timeout?setTimeout(()=>p(new Dne(`Command timed out after ${Math.round(r.timeout/6e4)}m: ${e}`)),r.timeout):void 0;a?.addEventListener("abort",f,{once:!0}),l.on("close",g=>{d();let y=g??1;y!==0&&!r.ignoreReturnCode?u(new Error(`The process '${e}' failed with exit code ${y}`)):c({exitCode:y,stdout:n,stderr:s})}),l.on("error",g=>{d(),u(g)})})}return{exitCode:await vQe(e,t,i),stdout:n,stderr:s}}function OYt(e){return new Promise(t=>setTimeout(t,e*1e3))}async function hv(e,t){for(let r=1;r<=t.retries;r++)try{return await e()}catch(n){if(r<t.retries)$e(`${t.label} failed, retrying (${r}/${t.retries})...`),await OYt(t.delay);else throw n}throw new Error("unreachable")}async function QB(e,t){EI(e);try{return await t()}finally{vI()}}var DYt=1e3;function mv(e){return e*DYt}function LB(e){let t=e.split("/");return t.length===2&&t[0]&&t[1]?{owner:t[0],repo:t[1]}:null}var PVe=/^[A-Za-z_][A-Za-z0-9_.-]*$/;function $Ve(e){if(e.startsWith("{"))try{let o=JSON.parse(e);return{username:typeof o.username=="string"?o.username:void 0,password:typeof o.password=="string"?o.password:void 0,role:typeof o.role=="string"?o.role:void 0}}catch{return{}}let t=e.indexOf(":"),n=!(t>=0&&!/[=;]/.test(e.slice(0,t)))&&/(^|;)\s*role\s*=/.test(e);if(/(^|;)\s*(username|password)\s*=/.test(e)||n){let o=new Map;for(let a of e.split(";")){let c=a.indexOf("=");c>0&&PVe.test(a.slice(0,c).trim())&&o.set(a.slice(0,c).trim(),a.slice(c+1).trim())}return{username:o.get("username"),password:o.get("password"),role:o.get("role")}}if(e==="")return{};if(!e.includes(":"))for(let o of e.split(";")){let a=o.indexOf("=");if(a>0&&PVe.test(o.slice(0,a).trim()))return{}}let[s,...i]=e.split(":");return{username:s,password:i.join(":")}}function MYt(e){let t=e.split(/\r?\n/).map(s=>s.trim()).find(s=>s!=="")??"",{username:r,password:n}=$Ve(t);return{username:r,password:n}}function SR(e){return e.toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")}function FYt(e){let t=e.split(/\r?\n/).map(n=>n.trim()).filter(n=>n!==""),r=new Set;return t.map((n,s)=>{let{username:i,password:o,role:a}=$Ve(n),c=s+1,u=a?SR(a):"";for(u||(u=String(c));r.has(u);)u=`${u}_${c}`;return r.add(u),{key:u,username:i,password:o}})}function QYt(e){let t=FYt(e);if(t.length<2)return[];let r=[];for(let{key:n,username:s,password:i}of t)s!==void 0&&r.push({envName:`SKYRAMP_UI_USERNAME_${n}`,value:s}),i!==void 0&&r.push({envName:`SKYRAMP_UI_PASSWORD_${n}`,value:i});return r}var oz="SKYRAMP_UI_USERNAME",xR="SKYRAMP_UI_PASSWORD";function az(e){let{username:t,password:r}=MYt(e);return[...t!==void 0?[{envName:oz,value:t}]:[],...r!==void 0?[{envName:xR,value:r}]:[],...QYt(e)]}var OVe=e=>e.replace(/[.[\]^$*+?(){}|\\]/g,"\\$&");async function Mne(e){try{let{stdout:t,exitCode:r}=await Xi("git",["remote","get-url","origin"],{cwd:e,silent:!0,ignoreReturnCode:!0});if(r!==0)return;let n=t.trim();if(!n)return;let i=n.replace(/\/+$/,"").replace(/\.git$/,"").match(/[/:]([^/:]+)\/([^/]+)$/);if(!i)return;let o=`${i[1]}/${i[2]}`;return LB(o)?o:void 0}catch{return}}wr();async function DVe(e){let t=e.targetSetupCommand,r=e.skyrampExecutorVersion,n=e.skyrampMcpVersion;r||(r="v1.3.54"),n||(n="latest"),t||(t="docker compose up -d --build");let s={targetSetupCommand:t,authTokenCommand:e.authTokenCommand,targetTeardownCommand:e.targetTeardownCommand,skipTargetTeardown:e.skipTargetTeardown,skyrampExecutorVersion:r,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};EI("Resolved configuration");for(let[i,o]of Object.entries(s))i==="authTokenCommand"?ke(` ${i}: [REDACTED]`):ke(` ${i}: ${o}`);return vI(),s}var LYt;function Fne(e){LYt=e}wr();var pc=H(require("fs")),_o=H(require("path"));var k4e=require("crypto"),Ez=H(wz()),ise=mv(180);async function T4e(e,t,r){return QB("Installing Skyramp MCP",async()=>{let n,s,i;if(e.skyrampMcpSource==="local"){let a=process.env.MCP_SERVER;if(!a)throw new Error("MCP_SERVER env var required when skyrampMcpSource is 'local'");n="node",s=a;let c=_o.resolve(_o.dirname(a),".."),u=_o.join(c,"node_modules");return ke(`Using local MCP server: ${a}`),Ty("SKYRAMP_MCP_INSTALL_PATH",c),{command:n,args:s,licensePath:"",nodeModulesDir:u}}let o=_o.join(r,"mcp");if(pc.mkdirSync(o,{recursive:!0}),e.skyrampMcpSource==="github"){if(!t.skyrampMcpGithubToken)throw new Error("skyrampMcpGithubToken is required when skyrampMcpSource is 'github'");ks(t.skyrampMcpGithubToken);let a=_o.join(o,"node_modules","@skyramp","mcp"),c=`https://x-access-token:${t.skyrampMcpGithubToken}@github.com/letsramp/mcp.git`,u=e.skyrampMcpGithubRef;try{await hv(async()=>{pc.rmSync(a,{recursive:!0,force:!0}),pc.mkdirSync(_o.dirname(a),{recursive:!0}),/^[0-9a-fA-F]{7,40}$/.test(u)?(ke(`Fetching @skyramp/mcp from github.com/letsramp/mcp at commit ${u}`),await Xi("git",["init",a]),await Xi("git",["-C",a,"remote","add","origin",c]),await Xi("git",["-C",a,"fetch","--depth","1","origin",u]),await Xi("git",["-C",a,"checkout","FETCH_HEAD"])):(ke(`Cloning @skyramp/mcp from github.com/letsramp/mcp (ref: ${u})`),await Xi("git",["clone","--depth","1","--branch",u,c,a]));let{stdout:d}=await Xi("git",["-C",a,"rev-parse","HEAD"],{silent:!0});lm(`@skyramp/mcp commit: ${d.trim()} (ref: ${u})`),pc.rmSync(_o.join(a,".git"),{recursive:!0,force:!0}),ke("Installing dependencies and building..."),await Xi("npm",["install","--include=dev"],{cwd:a,timeout:ise}),await Xi("npm",["run","build"],{cwd:a})},{retries:3,delay:10,label:"MCP install (github)"})}catch(l){throw pc.rmSync(a,{recursive:!0,force:!0}),l}n="node",s=_o.join(a,"build","index.js"),i=_o.join(a,"node_modules"),Fne(i),Ty("NODE_PATH",i),Ty("SKYRAMP_MCP_INSTALL_PATH",o)}else{let a=pc.mkdtempSync(_o.join(r,"mcp-npm-cache-"));try{await J9t(`@skyramp/mcp@${e.skyrampMcpVersion}`,o,_o.join(r,"mcp-tarball"),a)}finally{pc.rmSync(a,{recursive:!0,force:!0})}let c=_o.join(o,"node_modules","@skyramp","mcp");n="node",s=_o.join(c,"build","index.js"),i=_o.join(o,"node_modules"),Fne(i),Ty("NODE_PATH",i),Ty("SKYRAMP_MCP_INSTALL_PATH",o)}return lm(`Skyramp MCP installed successfully (source: ${e.skyrampMcpSource})`),{command:n,args:s,licensePath:"",nodeModulesDir:i}})}var W9t={retries:3,delay:10},R4e=mv(60);async function J9t(e,t,r,n){let s=(p,f,h)=>hv(async()=>(await Xi("npm",[...p,"--cache",n],{cwd:t,timeout:f})).stdout,{...W9t,label:h}),o=`@skyramp/mcp@${Y9t(await s(["view",e,"version","--json=true"],R4e,"MCP version lookup (npm)"),e)}`,a=(await s(["view",o,"dist.integrity","--json=false"],R4e,"MCP integrity lookup (npm)")).trim();if(!/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(a))throw new Error(`no sha512 dist.integrity for ${o}: "${a}"`);pc.rmSync(r,{recursive:!0,force:!0}),pc.mkdirSync(r,{recursive:!0});let c=await s(["pack",o,"--pack-destination",r,"--json=false","--loglevel=warn"],ise,"MCP download (npm)"),u=c.trim().split(/\r?\n/).pop()??"";if(!u.endsWith(".tgz"))throw new Error(`npm pack ${o} printed no tarball name: ${c}`);let l=_o.join(r,u);if(`sha512-${(0,k4e.createHash)("sha512").update(pc.readFileSync(l)).digest("base64")}`!==a)throw pc.rmSync(r,{recursive:!0,force:!0}),new Error(`The downloaded ${o} does not match the registry integrity ${a}`);ke(`Verified ${o} against registry integrity ${a}`),await s(["install",l],ise,"MCP install (npm)")}function Y9t(e,t){let r=e.trim(),n;try{n=r?JSON.parse(r):[]}catch{n=[]}let s=(Array.isArray(n)?n:[n]).filter(i=>typeof i=="string"&&Ez.valid(i)!==null);if(s.length===0)throw new Error(`npm view ${t} printed no version: ${r}`);return Ez.rsort(s)[0]}wr();var HB=H(require("fs")),_4e=H(require("os")),vz=H(require("path"));var ose="CLAUDE_CODE_EFFORT_LEVEL";function K9t(){return vz.join(process.env.RUNNER_TEMP||_4e.tmpdir(),"claude-code")}var aA=class extends VP{label="Claude Code";provider={name:"Claude API",statusUrl:"https://status.claude.com/"};reusesPreinstalledCli=!1;get binary(){return vz.join(this.prefix(),"node_modules",".bin","claude")}envVar="ANTHROPIC_API_KEY";apiKeyField="anthropicApiKey";supportsNdjsonLog=!0;effort;cliVersion;cleanupRegistered=!1;cliPrefix;constructor(t=vR,r="latest"){super(),this.effort=t,this.cliVersion=r}prefix(){return this.cliPrefix??K9t()}async install(){let t=this.prefix();HB.rmSync(t,{recursive:!0,force:!0}),this.cleanupRegistered||(this.cleanupRegistered=!0,process.on("exit",()=>HB.rmSync(t,{recursive:!0,force:!0}))),await Xi("npm",["install","--prefix",t,`@anthropic-ai/claude-code@${this.cliVersion}`]);let r=vz.join(t,"node_modules","@anthropic-ai","claude-code","install.cjs");HB.existsSync(r)&&await Xi("node",[r]);let{stdout:n}=await Xi(this.binary,["--version"],{silent:!0});lm(`Claude Code CLI ${n.trim()} installed at ${this.binary}`)}async initialize(){try{await Xi(this.binary,["--version"]),lm("Claude Code CLI initialized successfully")}catch{$e("Could not verify Claude Code CLI version")}}pinEffortEnv(){let t=process.env[ose];t&&t!==this.effort&&$e(`${ose}=${t} from the environment is overridden by the effort input ("${this.effort}").`),process.env[ose]=this.effort,ke(`Agent effort level: ${this.effort}`)}setupAgentEnv(t,r){!t.useBedrock&&!t.anthropicApiKey||(process.env.MCP_TIMEOUT=String(mv(r.testExecutionTimeout)),process.env.ENABLE_TOOL_SEARCH="false",this.pinEffortEnv(),t.useBedrock?(process.env.CLAUDE_CODE_USE_BEDROCK="1",t.awsRegion&&(process.env.AWS_REGION=t.awsRegion),delete process.env.ANTHROPIC_API_KEY,process.env.AWS_ACCESS_KEY_ID||process.env.AWS_BEARER_TOKEN_BEDROCK||process.env.AWS_PROFILE||process.env.AWS_WEB_IDENTITY_TOKEN_FILE||$e("useBedrock is set but no AWS credentials were detected in the environment. Add an aws-actions/configure-aws-credentials step (OIDC) before Testbot.")):t.anthropicApiKey&&(process.env.ANTHROPIC_API_KEY=t.anthropicApiKey,delete process.env.CLAUDE_CODE_USE_BEDROCK))}};var Sz=class extends aA{provider={name:"Amazon Bedrock",statusUrl:"https://health.aws.amazon.com/health/status"}};var xz=class extends aA{setupAgentEnv(t,r){process.env.MCP_TIMEOUT=String(mv(r.testExecutionTimeout)),process.env.ENABLE_TOOL_SEARCH="false",this.pinEffortEnv(),delete process.env.ANTHROPIC_API_KEY,delete process.env.CLAUDE_CODE_USE_BEDROCK,process.env.CLAUDE_CODE_DISABLE_CLAUDE_MDS="1"}};function N4e(e){return e?.useBedrock?new Sz(e.effort,e.claudeCodeVersion):e?.useLocalAuth?new xz(e.effort,e.claudeCodeVersion):new aA(e?.effort,e?.claudeCodeVersion)}wr();async function P4e(e){await QB(`Installing ${e.label} CLI`,async()=>{e.reusesPreinstalledCli&&await Z9t(e)||await hv(async()=>{await e.install(),lm(`${e.label} CLI installed successfully`)},{retries:3,delay:5,label:`${e.label} CLI install`})})}async function Z9t(e){try{let{exitCode:t,stdout:r}=await Xi(e.binary,["--version"],{silent:!0,ignoreReturnCode:!0});if(t===0&&r.trim())return lm(`${e.label} CLI already installed (version: ${r.trim()})`),!0;ke(`${e.label} CLI not found (non-zero exit or empty output), will install`)}catch(t){ke(`${e.label} CLI not found, will install (${t instanceof Error?t.message:String(t)})`)}return!1}async function B4e(e){await QB(`Initializing ${e.label} agent`,async()=>{await e.initialize()})}var $4e=H(require("path")),Mi="Skyramp Testbot",No="test-bot@skyramp.dev",ase="skyramp-testbot[bot]";function RR(){return $4e.join(process.env.RUNNER_TEMP??"/tmp","skyramp")}var gv=(i=>(i.NotFound="not_found",i.NoAccess="no_access",i.Unavailable="unavailable",i.AccessLost="access_lost",i.CannotOpen="cannot_open",i))(gv||{}),xf=e=>e.source==="other"?{source:e.source,key:e.key}:{source:e.source,site:e.site,key:e.key},oa=e=>`${e.source}:${e.site??""}:${e.key}`;var VB=/^pasted-[0-9a-f]{16}$/,Xc=/^file-[0-9a-f]{16}$/,TR=(s=>(s.Pdf="application/pdf",s.Csv="text/csv",s.Docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.Xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s))(TR||{}),Xr=e=>e.trim().toUpperCase(),kR=(e,t)=>{let r=e.trim();return VB.test(r.toLowerCase())?"Pasted text":Xc.test(r.toLowerCase())?t?.get(Xr(r))??"Uploaded document":/^\d+$/.test(r)?`Confluence page ${r}`:r.toUpperCase()},Ba=(e,t,r)=>t?`${kR(e,r)} AC${t}`:kR(e,r),Cz=(n=>(n.New="new",n.Updated="updated",n.Existing="existing",n))(Cz||{}),Jl=(n=>(n.Sufficient="sufficient",n.Insufficient="insufficient",n.NoChange="no_change",n))(Jl||{}),Cf=(m=>(m.RelatedChangeConflict="related_change_conflict",m.ReferenceOutsideTarget="reference_outside_target",m.SourceAccessLost="source_access_lost",m.ConfigurationIncomplete="configuration_incomplete",m.CredentialUnavailable="credential_unavailable",m.WorkflowBindingUnverified="workflow_binding_unverified",m.WorkflowRefUnprotected="workflow_ref_unprotected",m.BedrockWorkflowRequired="bedrock_workflow_required",m.DeploymentReview="deployment_review",m.SutRevisionMismatch="sut_revision_mismatch",m.IsolationUnavailable="isolation_unavailable",m.EvidenceInsufficient="evidence_insufficient",m.ConfigurationUnresolved="configuration_unresolved",m.ModelProviderDenied="model_provider_denied",m.ModelProviderUnavailable="model_provider_unavailable",m.RunnerProviderNotReady="runner_provider_not_ready",m.MergeConflict="merge_conflict",m))(Cf||{}),cA=(i=>(i.CiCheck="ci_check",i.TestReport="test_report",i.StaticAnalysis="static_analysis",i.CodeReview="code_review",i.Other="other",i))(cA||{}),_R=(n=>(n.Application="application",n.Environment="environment",n.TestDefect="test_defect",n))(_R||{}),WB=(a=>(a.AuthToken="auth_token",a.Secret="secret",a.DataConnection="data_connection",a.AppNotStarted="app_not_started",a.Login="login",a.ExternalDependency="external_dependency",a.RecordingReplay="recording_replay",a))(WB||{});var JB=(r=>(r.Probe="probe",r.Agent="agent",r))(JB||{}),YB=(n=>(n.Seed="seed",n.RuntimeMock="runtime_mock",n.EnvOverride="env_override",n))(YB||{}),Iz=(n=>(n.TestCode="test_code",n.SkyrampMocker="skyramp_mocker",n.RecipeOverride="recipe_override",n))(Iz||{});var NR=(r=>(r.NoTime="no-time",r.Failed="failed",r))(NR||{});var Lr=e=>e.slice(0,12);var _r=(y=>(y.Preflight="preflight",y.Onboard="onboard",y.Analyze="analyze",y.Triage="triage",y.Deploy="deploy",y.Recommend="recommend",y.Generate="generate",y.GenerateUi="generate-ui",y.GenerateUnit="generate-unit",y.Adapt="adapt",y.NativeRun="native-run",y.Finalize="finalize",y.Report="report",y.Deliver="deliver",y.Plan="plan",y.Write="write",y))(_r||{});var yv=(r=>(r.GenerateUnit="generate-unit",r.Write="write",r))(yv||{});var use=["generate-unit","native-run"],KB=["preflight","plan","write",...use,"report","deliver"],BR=["preflight","onboard","deploy"];var uA=(n=>(n.Unit="unit",n.Integration="integration",n.E2e="e2e",n))(uA||{}),lse=Object.values(uA);function Rz(e){return lse.includes(e)}var kz=(n=>(n.Focused="focused",n.ImpactedCritical="impacted_critical",n.Broad="broad",n))(kz||{}),Tz=1440;function fc(e){return"execute"in e}var i$=require("node:crypto");var ZB=(r=>(r.Skyramp="skyramp",r.Llm="llm",r))(ZB||{}),If=b.string().trim().min(1),X9t=b.object({case:If.describe("recommend id this assertion enforces"),evidence:If.describe("the exact assertion line from the file that checks that case's observable")}),dse=b.object({route:b.literal("persistence"),url:b.string().url()}).strict(),Av=b.object({kind:b.nativeEnum(YB).describe("seed: data the test creates in the app; runtime_mock: a mock on a Skyramp worker, which other tests reach too; env_override: an env value the app runs with. A stub inside the test's own process, such as a browser page's route, is none of these"),target:If.describe("the dependency, endpoint or data it affects"),mechanism:b.nativeEnum(Iz).describe("test_code: the test applies and undoes it; skyramp_mocker: a mock the test applies on a Skyramp worker; recipe_override: the mocker cannot reach the dependency (its URL is fixed in the build)"),detail:If.describe("what it sets up"),worker:If.optional().describe("skyramp_mocker: host:port of the worker the test applies the mock to (default localhost:35142)"),safety:dse.optional().describe("shared seed that keeps its data only because the environment permits it: the persistence route and the exact endpoint; Testbot checks the current permission just before it runs the test"),cleanup:If.optional().describe("seed: when its data can be removed, a command that removes it if the test does not; otherwise declare leftBehind instead. Run as written and without a shell: give real values, not a placeholder such as <id>, single-quote an argument that holds shell syntax, or put the logic in a script in the repository and run that"),leftBehind:If.optional().describe("seed: the records the test creates and cannot remove from the app, and how to find them")}).refine(e=>!e.leftBehind||e.kind==="seed",{message:"leftBehind is for a seed only: a runtime mock or an env override creates no records",path:["leftBehind"]}),e5t=b.object({file:If.describe("staged path under .skyramp/staged/"),source:b.nativeEnum(ZB),language:If,covers:b.array(b.string()).min(1,"must be a non-empty array of recommend ids").describe("recommend ids this test covers"),assertions:b.array(X9t).min(1,"must be a non-empty array").describe("one per case covered, citing the real line"),context:b.array(Av).optional().describe("what the test sets up against the running app, in order: data it seeds, Skyramp mocks it applies, env overrides; omit when none")}),pse=b.object({schemaVersion:b.literal(1),tests:b.array(e5t),deferredUi:b.array(b.string()).describe("recommend ui ids left for the UI stage (generate) \u2014 [] for generate-ui"),summary:If.describe("one paragraph")});var Nm=(o=>(o.Place="place",o.Update="update",o.Regenerate="regenerate",o.Delete="delete",o.Verify="verify",o.None="none",o))(Nm||{}),to=(n=>(n.Pass="pass",n.Fail="fail",n.Skip="skip",n))(to||{}),hc=b.string().trim().min(1),XB=(s=>(s.Setup="setup",s.Expectation="expectation",s.Locator="locator",s.Other="other",s))(XB||{}),_z=b.object({kind:b.nativeEnum(XB),reason:hc.describe("what in the test is wrong, with the evidence: the setup error it raised, or the requirement or changed line its expectation contradicts")}),e$=b.array(b.string().url().max(2048).regex(/^https?:\/\//i)).max(50),O4e=b.object({case:hc.describe("a covers id \u2014 the recommend case this test realizes"),status:b.nativeEnum(to),runtimeTargets:e$.optional().describe("HTTP(S) URLs this case actually exercised in its current run; omit for in-process or mocked checks, never infer from test type"),environmentRestriction:hc.optional().describe("for a skipped case: what this run lacks to execute it; the test is still written"),fromJourney:b.boolean().optional(),testProblem:_z.optional().describe("[derived] write's reading of a failing case: the test, not the app, is at fault"),defect:b.boolean().optional().describe("[derived] write's reading of a failing case: true when the app is wrong and the test is right"),failure:b.string().optional().describe("[derived] for a failing case: the runner's failure for it, as printed")}).refine(e=>!e.environmentRestriction||e.status==="skip"&&!e.runtimeTargets?.length,{message:"an environment-restricted case must be skipped and have no runtimeTargets"}),D4e=b.object({started:b.boolean().optional().describe("with exit null: true if the 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:b.number({invalid_type_error:"must be a number or null"}).nullable().describe("process exit of the re-run; null when no SUT was available"),details:b.string().optional().describe("what failed, or why a file was not run \u2014 required on any non-zero exit"),tests:b.array(O4e).optional().describe("ONE ENTRY PER CASE the file covers, its own result; must agree with exit (0 \u2192 no fail; non-zero \u2192 at least one, or the non-test reason in details). The report reads the file by these where they are given")}),M4e=b.object({context:b.array(Av).optional().describe("[derived] setup declarations retained for every executed test, including maintained tests"),from:b.string().optional().describe("staged path \u2014 required for placements"),file:hc.describe("final path relative to its repository, inside that checkout, with a source-file extension"),repository:hc.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),action:b.nativeEnum(Nm),covers:b.array(b.string()).optional().describe("recommend ids a placed test covers"),repro:b.boolean().optional().describe("this test is MEANT to fail \u2014 it reproduces a reported bug"),finding:b.boolean().optional().describe("a non-repro test that failed on a REAL product bug"),placementBroken:b.boolean().optional().describe('placement/harness problem one repair could not fix \u2014 every reran.tests entry is then "skip"'),keptReason:hc.optional().describe("why a planned delete/regenerate was declined and the file kept"),isolatedRun:hc.optional().describe('only for a test marked "runs alone": the command, from its checkout root and without a shell, that runs only this file and writes its JUnit XML into $SKYRAMP_RESULTS_DIR (named by its path: no shell expands it) \u2014 the harness runs it, so leave reran.exit null'),reran:D4e,assertionCount:b.number().int().nonnegative().optional().describe("[derived] assertions reachable from the file, counted at write time"),addedOnly:b.boolean().optional().describe("[derived] an existing test file the run only added to: every line it had is still there"),added:b.array(hc).optional().describe("[derived] the cases of the test functions the run added to an existing file: functions it did not have"),staleOnBase:b.boolean().optional().describe("[derived] an existing test that fails the same way on the base branch: its failure is the test's own")}).refine(e=>e.action!=="place"||typeof e.from=="string"&&e.from.trim().length>0,{message:'is a place but has no "from" staged path',path:[]}),F4e=(r=>(r.Junit="junit",r.Converter="converter",r))(F4e||{}),t5t=hc.optional().describe("the items[].file this test is in \u2014 needed only when two of this suite's files cover the same case id"),r5t=b.object({results:hc.describe("the JUnit XML file this run wrote, a plain file name inside $SKYRAMP_RESULTS_DIR (e.g. backend.xml)"),source:b.nativeEnum(F4e),run:hc.describe("the command you ran that wrote it, exactly as you ran it (with any converter)"),files:b.array(hc).min(1).describe("the items[].file paths this run covered"),cases:b.array(b.object({test:hc.describe("the test's name as the runner reports it, qualified by its class or file (e.g. tests/test_a.py::test_x) when the bare name repeats"),case:hc.describe("the covers id it realizes"),file:t5t})).describe("map each reported test name to the case it covers")}),n5t=b.object({suites:b.array(r5t).min(1)}),fse=b.object({schemaVersion:b.literal(1),items:b.array(M4e),runnerResults:n5t.optional().describe("the JUnit XML your test runs wrote into $SKYRAMP_RESULTS_DIR, so the harness reads each test's result from the runner \u2014 omit only when no SUT is available"),ignored:b.array(b.string()).describe("existing tests assessed and deliberately left untouched"),summary:hc.describe("one paragraph")});var bv=b.object({environmentId:b.string().uuid(),allowed:b.boolean(),revision:b.string().uuid(),updatedAt:b.string().datetime(),updatedBy:b.string().uuid()}).strict();function hse(e){let t=bv.passthrough().safeParse(e);return t.success?t.data:void 0}function t$(e){switch(e){case"no_environment":return"the run has no selected Test Environment address";case"no_recorded_grant":return"the run's configuration did not record permission to keep test data in this environment";case"unavailable":return"the current permission to keep test data could not be read";case"changed":return"the permission to keep test data changed after the run started";case"denied":return"the environment does not permit test data to stay";case"out_of_scope":return"the request is outside the environment's address"}}function r$(e,t,r){let n=bv.safeParse(t);return!n.success||!n.data.allowed||!e.environmentId||n.data.environmentId!==e.environmentId||!e.environmentAddress||e.persistentDataPolicy&&e.persistentDataPolicy.revision!==n.data.revision?!1:lA(e.environmentAddress,r)}function lA(e,t){try{let r=new URL(t),n=new URL(e);if(n.search||n.hash)return!1;let s=/%(?:2f|5c|2e|25)/i;if(t.includes("\\")||e.includes("\\")||s.test(r.pathname)||s.test(n.pathname))return!1;let i=n.pathname.replace(/\/$/,"");return["https:","http:"].includes(n.protocol)&&r.origin===n.origin&&(r.pathname===i||r.pathname.startsWith(`${i}/`))}catch{return!1}}var X4e=b.unknown().optional(),gse={handshake:"/api/v1/runner/runs/:runId/attempts",report:"/api/v1/runner/attempts/:attemptId/report",end:"/api/v1/runner/attempts/:attemptId/end",configuration:"/api/v1/runner/attempts/:attemptId/configuration",progress:"/api/v1/runner/attempts/:attemptId/progress",sutRecipe:"/api/v1/runner/attempts/:attemptId/sut-recipe",runtimePlan:"/api/v1/runner/attempts/:attemptId/runtime-plan",persistentDataPolicy:"/api/v1/runner/attempts/:attemptId/persistent-data-policy",heartbeat:"/api/v1/runner/attempts/:attemptId/heartbeat",setupEvents:"/api/v1/runner/attempts/:attemptId/setup-events",runEvents:"/api/v1/runner/attempts/:attemptId/run-events",requirements:"/api/v1/runner/attempts/:attemptId/requirements",requirementFile:"/api/v1/runner/attempts/:attemptId/requirements/:key/file",deployedRevisions:"/api/v1/runner/attempts/:attemptId/deployed-revisions"},MR=(r=>(r.GitHub="github",r.AzureDevOps="azure-devops",r))(MR||{}),Oz=(i=>(i.Trigger="TRIGGER",i.Baseline="BASELINE",i.AuthoritativeRelatedChange="AUTHORITATIVE_RELATED_CHANGE",i.ConfiguredSharedDependency="CONFIGURED_SHARED_DEPENDENCY",i.ManualOverride="MANUAL_OVERRIDE",i))(Oz||{}),o$=(o=>(o.PullRequest="pull_request",o.ReadyForReview="ready_for_review",o.Schedule="schedule",o.Manual="manual",o.SutSetup="sut_setup",o.RevisionRead="revision_read",o))(o$||{}),s5t=["sut_setup"],i5t=["sut_setup","schedule","revision_read"],o5t=["sut_setup"],Dz=(t=>(t.PullRequest="pull_request",t))(Dz||{}),yse=(r=>(r.PullRequest="pull_request",r.Branch="branch",r))(yse||{}),Q4e=["TRIGGER","AUTHORITATIVE_RELATED_CHANGE","MANUAL_OVERRIDE"];var Mz=(i=>(i.ReportUploaded="report_uploaded",i.NoReport="no_report",i.Cancelled="cancelled",i.RecipeUploaded="recipe_uploaded",i.RevisionsUploaded="revisions_uploaded",i))(Mz||{}),eJe=(r=>(r.Running="running",r.Ended="ended",r))(eJe||{}),Fz=(p=>(p.TimedOut="timed_out",p.AgentFailed="agent_failed",p.SetupFailed="setup_failed",p.CredentialMissing="credential_missing",p.RunnerLost="runner_lost",p.CheckoutFailed="checkout_failed",p.EnvironmentUnverified="environment_unverified",p.ModelProviderDenied="model_provider_denied",p.ModelProviderUnavailable="model_provider_unavailable",p.RunnerProviderNotReady="runner_provider_not_ready",p.MergeConflict="merge_conflict",p.EnvironmentUnavailable="environment_unavailable",p))(Fz||{}),Ase=(n=>(n.Onboard="onboard",n.Deploy="deploy",n.Recheck="recheck",n))(Ase||{}),a$=(r=>(r.Started="started",r.Finished="finished",r))(a$||{}),bse=(n=>(n.Passed="passed",n.Failed="failed",n.Skipped="skipped",n))(bse||{}),pA=(o=>(o.Log="log",o.Component="component",o.Reply="reply",o.Question="question",o.Delivered="delivered",o.Credentials="credentials",o))(pA||{}),Qz=(n=>(n.ChooseCredential="choose_credential",n.FreeText="free_text",n.ChooseSource="choose_source",n))(Qz||{});var c$=(s=>(s.Answered="answered",s.Followed="followed",s.NotFollowed="not_followed",s.TooLate="too_late",s))(c$||{}),FR=(n=>(n.Discover="discover",n.Start="start",n.Check="check",n))(FR||{}),Bm=(s=>(s.ValidationPlan="validation_plan",s.TestEnvironment="test_environment",s.TestConditions="test_conditions",s.Tests="tests",s))(Bm||{});var QR=(s=>(s.Found="found",s.Starting="starting",s.Up="up",s.OutOfScope="out_of_scope",s))(QR||{}),Yl=b.string().regex(/^[1-9][0-9]{0,18}$/),Kl=b.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),mse=b.string().regex(/^(?!.*\.\.)(?!\/)(?!.*\/$)[A-Za-z0-9._/-]{1,255}$/),wv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function u$(e,t){return`${e.replace(/\/+$/,"")}/runs/${t}`}function Lz(e,t){if(t)try{let r=new URL(e),n=r.pathname.startsWith("/runs/")?r.pathname.slice(6):"";return wv.test(n)&&e===u$(r.origin,n)&&r.origin===new URL(t).origin?e:void 0}catch{return}}var $a=b.string().regex(wv),mc=b.string().regex(/^[0-9a-f]{64}$/),$z=b.object({id:$a,revision:Yl}).strict(),Uz={provider:b.literal("github"),providerAccountId:Yl,providerRepositoryId:Yl},jz={provider:b.literal("azure-devops"),providerAccountId:$a,providerRepositoryId:$a},Yu=b.discriminatedUnion("provider",[b.object(Uz).strict(),b.object(jz).strict()]),wse=b.discriminatedUnion("provider",[b.object(Uz).passthrough(),b.object(jz).passthrough()]),en=e=>`${e.provider}:${e.providerRepositoryId}`,L4e={namespace:b.string().min(1),name:b.string().min(1)},tJe=b.discriminatedUnion("provider",[b.object({...Uz,...L4e}).strict(),b.object({...jz,...L4e}).strict()]),U4e=b.object({ref:b.string().min(1),revision:Kl}).strict(),a5t=b.object({kind:b.nativeEnum(yse),number:Yl.optional(),ref:b.string().min(1),revision:Kl,reason:b.nativeEnum(Oz)}).strict(),c5t=b.object({repository:tJe,revision:Kl,ref:b.string().nullable(),reason:b.nativeEnum(Oz),change:b.object({kind:b.nativeEnum(Dz),number:Yl,base:U4e.optional()}).strict().nullable(),compareWith:U4e.optional(),merge:b.array(a5t).min(2).optional()}).strict();function u5t(e){let t=e.merge;if(!t)return null;if(e.change||e.compareWith)return{path:["merge"],message:"a merged source names no change and no compareWith"};if(e.ref===null)return{path:["ref"],message:"a merged source names its baseline branch"};let r=new Set,n=new Set;for(let[i,o]of t.entries()){if(o.kind==="pull_request"!=(o.number!==void 0))return{path:["merge",i,"number"],message:"a pull request names its number, and a branch none"};if(!Q4e.includes(o.reason))return{path:["merge",i,"reason"],message:`${o.reason} does not select a merged revision`};if(o.kind==="branch"&&o.reason!=="MANUAL_OVERRIDE")return{path:["merge",i,"reason"],message:"only a person chooses a branch to merge"};if(o.ref===e.ref)return{path:["merge",i,"ref"],message:"the baseline branch is what the source merges onto"};if(o.number!==void 0&&r.has(o.number)||n.has(o.ref))return{path:["merge",i],message:"names a revision the source already merges"};o.number!==void 0&&r.add(o.number),n.add(o.ref)}let s=Q4e.find(i=>t.some(o=>o.reason===i));return e.reason!==s?{path:["reason"],message:`a source that merges these revisions is ${s}`}:null}function l5t(e){if(e.trigger.kind==="revision_read"!=!e.baseline)return e.baseline?"a revision_read run names no baseline":"names its baseline";if(!e.baseline)return null;let{confirmedRunId:t,initialBaselineId:r,comparisonBaselineId:n,sources:s}=e.baseline;if([t,r,n].filter(u=>u!=null).length>1)return"a run compares with one baseline";let i=e.trigger.kind==="schedule"&&t!==null||r!==void 0||n!==void 0;if(!s)return i?"names every source of the snapshot, once":null;if(t===null&&r===void 0&&n===void 0)return"a run with no Confirmed Baseline names no baseline sources";let o=new Set(e.sources.map(u=>en(u.repository))),a=new Set(s.map(u=>en(u.repository)));return a.size===s.length&&a.size===o.size&&[...a].every(u=>o.has(u))?null:"names every source of the snapshot, once"}var rJe=/^[A-Z][A-Z0-9_]+-[1-9][0-9]*$/,nJe=/^[1-9][0-9]{0,18}$/,j4e=new RegExp(`${rJe.source}|${nJe.source}`),q4e=/^https:\/\/[a-z0-9-]+(\.[a-z0-9-]+)+$/,d5t=b.union([b.object({source:b.literal("jira"),site:b.string().regex(q4e),key:b.string().regex(rJe),updated:b.string().datetime(),contentHash:mc}).strict(),b.object({source:b.literal("confluence"),site:b.string().regex(q4e),key:b.string().regex(nJe),version:b.number().int().positive(),contentHash:mc}).strict(),b.object({source:b.literal("other"),key:b.string().regex(VB),contentHash:mc}).strict(),b.object({source:b.literal("other"),key:b.string().regex(Xc),contentHash:mc,fileName:b.string().min(1).max(255),mediaType:b.nativeEnum(TR)}).strict()]),z4e=b.union([b.literal("jira"),b.literal("confluence")]),sJe=b.object({schemaVersion:b.literal(1),items:b.array(b.union([b.object({source:z4e,site:b.string(),key:b.string().regex(j4e),state:b.literal("read"),text:b.string(),version:b.string().min(1),contentMatches:b.boolean()}).strict(),b.object({source:z4e,site:b.string(),key:b.string().regex(j4e),state:b.literal("not_read"),reason:b.nativeEnum(gv)}).strict(),b.object({source:b.literal("other"),key:b.string().regex(VB),state:b.literal("read"),text:b.string(),version:b.string().min(1),contentMatches:b.boolean()}).strict(),b.object({source:b.literal("other"),key:b.string().regex(VB),state:b.literal("not_read"),reason:b.nativeEnum(gv)}).strict(),b.object({source:b.literal("other"),key:b.string().regex(Xc),state:b.literal("read"),version:mc,fileName:b.string().min(1).max(255),mediaType:b.nativeEnum(TR)}).strict(),b.object({source:b.literal("other"),key:b.string().regex(Xc),state:b.literal("not_read"),reason:b.nativeEnum(gv)}).strict()])),instructions:b.array(b.string()).optional()}).strict(),p5t=b.object({resultId:b.string().min(1),repository:b.string().min(1),testType:b.string().min(1),path:b.string(),finding:b.string().min(1)}).strict(),f5t=b.object({schemaVersion:b.literal(1),runId:$a,skyrampOrgId:$a,target:$z,policy:$z.nullable(),trigger:b.object({kind:b.nativeEnum(o$),requestedAt:b.string().datetime()}).strict(),configuration:b.object({captureId:$a,revision:Yl.nullable(),hash:mc}).strict(),baseline:b.object({confirmedRunId:$a.nullable(),initialBaselineId:$a.optional(),comparisonBaselineId:$a.optional(),knownFailures:b.array(p5t).optional(),sources:b.array(b.object({repository:Yu,revision:Kl}).strict()).optional()}).strict().optional(),sources:b.array(c5t).min(1).max(1e3),execution:b.object({provider:b.nativeEnum(MR),repository:tJe,workflowPath:b.string(),ref:b.string()}).strict(),credentials:b.array(b.object({name:b.string(),purpose:b.nativeEnum(wE),required:b.boolean()}).strict()),requirements:b.array(d5t).min(1).optional(),instructions:b.object({contentHash:mc}).strict().optional(),deployedRevisions:b.array(b.object({repository:Yu,revision:Kl}).strict()).min(1).optional()}).strict().superRefine((e,t)=>{let r=new Set;(e.requirements??[]).forEach((c,u)=>{let l="fileName"in c?"file":"pasted";c.source==="other"&&c.key!==`${l}-${c.contentHash.slice(0,16)}`&&t.addIssue({code:b.ZodIssueCode.custom,message:"is not the key of its content hash",path:["requirements",u,"key"]});let d=oa({source:c.source,key:c.key});r.has(d)&&t.addIssue({code:b.ZodIssueCode.custom,message:"names an item that the run already names",path:["requirements",u,"key"]}),r.add(d)});let n=e.trigger.kind,s=s5t.includes(n);s!==(e.policy===null)&&t.addIssue({code:b.ZodIssueCode.custom,path:["policy"],message:s?`a ${n} run has no policy`:"names the policy revision"}),e.baseline?.knownFailures&&!e.baseline.comparisonBaselineId&&t.addIssue({code:b.ZodIssueCode.custom,path:["baseline","knownFailures"],message:"known failures require a chosen comparison checkpoint"});let i=l5t(e);i&&t.addIssue({code:b.ZodIssueCode.custom,path:e.baseline?["baseline","sources"]:["baseline"],message:i}),i5t.includes(n)&&e.sources.forEach((c,u)=>{c.reason!=="BASELINE"&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u,"reason"],message:`a ${n} run selects only BASELINE sources`})}),e.deployedRevisions&&n!=="manual"&&t.addIssue({code:b.ZodIssueCode.custom,path:["deployedRevisions"],message:"only a manual run pins deployed revisions"});let o=new Set(e.sources.map(c=>en(c.repository))),a=new Set;(e.deployedRevisions??[]).forEach((c,u)=>{let l=en(c.repository);o.has(l)?a.has(l)&&t.addIssue({code:b.ZodIssueCode.custom,path:["deployedRevisions",u,"repository"],message:"repository appears twice"}):t.addIssue({code:b.ZodIssueCode.custom,path:["deployedRevisions",u,"repository"],message:"names a repository outside the snapshot"}),a.add(l)}),e.sources.forEach((c,u)=>{c.compareWith&&(c.reason!=="MANUAL_OVERRIDE"||c.change)&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u,"compareWith"],message:"only a MANUAL_OVERRIDE source without a change names a revision to compare with"}),e.baseline?.comparisonBaselineId&&(c.change?.base||c.compareWith||c.merge)&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u],message:"a chosen checkpoint cannot be combined with a source comparison base or merge"});let l=u5t(c);l&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u,...l.path],message:l.message})})});var Ese=(r=>(r.Person="person",r.Policy="policy",r))(Ese||{}),h5t=b.object({kind:b.nativeEnum(Ese),name:b.string().min(1).max(256)}).strict(),m5t=b.object({mcp:b.discriminatedUnion("source",[b.object({source:b.literal("npm"),version:b.string().regex(/^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/).nullable()}).strict(),b.object({source:b.literal("github"),ref:b.string().regex(/^[A-Za-z0-9._/-]{1,255}$/)}).strict()]),bedrock:b.object({region:b.string().regex(/^[a-z]{2}(-[a-z]+)+-[0-9]$/),roleArn:b.string().regex(/^arn:aws(-[a-z]+)*:iam::[0-9]{12}:role\/[\w+=,.@/-]{1,512}$/)}).strict().nullable()}).strict(),g5t=b.object({schemaVersion:b.literal(1),attempt:b.object({id:$a,number:b.number().int().positive(),deadlineAt:b.string().datetime()}).strict(),manifest:f5t,manifestHash:mc,entitlements:b.array(b.string()).optional(),runToken:b.string().min(1).optional(),requestedBy:h5t.nullable().optional(),writeAllowed:b.boolean().optional(),claudeCodeVersion:b.string().regex(/^[0-9]+\.[0-9]+\.[0-9]+$/,"an exact version, such as 2.1.290").nullable().optional(),deployedRevisions:b.array(b.object({repository:Yu,revision:Kl}).strict()).optional(),statedRevisions:b.array(b.object({repository:Yu,revision:Kl}).strict()).optional(),runSettings:m5t.optional()}).strict(),G4e={providerRunAttempt:b.number().int().positive(),workflowRef:b.string().min(1)},y5t=b.string().regex(/^[^/]+\/[^/]+\/[1-9][0-9]{0,15}\/[1-9][0-9]{0,15}$/),A5t=b.object({schemaVersion:b.literal(1),runId:$a,execution:b.discriminatedUnion("provider",[b.object({...G4e,provider:b.literal("github"),repository:b.object(Uz).strict(),providerRunId:Yl}).strict(),b.object({...G4e,provider:b.literal("azure-devops"),repository:b.object(jz).strict(),providerRunId:y5t}).strict()]),requester:b.literal(!0).optional(),writeCheck:b.literal(!0).optional(),claudeCodePin:b.literal(!0).optional(),deployedPins:b.literal(!0).optional(),statedPins:b.literal(!0).optional(),runSettings:b.literal(!0).optional()}).strict(),H4e=b.object({repository:Yu,number:Yl,commitSha:Kl.optional()}).strict(),Nz=b.array(b.object({repository:Yu,reason:b.string().max(4096).regex(/\S/)}).strict()).max(1e3).optional(),qz=b.object({branch:mse.optional(),commitSha:Kl.optional()}).strict(),Ev=4096,vse=b.array(b.object({file:b.string().max(4096).regex(/\S/),dependsOn:b.array(b.string().max(2048).regex(/\S/)).max(100)}).strict()).min(1).max(500),V4e=b.object({repository:Yu,message:b.string().max(Ev),...qz.shape,heldBack:vse.optional()}).strict(),b5t=b.discriminatedUnion("status",[b.object({status:b.literal("none"),noTests:Nz}).strict(),b.object({status:b.literal("delivered"),noTests:Nz,pullRequests:b.array(H4e).min(1)}).strict(),b.object({status:b.literal("partial"),noTests:Nz,pullRequests:b.array(H4e).min(1),failures:b.array(V4e).min(1)}).strict(),b.object({status:b.literal("failed"),message:b.string().max(Ev),noTests:Nz,failures:b.array(V4e).min(1).optional()}).strict()]),Sse=1024*1024,iJe=16*1024*1024,n$={id:4096,text:16384,businessCase:65536},l$={id:n$.id,statement:n$.text,rows:1e3},W4e=b.string().min(1).max(n$.id),Bz=b.string().max(n$.text),Pz=(e,t)=>b.array(b.object({[e]:Bz}).strict()).max(t).optional(),xse=b.object({language:b.custom(e=>e==="ja","Invalid"),businessCaseAnalysis:b.string().max(n$.businessCase),validation:b.object({rationale:Bz.min(1),gaps:b.array(b.string().min(1).max(4096)).max(200)}).strict().optional(),changes:b.array(b.object({id:W4e,text:Bz}).strict()).max(1e3).optional(),requirements:b.array(b.object({id:W4e,statement:Bz}).strict()).max(l$.rows).optional(),issuesFound:Pz("description",5e3),newTestsCreated:Pz("description",5e3),testResults:Pz("details",5e3),caveats:Pz("text",100)}).strict(),w5t=b.object({blockedPreflight:b.object({file:b.string().min(1),repository:b.string().min(1).optional(),reason:b.string().min(1).max(300),evidence:b.string().min(1).max(400)}).strict().optional(),sufficiency:b.nativeEnum(Jl),rationale:b.string().min(1),gaps:b.array(b.string().min(1)),acceptedEvidence:b.array(b.object({kind:b.nativeEnum(cA),repository:b.string().min(1),revision:Kl,reference:b.string().min(1),summary:b.string().min(1)}).strict()),actionRequired:b.array(b.nativeEnum(Cf))}).strict().superRefine((e,t)=>{e.sufficiency==="insufficient"!=e.gaps.length>0&&t.addIssue({code:b.ZodIssueCode.custom,path:["gaps"],message:"only insufficient evidence names gaps, and it names at least one"}),new Set(e.actionRequired).size!==e.actionRequired.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["actionRequired"],message:"a reason appears twice"})}),OR=500,Cse=2048,Ise=1e3,E5t=/[\\/:*?"<>|;#$*{},+=[\]%\p{Cc}\p{Cf}]/u,J4e=e=>e.length>0&&e.length<=64&&e===e.trim()&&!E5t.test(e)&&!/[^\S ]/u.test(e)&&!/^[._]/.test(e)&&!e.endsWith("."),oJe=e=>{if(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/.test(e))return!0;let[t,r,n,...s]=e.split("/");return e.length<=201&&s.length===0&&n!==void 0&&/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,48}[A-Za-z0-9])?$/.test(t)&&J4e(r)&&J4e(n)},v5t=b.object({testResults:b.array(b.object({resultId:b.string().regex(/^[^\u0000-\u001f]{1,512}$/),repository:b.string().refine(oJe,"Invalid"),testType:b.string(),runtimeTargets:e$.optional(),endpoint:b.string(),status:b.enum(["Pass","Fail","Skipped"]),details:b.string(),fileName:b.string().optional(),testId:b.string().regex(/^[^\u0000-\u001f]{1,512}$/).optional(),failureCause:b.object({kind:b.nativeEnum(_R),family:b.nativeEnum(WB).optional()}).strict().optional(),origin:b.nativeEnum(Cz).optional()}).strict()),validation:w5t,changes:b.array(b.object({id:b.string().min(1).max(512),text:b.string().max(16384),source:b.string().max(Cse),testedBy:b.array(b.string().min(1).max(1024)).max(OR),writtenBy:b.array(b.string().min(1).max(1024)).max(OR),maintainedBy:b.array(b.string().min(1).max(1024)).max(OR)}).strict()).max(Ise).optional(),traceVersion:b.literal(1),display:xse.optional()}).passthrough().superRefine((e,t)=>{let r=e.display,n={issuesFound:e.issuesFound,newTestsCreated:e.newTestsCreated,testResults:e.testResults,caveats:e.caveats};for(let i of["issuesFound","newTestsCreated","testResults","caveats"]){let o=r?.[i];o&&o.length!==(Array.isArray(n[i])?n[i].length:0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["display",i],message:`has not one row per ${i} row`})}r?.validation&&r.validation.gaps.length!==e.validation.gaps.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["display","validation","gaps"],message:"has not one gap per validation gap"});let s=new Set;e.testResults.forEach((i,o)=>{let a=i.failureCause;a&&i.status==="Pass"&&t.addIssue({code:b.ZodIssueCode.custom,path:["testResults",o,"failureCause"],message:"a passing result has no failure cause"}),a&&a.kind==="environment"!=(a.family!==void 0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["testResults",o,"failureCause"],message:"an environment cause names its family, and no other cause does"});let c=["testResults",o,"resultId"],u=i.resultId.slice(`${i.repository}:${i.testType}:`.length);(!i.resultId.startsWith(`${i.repository}:${i.testType}:`)||u===""||u.startsWith("/")||u.startsWith("#"))&&t.addIssue({code:b.ZodIssueCode.custom,path:c,message:"is not repository:testType:path for this result"}),s.has(i.resultId)&&t.addIssue({code:b.ZodIssueCode.custom,path:c,message:"stable identity repeated"}),s.add(i.resultId)})}),Y4e=e=>e.replace(/[%:#]/g,t=>encodeURIComponent(t));function $m(e,t,r,n){let s=r.replace(/\\/g,"/"),i=s.split("/").filter(c=>c!==""&&c!==".");if(s.startsWith("/")||/^[A-Za-z]:/.test(s)||i.length===0||i.includes(".."))throw new Error(`testResultId needs a path relative to the repository root, got "${r}"`);let o=i.join("/"),a=`${e}:${t}:${Y4e(o)}`;return n?`${a}#${Y4e(n)}`:a}var zz=50,Gz=b.discriminatedUnion("kind",[b.object({kind:b.literal("branch_pushed"),repository:Yu,branch:mse,commit:Kl}).strict(),b.object({kind:b.enum(["pull_request_opened","pull_request_edited"]),repository:Yu,number:Yl,branch:mse}).strict()]),aJe=b.object({schemaVersion:b.literal(1),run:b.object({runId:$a,attemptNumber:b.number().int().positive(),manifestHash:mc}).strict(),target:$z,policy:$z,provenance:b.object({sources:b.array(b.object({repository:Yu,revision:Kl}).strict()),firstQualification:b.literal(!0).optional()}).strict(),delivery:b.object({generatedTests:b5t}).strict(),producer:b.object({testbot:b.string().regex(/^[0-9A-Za-z.+-]{1,64}$/),mcp:b.string().regex(/^[0-9A-Za-z.+-]{1,64}$/)}).strict(),report:v5t,githubWrites:b.array(Gz).max(zz).optional()}).strict(),Hz=(s=>(s.Recipe="recipe",s.CredentialRejected="credential_rejected",s.Environment="environment",s.Unknown="unknown",s))(Hz||{}),LR=200,S5t=b.object({cause:b.nativeEnum(Hz),credential:b.string().regex(Wc).optional(),reason:b.string().trim().min(1).max(LR).optional()}).strict().refine(e=>e.cause==="credential_rejected"==(e.credential!==void 0&&e.reason!==void 0),{message:"a credential_rejected check, and only one, names the credential and why"}),x5t=b.object({name:b.string().regex(Wc),purpose:b.enum(["sut_access","other"]),required:b.boolean(),how:b.string().trim().min(1).max(MP)}).strict(),C5t=aJe.pick({schemaVersion:!0,run:!0,target:!0,provenance:!0,producer:!0}).extend({recipe:UP,check:S5t.optional(),inputs:b.array(x5t).min(1).max(50).optional()}).strict().superRefine(({recipe:e},t)=>{let r=(i,o)=>t.addIssue({code:b.ZodIssueCode.custom,path:["recipe",...i],message:o});e.status==="blocked"&&e.blockers.length===0&&r(["blockers"],"a blocked recipe names at least one blocker");let n=new Set,s=0;e.files.forEach((i,o)=>{Qy(i.path)||r(["files",o,"path"],"is not a file under .skyramp/sut/, or the .skyramp/workspace.yml a recipe stored before SKYR-5829 carries"),n.has(i.path)&&r(["files",o,"path"],"file repeated"),n.add(i.path),fj.test(i.content)&&r(["files",o,"content"],"is not text");let a=Buffer.byteLength(i.content,"utf8");s+=a,a>EE&&r(["files",o,"content"],`larger than ${EE} bytes`)}),s>vE&&r(["files"],`recipe text over ${vE} bytes in total`)}),I5t=b.object({components:b.array(b.object({name:b.string().min(1),repository:b.string().refine(oJe,"Invalid"),observedRevision:b.string().regex(/^[0-9a-f]{7,64}$/).nullable(),source:b.nativeEnum(JB),evidence:b.string()}).strict().refine(e=>e.source!=="agent"||e.observedRevision===null,{path:["observedRevision"],message:"a component only an agent session can read names no revision"}))}).strict();function vv(e){return e.trigger.kind==="schedule"||e.trigger.kind==="manual"&&e.sources.every(t=>t.reason==="BASELINE")}function cJe(e,t){if(e.trigger.kind!=="revision_read"&&!vv(e))throw new Error(`The deployed revisions upload is invalid: only a revision_read, scheduled or unchosen manual run sends one, not a ${e.trigger.kind} run`);let r=e.sources.map(s=>`${s.repository.namespace}/${s.repository.name}`),n=I5t.safeParse({components:t.map((s,i)=>{let o=r.find(a=>a.toLowerCase()===s.repository.toLowerCase());if(!o)throw new Error(`The deployed revisions upload is invalid: components.${i}.repository: ${s.repository} is not a source of the run`);return{...s,repository:o,evidence:s.evidence.trim()}})});if(!n.success)throw new Error(`The deployed revisions upload is invalid: ${Use(n.error)}`);return n.data}var uJe=b.object({schemaVersion:b.literal(1),stage:b.nativeEnum(Ase),event:b.nativeEnum(a$),status:b.nativeEnum(bse).optional()}).strict().refine(e=>e.status===void 0||e.event==="finished",{path:["status"],message:"only a finished stage has a status"}),kf=100,fA=5e3,Pm=2e3,s$=100,Vz=/^[A-Za-z0-9_-]{1,64}$/,Rse=20,kse=200,Tse=100,_se=100,R5t=200,K4e="[^/\\s](?:(?:[^/\\s]| )*[^/\\s])?",k5t=new RegExp(`^(?:[^/\\s]+/[^/\\s]+|[^/\\s]+/${K4e}/${K4e})$`),Nse=500,Pse=50,Bse=10,$se=/^[A-Za-z0-9](?:[A-Za-z0-9 _-]{0,48}[A-Za-z0-9])?$/,UR=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Ju=e=>b.string().max(e).refine(t=>t.trim().length>0&&!UR.test(t),"blank, or not text"),Rf={sequence:b.number().int().min(1).max(fA),at:b.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?Z$/)},lJe=b.object({...Rf,kind:b.literal("reply"),to:b.string().uuid(),outcome:b.nativeEnum(c$),accepted:b.boolean(),text:Ju(Pm),note:b.object({source:b.enum(["target","environment"]),quote:Ju(Pm)}).strict().optional(),kept:Ju(Pm).optional()}).strict();function dJe(e,t){if(e.kind!=="reply")return;let r=e;r.accepted!==(r.outcome==="answered"||r.outcome==="followed")&&t.addIssue({code:b.ZodIssueCode.custom,path:["accepted"],message:"accepted exactly when answered or followed"}),r.note&&r.outcome!=="not_followed"&&t.addIssue({code:b.ZodIssueCode.custom,path:["note"],message:"a note only when not_followed"}),r.kept&&r.outcome!=="followed"&&t.addIssue({code:b.ZodIssueCode.custom,path:["kept"],message:"kept only when followed"})}var Ose=b.discriminatedUnion("kind",[b.object({...Rf,kind:b.literal("log"),phase:b.nativeEnum(FR),text:Ju(Pm)}).strict(),b.object({...Rf,kind:b.literal("component"),name:Ju(s$),repository:Ju(R5t).refine(e=>k5t.test(e)||e===Nn,"not owner/name"),file:Ju(Nse).nullable(),status:b.nativeEnum(QR),version:Ju(_se).optional()}).strict(),lJe,b.object({...Rf,kind:b.literal("question"),id:b.string().regex(Vz),type:b.nativeEnum(Qz),text:Ju(Pm),component:Ju(s$).nullable(),choices:b.array(Ju(kse)).max(Rse),placeholder:Ju(Tse).optional()}).strict(),b.object({...Rf,kind:b.literal("delivered"),ids:b.array(b.string().uuid()).max(kf)}).strict(),b.object({...Rf,kind:b.literal("credentials"),names:b.array(b.string().regex(Wc)).min(1).max(Pse),logins:b.array(b.object({key:b.string().regex($se),usernameVariable:b.string().regex(Wc),passwordVariable:b.string().regex(Wc)}).strict()).min(1).max(Bse).optional()}).strict()]).superRefine((e,t)=>{if(dJe(e,t),e.kind==="credentials"&&new Set(e.names).size!==e.names.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["names"],message:"a name twice"}),e.kind==="credentials"&&e.logins){let r=e.logins.map(n=>SR(n.key));new Set(r).size!==r.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["logins"],message:"a key twice"}),e.logins.forEach((n,s)=>{for(let i of["usernameVariable","passwordVariable"])e.names.includes(n[i])||t.addIssue({code:b.ZodIssueCode.custom,path:["logins",s,i],message:"not one of the names"})})}e.kind==="question"&&(e.type==="free_text"!=(e.choices.length===0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["choices"],message:"choices exactly when the question is not free_text"}),new Set(e.choices).size!==e.choices.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["choices"],message:"a choice twice"}))}),pJe=b.object({schemaVersion:b.literal(1),events:b.array(Ose).max(kf)}).strict(),Dse=b.discriminatedUnion("kind",[b.object({...Rf,kind:b.literal("log"),stage:b.nativeEnum(Bm),text:Ju(Pm)}).strict(),lJe,b.object({...Rf,kind:b.literal("delivered"),ids:b.array(b.string().uuid()).max(kf)}).strict(),b.object({...Rf,kind:b.literal("stage"),stage:b.nativeEnum(Bm),event:b.nativeEnum(a$)}).strict(),b.object({...Rf,kind:b.literal("test"),resultId:b.string().regex(/^[^\u0000-\u001f]{1,512}$/),status:b.enum(["Pass","Fail","Skipped"]),details:b.string().max(Pm).refine(e=>!UR.test(e),"not text")}).strict()]).superRefine(dJe),fJe=b.object({schemaVersion:b.literal(1),events:b.array(Dse).max(kf)}).strict(),Z4e={id:b.string().uuid(),text:b.string(),by:b.string().nullable(),at:b.string(),replied:b.literal(!0).optional()},hJe=b.discriminatedUnion("kind",[b.object({...Z4e,kind:b.literal("instruction"),question:b.null()}),b.object({...Z4e,kind:b.literal("answer"),question:b.string().regex(Vz)})]),mJe=b.string().regex(/^[A-Za-z0-9+/]{43}=$/),T5t=b.object({id:b.string().uuid(),revision:b.string(),by:b.string().nullable(),at:b.string(),target:b.string(),own:b.object({source:b.enum(["policy","test_environment"]),text:b.string()}).nullable()}),Wz=b.object({schemaVersion:b.literal(1),leftOut:b.array(b.string()),messages:b.array(hJe).optional(),stop:b.object({key:mJe}).optional(),notes:T5t.optional()}),gJe=b.object({schemaVersion:b.literal(1),messages:b.array(hJe).optional()}),d$=7,Jz=500*1024*1024,yJe=b.object({id:Yl,name:b.string().regex(/^[A-Za-z0-9._-]{1,200}$/),providerRunId:Yl,expiresAt:b.string().datetime()}).strict(),AJe=b.object({schemaVersion:b.literal(1),artifact:yJe,sessionId:$a,contentHash:mc,bytes:b.number().int().min(1).max(Jz)}).strict(),bJe=b.object({schemaVersion:b.literal(1),checkpoint:b.object({artifact:yJe,repository:b.object({namespace:b.string().min(1),name:b.string().min(1)}).strict(),sessionId:$a,contentHash:mc,key:mJe}).strict().nullable()}).strict(),_5t=200,$R=100,Yz=(n=>(n.Resume="resume",n.Retry="retry",n.Update="update",n))(Yz||{}),N5t=b.object({kind:b.nativeEnum(Yz),setup:b.object({runId:$a,endedAt:b.string().nullable(),outcome:b.string().nullable()}).strict(),components:b.array(b.object({name:b.string().min(1),repository:b.string().min(1),status:b.nativeEnum(QR)}).strict()).max($R),credentials:b.array(b.string().min(1)).max($R),answers:b.array(b.object({question:b.string(),answer:b.string().nullable()}).strict()).max($R),instructions:b.array(b.object({text:b.string(),reply:b.string().nullable()}).strict()).max($R),log:b.array(b.object({phase:b.nativeEnum(FR),text:b.string()}).strict()).max(_5t),recipe:b.object({files:b.array(b.object({path:b.string().min(1),content:b.string()}).strict()).max($R),blockers:b.array(b.object({component:b.string(),problem:b.string(),evidence:b.string(),fix:b.string()}).strict()).max($R)}).strict().optional()}).strict(),wJe=b.object({schemaVersion:b.literal(1),context:N5t.nullable()}).strict(),EJe=b.object({schemaVersion:b.literal(1),configuration:b.object({captureId:$a,revision:Yl.nullable(),hash:mc}).strict(),capture:b.object({schemaVersion:b.literal(1),settings:b.object({target:b.object({environment:b.unknown()}).passthrough(),timeoutMinutes:b.number().int().positive(),answerWaitMinutes:b.number().int().positive().optional(),testEnvironment:b.object({name:b.string().min(1),address:b.string().min(1).optional(),readyWhen:b.string().min(1).optional(),environmentId:b.string().uuid().optional(),persistentDataPolicy:X4e}).passthrough().optional()}).passthrough(),provenance:b.object({}).passthrough(),hash:mc}).strict()}).strict(),vJe=b.object({schemaVersion:b.literal(1),environmentId:b.string().uuid().nullable(),environmentAddress:b.string().url().nullable(),persistentDataPolicy:bv.nullable()}).strict(),P5t=LI.extend({environmentId:b.string().uuid().optional(),persistentDataPolicy:X4e,version:b.number().int().positive(),components:b.array(b.object({name:b.string().min(1),repository:b.string().min(1)}).strict()),contentHash:mc.optional(),files:b.array(b.object({path:b.string().refine(e=>Qy(e)&&!jI.includes(e),"not a file of a customer_deployed plan"),content:b.string()}).strict()).optional()}).strict(),SJe=b.object({schemaVersion:b.literal(1),testEnvironment:P5t.nullable().optional(),runtimePlan:b.object({version:b.number().int().positive(),contentHash:mc,files:b.array(b.object({path:b.string().refine(Qy,"not a recipe file path"),content:b.string()}).strict()).min(1),repository:hj.optional(),recipeRepository:hj.optional(),recipe:b.record(b.unknown()).optional()}).strict().nullable()}).strict().refine(e=>!(e.runtimePlan&&e.testEnvironment),{message:"a run pins a recipe or a customer's Test Environment, never both",path:["testEnvironment"]}),xJe=b.object({schemaVersion:b.literal(1),state:b.nativeEnum(eJe),ending:b.nativeEnum(Mz).nullable(),cause:b.nativeEnum(Fz).nullable(),deadlineAt:b.string().datetime()}).strict();function Mse(e,t){return e.state==="ended"?e.ending==="cancelled"?"cancelled":e.cause==="runner_lost"?"expired":"ended":t.getTime()>=Date.parse(e.deadlineAt)?"expired":null}var Fse=50,B5t=b.object({repository:Yu,revisions:b.array(b.number().int().nonnegative()).min(1).max(2).refine(e=>e.length<2||e[0]<e[1],"two revisions name the earlier first"),files:b.array(b.string().min(1)).min(1).max(Fse)}).strict();function dA(e){if(typeof e=="number"&&!Number.isFinite(e))throw new TypeError("Canonical JSON requires JSON values");if(Array.isArray(e))return`[${e.map(dA).join(",")}]`;if(e!==null&&typeof e=="object"){let r=e;return`{${Object.keys(r).sort().map(n=>`${JSON.stringify(n)}:${dA(r[n])}`).join(",")}}`}let t=JSON.stringify(e);if(t===void 0)throw new TypeError("Canonical JSON requires JSON values");return t}function Qse(e){return(0,i$.createHash)("sha256").update(dA(e),"utf8").digest("hex")}function CJe(e,t){let r=[...e].sort((n,s)=>n.path<s.path?-1:n.path>s.path?1:0).map(n=>({path:n.path,content:n.content}));return(0,i$.createHash)("sha256").update(dA(t===void 0?r:{repository:t,files:r}),"utf8").digest("hex")}function IJe(e){let t=(i,o)=>i<o?-1:i>o?1:0,r=[...e.files].sort((i,o)=>t(i.path,o.path)).map(i=>({path:i.path,content:i.content})),n={address:e.address,readyWhen:e.readyWhen,credentials:[...e.credentials].sort(t),revisionSources:e.revisionSources.map(i=>dA({method:i.method,detail:i.detail,components:[...i.components].sort(t)})).sort(t)},s=e.components.map(i=>dA({name:i.name,repository:i.repository})).sort(t);return(0,i$.createHash)("sha256").update(dA({type:"customer_deployed",environment:n,components:s,files:r}),"utf8").digest("hex")}function RJe(e){return(0,i$.createHash)("sha256").update(dA({schemaVersion:e.schemaVersion,settings:e.settings,provenance:e.provenance}),"utf8").digest("hex")}var DR=e=>({provider:e.provider,providerAccountId:e.providerAccountId,providerRepositoryId:e.providerRepositoryId});function Lse(e,t,{statedPins:r=!0}={}){return A5t.parse({schemaVersion:1,runId:e,execution:t.execution(),requester:!0,writeCheck:!0,claudeCodePin:!0,deployedPins:!0,...r?{statedPins:!0}:{},...t.runSettingsFromApp?{runSettings:!0}:{}})}function kJe(e){let t=g5t.parse(e);if(Qse(t.manifest)!==t.manifestHash)throw new Error("The handshake manifest hash does not match its manifest");return t}function $5t(e){let t=s=>s.map(i=>({repository:DR(i.repository),number:i.number,...i.commitSha===void 0?{}:{commitSha:i.commitSha}})),r=e.noTests?{noTests:e.noTests.map(s=>({repository:DR(s.repository),reason:s.reason}))}:{};if(e.status==="delivered")return{status:e.status,...r,pullRequests:t(e.pullRequests)};let n=s=>s.map(i=>({repository:DR(i.repository),message:i.message,...i.branch===void 0?{}:{branch:i.branch},...i.commitSha===void 0?{}:{commitSha:i.commitSha},...i.heldBack===void 0?{}:{heldBack:i.heldBack}}));return e.status==="partial"?{status:e.status,...r,pullRequests:t(e.pullRequests),failures:n(e.failures)}:e.status==="failed"&&e.failures?{...e,...r,failures:n(e.failures)}:{...e,...r}}function Use(e){return e.issues.map(t=>`${t.path.map((n,s)=>typeof n=="number"?`[${n}]`:s===0?n:`.${n}`).join("")}: ${t.message}`).join("; ")}function TJe(e){let{manifest:t}=e;if(o5t.includes(t.trigger.kind))throw new Error(`The report upload is invalid: a ${t.trigger.kind} run uploads its SUT recipe, never a report`);if(t.trigger.kind==="revision_read")throw new Error("The report upload is invalid: a revision_read run uploads what each component runs, never a report");if(e.firstQualification&&!t.baseline?.sources)throw new Error("The report upload is invalid: only a run whose manifest names baseline sources can be a first qualification");let r=aJe.safeParse({schemaVersion:1,run:{runId:t.runId,attemptNumber:e.attemptNumber,manifestHash:Qse(t)},target:{id:t.target.id,revision:t.target.revision},policy:t.policy&&{id:t.policy.id,revision:t.policy.revision},provenance:{sources:e.checkedOut.map(n=>({repository:DR(n.repository),revision:n.revision})),...e.firstQualification?{firstQualification:!0}:{}},delivery:{generatedTests:$5t(e.generatedTests)},producer:e.producer,report:e.report,...e.githubWrites?.length?{githubWrites:e.githubWrites.map(n=>({...n,repository:DR(n.repository)}))}:{}});if(!r.success)throw new Error(`The report upload is invalid: ${Use(r.error)}`);return O5t(r.data,t,e.checkedOut),r.data}function _Je(e,t,r,n,s,i={}){let o=C5t.safeParse({schemaVersion:1,run:{runId:e.runId,attemptNumber:t,manifestHash:Qse(e)},target:{id:e.target.id,revision:e.target.revision},provenance:{sources:r.map(a=>({repository:DR(a.repository),revision:a.revision}))},producer:s,recipe:n,...i.check?{check:i.check}:{},...i.inputs?.length?{inputs:i.inputs}:{}});if(!o.success)throw new Error(`The SUT recipe upload is invalid: ${Use(o.error)}`);return o.data}function O5t(e,t,r){let n=i=>r.find(o=>en(o.repository)===en(i.repository))?.revision??i.revision,s=new Map(t.sources.map(i=>[`${i.repository.namespace}/${i.repository.name}`.toLowerCase(),n(i)]));e.report.validation.acceptedEvidence.forEach((i,o)=>{let a=`report.validation.acceptedEvidence[${o}]`,c=s.get(i.repository.toLowerCase());if(!c)throw new Error(`${a}.repository: ${i.repository} is outside the run's snapshot`);if(i.revision!==c)throw new Error(`${a}.revision: evidence is not from the checked-out revision ${c}`)})}var jse=H(require("path"));var jR=H(require("fs")),Tf=H(require("path"));function qR(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var D5t=8;function tr(e,t,r={}){let n=t.slice(0,D5t),s=t.length-n.length;return{name:e,passed:!1,details:n.join("; ")+(s>0?`; \u2026and ${s} more`:""),...r.fatal?{fatal:!0}:{}}}function ro(e){if(jR.existsSync(e))try{return JSON.parse(jR.readFileSync(e,"utf-8"))}catch{return}}function le(e,t){return ro(Tf.join(e.outputsDir,t))}function on(e,t,r,n){if(!r)throw new Error(`${t}.json unexpectedly invalid at artifact time: ${n[0]}`);let s=Tf.join(e.outputsDir,`${t}.json`);return jR.writeFileSync(s,JSON.stringify(r,null,2)+`
|
|
182
|
+
${s.output}`:`deploy reported ${t.outcome} without the failing command`,fix:t.outcome==="change-broke-bringup"?`fix the change that broke bring-up${i}, then ${n?"Run setup again":"onboard again"}`:r.length>0?s4t(r):n?"if it failed for a reason that has passed, such as a service that was down, Check again; otherwise make .skyramp/sut/setup.sh bring the SUT up from a clean checkout, then Run setup again":"make .skyramp/sut/setup.sh bring the SUT up from a clean checkout (what onboard's session had that a fresh run lacks), then onboard again"}}function Ly(e){return[...new Set([...e.components.flatMap(t=>t.credentials??[]),...e.environment?.credentials??[]])].filter(t=>Wc.test(t))}function n4t(e,t,r){let n=new Set(Ly(e)),s=new Map;for(let i of t?.credentialsRefused??[]){let o=`${i.name}\0${i.component}`;n.has(i.name)&&!s.has(o)&&s.set(o,i)}return[...s.values()].map(({name:i,component:o,status:a,evidence:c})=>({component:o,problem:`${i} was refused${a?` (${a})`:""} by ${o}`,evidence:c,fix:`Fix ${i}'s value in its secret on the workflow host (${Uy}), or pick another secret for it under Credentials, then ${r?"Check again":"Retry"}.`}))}var Uy="a GitHub Actions secret, or on Azure DevOps a secret variable in the host repository's skyramp-testbot variable group under Pipelines \u203A Library";function s4t(e){let t=e.length===1;return`add ${t?"a secret":"secrets"} named ${e.join(", ")} on the workflow host, ${t?"as":"each as"} ${Uy}, then Retry: Skyramp adds ${t?"it":"them"} to the Target's credentials, and the replay gets ${t?"its value":"their values"}. If it still fails, make .skyramp/sut/setup.sh bring the SUT up from a clean checkout`}function i4t(e){return e.environment?{component:e.components.map(t=>t.name).join(", ")||"SUT",problem:"the deployment was never checked from a fresh session: deploy did not run or wrote no deploy.json",evidence:"outputs/deploy.json is missing from this run",fix:"run deploy after onboard in the same run so it checks the deployment is ready; if deploy ran, its stage log says why it wrote no deploy.json"}:{component:e.components.map(t=>t.name).join(", ")||"SUT",problem:"the recipe was never replayed: deploy did not run or wrote no deploy.json",evidence:"outputs/deploy.json is missing from this run",fix:"run deploy after onboard in the same run so it replays .skyramp/sut/setup.sh from a clean start; if deploy ran, its stage log says why it wrote no deploy.json"}}function o4t(e){return{component:e.components.map(t=>t.name).join(", ")||"SUT",problem:`${bm}: setup ran out of time while checking ${e.environment?"that the deployment is ready":"that the app comes up from a clean start"}. Every component was up before that.`,evidence:"The check from a fresh session didn't finish.",fix:"Retry: setup carries on from what this one found and finishes checking."}}function a4t(e){return{component:"SUT recipe",problem:"deploy fixed recipe drift, but the recipe it fixed was not collected \u2014 onboard's copy is the recipe from before the fix",evidence:`deploy reported recipe-drift: ${(e.recipeFixes??[]).join("; ")||"no fixes listed"}`,fix:"collect .skyramp/sut/ after deploy (collectRecipeFiles) and build the plan from that collection"}}var aee=[".skyramp/sut/setup.sh",".skyramp/sut/teardown.sh",".skyramp/sut/health.json"],cee=[".skyramp/sut/health.json"];function c4t(e){return`Onboard again so it leaves the whole recipe in the checkout: ${e.map(r=>`write ${r} as a regular file (a symlink is not uploaded)`).join("; ")}.`}function uee(e,t,r){return t&&r||e}function jP(e,t,r={}){let n=t!==void 0&&!t4t.includes(t.outcome),s=uee(e,t,r.recipeFiles),i=t?.outcome==="recipe-drift"&&!r.recipeFiles,o=(s.recipeFilesOmitted??[]).filter(I=>Qy(I.path)),a=o.length?[{component:"SUT recipe",problem:`The recipe could not be uploaded whole: ${o.map(I=>I.path).join(", ")} left out.`,evidence:o.map(I=>`${I.path}: ${I.reason}`).join("; "),fix:"Keep each recipe file text-only and under 64 KiB, and the recipe under 512 KiB in total \u2014 move large generated content out of .skyramp/sut/ and have setup.sh produce it."}]:[],c=FI(e.status),u=e.environment,l=new Set(s.recipeFiles.map(I=>I.path)),d=c?(u?cee:aee).filter(I=>!l.has(I)):[],p=d.length?[{component:"SUT recipe",problem:`The recipe is missing ${d.join(", ")}, so it cannot be replayed.`,evidence:`collected: ${[...l].sort().join(", ")||"nothing"}`,fix:c4t(d)}]:[],f=c&&!u&&(r.awaitsCredentialCheck?.length??0)>0,h=n4t(e,t,r.recheck??!1),g=t&&n?r4t(e,t,r.unsupplied??[],r.recheck??!1):void 0,y=(r.unsupplied?.length??0)>0||t?.outcome==="change-broke-bringup",m=h.length>0?[...h,...g&&y?[g]:[]]:g?[g]:t?[]:c&&!f?[r.timeLimit?o4t(e):i4t(e)]:[],A=new Set(u?.revisionSources.flatMap(I=>I.components)),w=u&&c?e.components.filter(I=>I.repository!==Nn&&!A.has(I.name)).map(I=>I.name):[],E=w.length?[{component:w.join(", "),problem:`Testbot cannot tell which revision ${w.join(" and ")} ${w.length>1?"run":"runs"}, so a run could not say which changes it tested.`,evidence:`revision sources: ${u.revisionSources.map(I=>`${I.detail} (${I.components.join(", ")})`).join("; ")||"none"}`,fix:"Say in the Test Environment's notes how to tell what is deployed, such as a version route (GET /version), then set it up again."}]:[],x=(c?u?.revisionSources??[]:[]).filter(I=>I.method==="not_tracked").map(I=>({component:I.components.join(", "),problem:`Testbot can't tell which commit ${I.components.join(" and ")} ${I.components.length>1?"run":"runs"}, so a run can't say which of ${I.components.length>1?"their":"its"} changes it tested.`,evidence:I.detail,fix:`Say in the Test Environment's notes how to tell what ${I.components.join(" and ")} ${I.components.length>1?"run":"runs"}, such as a version route (GET /version) or a deploy workflow, then set it up again.`})),R=[...e.blockers,...m,...i&&t?[a4t(t)]:[],...a,...p,...E,...x,...r.revisionCheck?.blockers??[],...r.credentialBlockers??[]],v=t?.baseUrls??{};return{schemaVersion:1,...u?{type:"customer_deployed",environment:uLe(u)}:{},...!u&&r.repository?{repository:r.repository}:{},status:c&&(t!==void 0||f)&&!n&&!i&&o.length===0&&d.length===0&&w.length===0&&!r.credentialBlockers?.length&&h.length===0?"ready":"blocked",components:e.components.map(I=>({name:I.name,repository:I.repository,healthy:(I.healthy||r.recheck===!0&&t!==void 0)&&!n,url:Object.hasOwn(v,I.name)&&v[I.name]||null,...I.steps?{steps:I.steps.map(N=>({action:N.action,text:N.text,source:N.source,file:N.file}))}:{},...I.kind?{kind:I.kind}:{},...I.from?{from:{file:I.from.file,service:I.from.service}}:{},...I.credentials?{credentials:[...new Set(I.credentials)].filter(N=>Wc.test(N))}:{},...u?{deployed:u4t(I,r)}:{}})),suites:e.suites.map(I=>({framework:I.framework,file:I.file,result:I.result})),inputsUsed:[...e.inputsUsed],...e.inputsUsedHow?{inputsUsedHow:e.inputsUsedHow.filter(I=>e.inputsUsed.includes(I.input)).map(I=>({input:I.input,how:I.how}))}:{},inputsNotUsed:e.inputsNotUsed.map(I=>({input:I.input,reason:I.reason})),blockers:R.map(I=>({component:I.component,problem:I.problem,evidence:I.evidence,fix:I.fix})),replay:t&&!u?{outcome:t.outcome,durationSeconds:r.deployDurationSeconds??null}:f?{outcome:oee,durationSeconds:null}:!u&&R.some(I=>I.problem.startsWith(bm))?{outcome:cLe,durationSeconds:null}:null,files:s.recipeFiles.filter(I=>Qy(I.path)&&!(u&&jI.includes(I.path))).map(I=>({path:I.path,content:I.content}))}}function u4t(e,t){return e.repository===Nn?null:t.revisionCheck?t.revisionCheck.deployed[e.name]??null:t.deployed?.[e.name]??e.deployed??null}function uLe(e){return{address:e.address,readyWhen:e.readyWhen,credentials:[...new Set(e.credentials)],revisionSources:e.revisionSources.map(t=>({method:t.method,detail:t.detail,components:[...t.components]}))}}function lee(e){return{schemaVersion:1,status:"ready",components:e.components.map(({url:t,deployed:r,...n})=>({...n,healthy:!0})),suites:e.suites,inputsUsed:e.inputsUsed,...e.inputsUsedHow?{inputsUsedHow:e.inputsUsedHow}:{},inputsNotUsed:e.inputsNotUsed,blockers:[],recipeFiles:e.files,recipeFilesOmitted:[],...e.environment?{environment:uLe(e.environment)}:{}}}wr();wr();wr();var dee;(function(e){e.Pass="Pass",e.Fail="Fail",e.Error="Error",e.Skipped="Skipped",e.Unknown="Unknown"})(dee||(dee={}));var lLe;(function(e){e.High="high",e.Medium="medium",e.Low="low"})(lLe||(lLe={}));var dLe;(function(e){e.Skyramp="skyramp",e.External="external"})(dLe||(dLe={}));var pee;(function(e){e.Update="UPDATE",e.Regenerate="REGENERATE",e.Delete="DELETE",e.Verify="VERIFY",e.Ignore="IGNORE"})(pee||(pee={}));var pLe;(function(e){e.Small="Small",e.Medium="Medium",e.Large="Large"})(pLe||(pLe={}));var Pt={};Ia(Pt,{BRAND:()=>O4t,DIRTY:()=>SE,EMPTY_PATH:()=>f4t,INVALID:()=>Ot,NEVER:()=>bJt,OK:()=>Na,ParseStatus:()=>ea,Schema:()=>hr,ZodAny:()=>zy,ZodArray:()=>Sm,ZodBigInt:()=>CE,ZodBoolean:()=>IE,ZodBranded:()=>zP,ZodCatch:()=>ME,ZodDate:()=>RE,ZodDefault:()=>DE,ZodDiscriminatedUnion:()=>yj,ZodEffects:()=>zl,ZodEnum:()=>$E,ZodError:()=>Yc,ZodFirstPartyTypeKind:()=>qt,ZodFunction:()=>bj,ZodIntersection:()=>NE,ZodIssueCode:()=>Be,ZodLazy:()=>PE,ZodLiteral:()=>BE,ZodMap:()=>WI,ZodNaN:()=>YI,ZodNativeEnum:()=>OE,ZodNever:()=>ep,ZodNull:()=>TE,ZodNullable:()=>mf,ZodNumber:()=>xE,ZodObject:()=>Kc,ZodOptional:()=>jl,ZodParsedType:()=>nt,ZodPipeline:()=>GP,ZodPromise:()=>Gy,ZodReadonly:()=>FE,ZodRecord:()=>Aj,ZodSchema:()=>hr,ZodSet:()=>JI,ZodString:()=>qy,ZodSymbol:()=>HI,ZodTransformer:()=>zl,ZodTuple:()=>hf,ZodType:()=>hr,ZodUndefined:()=>kE,ZodUnion:()=>_E,ZodUnknown:()=>vm,ZodVoid:()=>VI,addIssueToContext:()=>He,any:()=>z4t,array:()=>W4t,bigint:()=>Q4t,boolean:()=>SLe,coerce:()=>AJt,custom:()=>wLe,date:()=>L4t,datetimeRegex:()=>ALe,defaultErrorMap:()=>wm,discriminatedUnion:()=>Z4t,effect:()=>lJt,enum:()=>aJt,function:()=>sJt,getErrorMap:()=>qI,getParsedType:()=>ff,instanceof:()=>M4t,intersection:()=>X4t,isAborted:()=>mj,isAsync:()=>zI,isDirty:()=>gj,isValid:()=>jy,late:()=>D4t,lazy:()=>iJt,literal:()=>oJt,makeIssue:()=>qP,map:()=>rJt,nan:()=>F4t,nativeEnum:()=>cJt,never:()=>H4t,null:()=>q4t,nullable:()=>pJt,number:()=>vLe,object:()=>J4t,objectUtil:()=>fee,oboolean:()=>yJt,onumber:()=>gJt,optional:()=>dJt,ostring:()=>mJt,pipeline:()=>hJt,preprocess:()=>fJt,promise:()=>uJt,quotelessJson:()=>l4t,record:()=>tJt,set:()=>nJt,setErrorMap:()=>p4t,strictObject:()=>Y4t,string:()=>ELe,symbol:()=>U4t,transformer:()=>lJt,tuple:()=>eJt,undefined:()=>j4t,union:()=>K4t,unknown:()=>G4t,util:()=>Tr,void:()=>V4t});var Tr;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Tr||(Tr={}));var fee;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(fee||(fee={}));var nt=Tr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ff=e=>{switch(typeof e){case"undefined":return nt.undefined;case"string":return nt.string;case"number":return Number.isNaN(e)?nt.nan:nt.number;case"boolean":return nt.boolean;case"function":return nt.function;case"bigint":return nt.bigint;case"symbol":return nt.symbol;case"object":return Array.isArray(e)?nt.array:e===null?nt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?nt.promise:typeof Map<"u"&&e instanceof Map?nt.map:typeof Set<"u"&&e instanceof Set?nt.set:typeof Date<"u"&&e instanceof Date?nt.date:nt.object;default:return nt.unknown}};var Be=Tr.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"]),l4t=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Yc=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,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(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}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,Tr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Yc.create=e=>new Yc(e);var d4t=(e,t)=>{let r;switch(e.code){case Be.invalid_type:e.received===nt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Be.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Tr.jsonStringifyReplacer)}`;break;case Be.unrecognized_keys:r=`Unrecognized key(s) in object: ${Tr.joinValues(e.keys,", ")}`;break;case Be.invalid_union:r="Invalid input";break;case Be.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Tr.joinValues(e.options)}`;break;case Be.invalid_enum_value:r=`Invalid enum value. Expected ${Tr.joinValues(e.options)}, received '${e.received}'`;break;case Be.invalid_arguments:r="Invalid function arguments";break;case Be.invalid_return_type:r="Invalid function return type";break;case Be.invalid_date:r="Invalid date";break;case Be.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Tr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Be.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Be.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Be.custom:r="Invalid input";break;case Be.invalid_intersection_types:r="Intersection results could not be merged";break;case Be.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Be.not_finite:r="Number must be finite";break;default:r=t.defaultError,Tr.assertNever(e)}return{message:r}},wm=d4t;var fLe=wm;function p4t(e){fLe=e}function qI(){return fLe}var qP=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},f4t=[];function He(e,t){let r=qI(),n=qP({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===wm?void 0:wm].filter(s=>!!s)});e.common.issues.push(n)}var ea=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return Ot;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Ot;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},Ot=Object.freeze({status:"aborted"}),SE=e=>({status:"dirty",value:e}),Na=e=>({status:"valid",value:e}),mj=e=>e.status==="aborted",gj=e=>e.status==="dirty",jy=e=>e.status==="valid",zI=e=>typeof Promise<"u"&&e instanceof Promise;var bt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(bt||(bt={}));var ql=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},hLe=(e,t)=>{if(jy(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 r=new Yc(e.common.issues);return this._error=r,this._error}}};function or(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var hr=class{get description(){return this._def.description}_getType(t){return ff(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ff(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ea,ctx:{common:t.parent.common,data:t.data,parsedType:ff(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(zI(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ff(t)},s=this._parseSync({data:t,path:n.path,parent:n});return hLe(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ff(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return jy(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>jy(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ff(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(zI(s)?s:Promise.resolve(s));return hLe(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:Be.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new zl({schema:this,typeName:qt.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:r=>this["~validate"](r)}}optional(){return jl.create(this,this._def)}nullable(){return mf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sm.create(this)}promise(){return Gy.create(this,this._def)}or(t){return _E.create([this,t],this._def)}and(t){return NE.create(this,t,this._def)}transform(t){return new zl({...or(this._def),schema:this,typeName:qt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new DE({...or(this._def),innerType:this,defaultValue:r,typeName:qt.ZodDefault})}brand(){return new zP({typeName:qt.ZodBranded,type:this,...or(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ME({...or(this._def),innerType:this,catchValue:r,typeName:qt.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return GP.create(this,t)}readonly(){return FE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},h4t=/^c[^\s-]{8,}$/i,m4t=/^[0-9a-z]+$/,g4t=/^[0-9A-HJKMNP-TV-Z]{26}$/i,y4t=/^[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,A4t=/^[a-z0-9_-]{21}$/i,b4t=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,w4t=/^[-+]?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)?)??$/,E4t=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,v4t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hee,S4t=/^(?:(?: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])$/,x4t=/^(?:(?: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])$/,C4t=/^(([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]))$/,I4t=/^(([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])$/,R4t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,k4t=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gLe="((\\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])))",T4t=new RegExp(`^${gLe}$`);function yLe(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function _4t(e){return new RegExp(`^${yLe(e)}$`)}function ALe(e){let t=`${gLe}T${yLe(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function N4t(e,t){return!!((t==="v4"||!t)&&S4t.test(e)||(t==="v6"||!t)&&C4t.test(e))}function P4t(e,t){if(!b4t.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function B4t(e,t){return!!((t==="v4"||!t)&&x4t.test(e)||(t==="v6"||!t)&&I4t.test(e))}var qy=class e extends hr{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==nt.string){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_type,expected:nt.string,received:i.parsedType}),Ot}let n=new ea,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?He(s,{code:Be.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&He(s,{code:Be.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")E4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"email",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")hee||(hee=new RegExp(v4t,"u")),hee.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"emoji",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")y4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"uuid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")A4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"nanoid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")h4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"cuid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")m4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"cuid2",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")g4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"ulid",code:Be.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),He(s,{validation:"url",code:Be.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"regex",code:Be.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.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)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?ALe(i).test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?T4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?_4t(i).test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{code:Be.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?w4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"duration",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?N4t(t.data,i.version)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"ip",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?P4t(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"jwt",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?B4t(t.data,i.version)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"cidr",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?R4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"base64",code:Be.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?k4t.test(t.data)||(s=this._getOrReturnCtx(t,s),He(s,{validation:"base64url",code:Be.invalid_string,message:i.message}),n.dirty()):Tr.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:Be.invalid_string,...bt.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...bt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...bt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...bt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...bt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...bt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...bt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...bt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...bt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...bt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...bt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...bt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...bt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...bt.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,...bt.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,...bt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...bt.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...bt.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...bt.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...bt.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...bt.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...bt.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...bt.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...bt.errToObj(r)})}nonempty(t){return this.min(1,bt.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};qy.create=e=>new qy({checks:[],typeName:qt.ZodString,coerce:e?.coerce??!1,...or(e)});function $4t(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var xE=class e extends hr{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)!==nt.number){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_type,expected:nt.number,received:i.parsedType}),Ot}let n,s=new ea;for(let i of this._def.checks)i.kind==="int"?Tr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),He(n,{code:Be.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?$4t(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),He(n,{code:Be.not_finite,message:i.message}),s.dirty()):Tr.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,bt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,bt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,bt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,bt.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:bt.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:bt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:bt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:bt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:bt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:bt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:bt.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:bt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:bt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:bt.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Tr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};xE.create=e=>new xE({checks:[],typeName:qt.ZodNumber,coerce:e?.coerce||!1,...or(e)});var CE=class e extends hr{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)!==nt.bigint)return this._getInvalidInput(t);let n,s=new ea;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),He(n,{code:Be.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Tr.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return He(r,{code:Be.invalid_type,expected:nt.bigint,received:r.parsedType}),Ot}gte(t,r){return this.setLimit("min",t,!0,bt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,bt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,bt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,bt.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:bt.toString(s)}]})}_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:bt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:bt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:bt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:bt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:bt.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};CE.create=e=>new CE({checks:[],typeName:qt.ZodBigInt,coerce:e?.coerce??!1,...or(e)});var IE=class extends hr{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==nt.boolean){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.boolean,received:n.parsedType}),Ot}return Na(t.data)}};IE.create=e=>new IE({typeName:qt.ZodBoolean,coerce:e?.coerce||!1,...or(e)});var RE=class e extends hr{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==nt.date){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_type,expected:nt.date,received:i.parsedType}),Ot}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return He(i,{code:Be.invalid_date}),Ot}let n=new ea,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),He(s,{code:Be.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Tr.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:bt.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:bt.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};RE.create=e=>new RE({checks:[],coerce:e?.coerce||!1,typeName:qt.ZodDate,...or(e)});var HI=class extends hr{_parse(t){if(this._getType(t)!==nt.symbol){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.symbol,received:n.parsedType}),Ot}return Na(t.data)}};HI.create=e=>new HI({typeName:qt.ZodSymbol,...or(e)});var kE=class extends hr{_parse(t){if(this._getType(t)!==nt.undefined){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.undefined,received:n.parsedType}),Ot}return Na(t.data)}};kE.create=e=>new kE({typeName:qt.ZodUndefined,...or(e)});var TE=class extends hr{_parse(t){if(this._getType(t)!==nt.null){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.null,received:n.parsedType}),Ot}return Na(t.data)}};TE.create=e=>new TE({typeName:qt.ZodNull,...or(e)});var zy=class extends hr{constructor(){super(...arguments),this._any=!0}_parse(t){return Na(t.data)}};zy.create=e=>new zy({typeName:qt.ZodAny,...or(e)});var vm=class extends hr{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Na(t.data)}};vm.create=e=>new vm({typeName:qt.ZodUnknown,...or(e)});var ep=class extends hr{_parse(t){let r=this._getOrReturnCtx(t);return He(r,{code:Be.invalid_type,expected:nt.never,received:r.parsedType}),Ot}};ep.create=e=>new ep({typeName:qt.ZodNever,...or(e)});var VI=class extends hr{_parse(t){if(this._getType(t)!==nt.undefined){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.void,received:n.parsedType}),Ot}return Na(t.data)}};VI.create=e=>new VI({typeName:qt.ZodVoid,...or(e)});var Sm=class e extends hr{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==nt.array)return He(r,{code:Be.invalid_type,expected:nt.array,received:r.parsedType}),Ot;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(He(r,{code:o?Be.too_big:Be.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(He(r,{code:Be.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(He(r,{code:Be.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new ql(r,o,r.path,a)))).then(o=>ea.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new ql(r,o,r.path,a)));return ea.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:bt.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:bt.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:bt.toString(r)}})}nonempty(t){return this.min(1,t)}};Sm.create=(e,t)=>new Sm({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qt.ZodArray,...or(t)});function GI(e){if(e instanceof Kc){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=jl.create(GI(n))}return new Kc({...e._def,shape:()=>t})}else return e instanceof Sm?new Sm({...e._def,type:GI(e.element)}):e instanceof jl?jl.create(GI(e.unwrap())):e instanceof mf?mf.create(GI(e.unwrap())):e instanceof hf?hf.create(e.items.map(t=>GI(t))):e}var Kc=class e extends hr{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(),r=Tr.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==nt.object){let u=this._getOrReturnCtx(t);return He(u,{code:Be.invalid_type,expected:nt.object,received:u.parsedType}),Ot}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof ep&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new ql(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof ep){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(He(s,{code:Be.unrecognized_keys,keys:a}),n.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 d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new ql(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>ea.mergeObjectSync(n,u)):ea.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return bt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:bt.errToObj(t).message??s}:{message:s}}}:{}})}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:qt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of Tr.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of Tr.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return GI(this)}partial(t){let r={};for(let n of Tr.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of Tr.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof jl;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return bLe(Tr.objectKeys(this.shape))}};Kc.create=(e,t)=>new Kc({shape:()=>e,unknownKeys:"strip",catchall:ep.create(),typeName:qt.ZodObject,...or(t)});Kc.strictCreate=(e,t)=>new Kc({shape:()=>e,unknownKeys:"strict",catchall:ep.create(),typeName:qt.ZodObject,...or(t)});Kc.lazycreate=(e,t)=>new Kc({shape:e,unknownKeys:"strip",catchall:ep.create(),typeName:qt.ZodObject,...or(t)});var _E=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(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 r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Yc(a.ctx.common.issues));return He(r,{code:Be.invalid_union,unionErrors:o}),Ot}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.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 r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Yc(c));return He(r,{code:Be.invalid_union,unionErrors:a}),Ot}}get options(){return this._def.options}};_E.create=(e,t)=>new _E({options:e,typeName:qt.ZodUnion,...or(t)});var Em=e=>e instanceof PE?Em(e.schema):e instanceof zl?Em(e.innerType()):e instanceof BE?[e.value]:e instanceof $E?e.options:e instanceof OE?Tr.objectValues(e.enum):e instanceof DE?Em(e._def.innerType):e instanceof kE?[void 0]:e instanceof TE?[null]:e instanceof jl?[void 0,...Em(e.unwrap())]:e instanceof mf?[null,...Em(e.unwrap())]:e instanceof zP||e instanceof FE?Em(e.unwrap()):e instanceof ME?Em(e._def.innerType):[],yj=class e extends hr{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.object)return He(r,{code:Be.invalid_type,expected:nt.object,received:r.parsedType}),Ot;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(He(r,{code:Be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ot)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=Em(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(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:qt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...or(n)})}};function mee(e,t){let r=ff(e),n=ff(t);if(e===t)return{valid:!0,data:e};if(r===nt.object&&n===nt.object){let s=Tr.objectKeys(t),i=Tr.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=mee(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===nt.array&&n===nt.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=mee(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===nt.date&&n===nt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var NE=class extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(mj(i)||mj(o))return Ot;let a=mee(i.value,o.value);return a.valid?((gj(i)||gj(o))&&r.dirty(),{status:r.value,value:a.data}):(He(n,{code:Be.invalid_intersection_types}),Ot)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};NE.create=(e,t,r)=>new NE({left:e,right:t,typeName:qt.ZodIntersection,...or(r)});var hf=class e extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.array)return He(n,{code:Be.invalid_type,expected:nt.array,received:n.parsedType}),Ot;if(n.data.length<this._def.items.length)return He(n,{code:Be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ot;!this._def.rest&&n.data.length>this._def.items.length&&(He(n,{code:Be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ql(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>ea.mergeArray(r,o)):ea.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};hf.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hf({items:e,typeName:qt.ZodTuple,rest:null,...or(t)})};var Aj=class e extends hr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.object)return He(n,{code:Be.invalid_type,expected:nt.object,received:n.parsedType}),Ot;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new ql(n,a,n.path,a)),value:o._parse(new ql(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ea.mergeObjectAsync(r,s):ea.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof hr?new e({keyType:t,valueType:r,typeName:qt.ZodRecord,...or(n)}):new e({keyType:qy.create(),valueType:t,typeName:qt.ZodRecord,...or(r)})}},WI=class extends hr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.map)return He(n,{code:Be.invalid_type,expected:nt.map,received:n.parsedType}),Ot;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new ql(n,a,n.path,[u,"key"])),value:i._parse(new ql(n,c,n.path,[u,"value"]))}));if(n.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 Ot;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.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 Ot;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};WI.create=(e,t,r)=>new WI({valueType:t,keyType:e,typeName:qt.ZodMap,...or(r)});var JI=class e extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==nt.set)return He(n,{code:Be.invalid_type,expected:nt.set,received:n.parsedType}),Ot;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(He(n,{code:Be.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(He(n,{code:Be.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Ot;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new ql(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:bt.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:bt.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};JI.create=(e,t)=>new JI({valueType:e,minSize:null,maxSize:null,typeName:qt.ZodSet,...or(t)});var bj=class e extends hr{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.function)return He(r,{code:Be.invalid_type,expected:nt.function,received:r.parsedType}),Ot;function n(a,c){return qP({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qI(),wm].filter(u=>!!u),issueData:{code:Be.invalid_arguments,argumentsError:c}})}function s(a,c){return qP({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,qI(),wm].filter(u=>!!u),issueData:{code:Be.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Gy){let a=this;return Na(async function(...c){let u=new Yc([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return Na(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Yc([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Yc([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:hf.create(t).rest(vm.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,r,n){return new e({args:t||hf.create([]).rest(vm.create()),returns:r||vm.create(),typeName:qt.ZodFunction,...or(n)})}},PE=class extends hr{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};PE.create=(e,t)=>new PE({getter:e,typeName:qt.ZodLazy,...or(t)});var BE=class extends hr{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return He(r,{received:r.data,code:Be.invalid_literal,expected:this._def.value}),Ot}return{status:"valid",value:t.data}}get value(){return this._def.value}};BE.create=(e,t)=>new BE({value:e,typeName:qt.ZodLiteral,...or(t)});function bLe(e,t){return new $E({values:e,typeName:qt.ZodEnum,...or(t)})}var $E=class e extends hr{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return He(r,{expected:Tr.joinValues(n),received:r.parsedType,code:Be.invalid_type}),Ot}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return He(r,{received:r.data,code:Be.invalid_enum_value,options:n}),Ot}return Na(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};$E.create=bLe;var OE=class extends hr{_parse(t){let r=Tr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==nt.string&&n.parsedType!==nt.number){let s=Tr.objectValues(r);return He(n,{expected:Tr.joinValues(s),received:n.parsedType,code:Be.invalid_type}),Ot}if(this._cache||(this._cache=new Set(Tr.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=Tr.objectValues(r);return He(n,{received:n.data,code:Be.invalid_enum_value,options:s}),Ot}return Na(t.data)}get enum(){return this._def.values}};OE.create=(e,t)=>new OE({values:e,typeName:qt.ZodNativeEnum,...or(t)});var Gy=class extends hr{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.promise&&r.common.async===!1)return He(r,{code:Be.invalid_type,expected:nt.promise,received:r.parsedType}),Ot;let n=r.parsedType===nt.promise?r.data:Promise.resolve(r.data);return Na(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Gy.create=(e,t)=>new Gy({type:e,typeName:qt.ZodPromise,...or(t)});var zl=class extends hr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{He(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Ot;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Ot:c.status==="dirty"?SE(c.value):r.value==="dirty"?SE(c.value):c});{if(r.value==="aborted")return Ot;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Ot:a.status==="dirty"?SE(a.value):r.value==="dirty"?SE(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.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(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ot:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ot:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!jy(o))return Ot;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>jy(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):Ot);Tr.assertNever(s)}};zl.create=(e,t,r)=>new zl({schema:e,typeName:qt.ZodEffects,effect:t,...or(r)});zl.createWithPreprocess=(e,t,r)=>new zl({schema:t,effect:{type:"preprocess",transform:e},typeName:qt.ZodEffects,...or(r)});var jl=class extends hr{_parse(t){return this._getType(t)===nt.undefined?Na(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};jl.create=(e,t)=>new jl({innerType:e,typeName:qt.ZodOptional,...or(t)});var mf=class extends hr{_parse(t){return this._getType(t)===nt.null?Na(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};mf.create=(e,t)=>new mf({innerType:e,typeName:qt.ZodNullable,...or(t)});var DE=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===nt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};DE.create=(e,t)=>new DE({innerType:e,typeName:qt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...or(t)});var ME=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return zI(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yc(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ME.create=(e,t)=>new ME({innerType:e,typeName:qt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...or(t)});var YI=class extends hr{_parse(t){if(this._getType(t)!==nt.nan){let n=this._getOrReturnCtx(t);return He(n,{code:Be.invalid_type,expected:nt.nan,received:n.parsedType}),Ot}return{status:"valid",value:t.data}}};YI.create=e=>new YI({typeName:qt.ZodNaN,...or(e)});var O4t=Symbol("zod_brand"),zP=class extends hr{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},GP=class e extends hr{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ot:i.status==="dirty"?(r.dirty(),SE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ot:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:qt.ZodPipeline})}},FE=class extends hr{_parse(t){let r=this._def.innerType._parse(t),n=s=>(jy(s)&&(s.value=Object.freeze(s.value)),s);return zI(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};FE.create=(e,t)=>new FE({innerType:e,typeName:qt.ZodReadonly,...or(t)});function mLe(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function wLe(e,t={},r){return e?zy.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=mLe(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=mLe(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):zy.create()}var D4t={object:Kc.lazycreate},qt;(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"})(qt||(qt={}));var M4t=(e,t={message:`Input not instance of ${e.name}`})=>wLe(r=>r instanceof e,t),ELe=qy.create,vLe=xE.create,F4t=YI.create,Q4t=CE.create,SLe=IE.create,L4t=RE.create,U4t=HI.create,j4t=kE.create,q4t=TE.create,z4t=zy.create,G4t=vm.create,H4t=ep.create,V4t=VI.create,W4t=Sm.create,J4t=Kc.create,Y4t=Kc.strictCreate,K4t=_E.create,Z4t=yj.create,X4t=NE.create,eJt=hf.create,tJt=Aj.create,rJt=WI.create,nJt=JI.create,sJt=bj.create,iJt=PE.create,oJt=BE.create,aJt=$E.create,cJt=OE.create,uJt=Gy.create,lJt=zl.create,dJt=jl.create,pJt=mf.create,fJt=zl.createWithPreprocess,hJt=GP.create,mJt=()=>ELe().optional(),gJt=()=>vLe().optional(),yJt=()=>SLe().optional(),AJt={string:(e=>qy.create({...e,coerce:!0})),number:(e=>xE.create({...e,coerce:!0})),boolean:(e=>IE.create({...e,coerce:!0})),bigint:(e=>CE.create({...e,coerce:!0})),date:(e=>RE.create({...e,coerce:!0}))};var bJt=Ot;var xLe=["playwright","pytest","robot","junit","vitest","jest","mocha","go","rspec","jasmine"];var CLe="skyramp_session_storage.json";var gee;(function(e){e.PYTHON="python",e.TYPESCRIPT="typescript",e.JAVASCRIPT="javascript",e.JAVA="java"})(gee||(gee={}));var gf;(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"})(gf||(gf={}));var vZr=[gf.CONTRACT,gf.INTEGRATION,gf.E2E,gf.UI];var ILe;(function(e){e.Rest="rest",e.Grpc="grpc",e.Kafka="kafka"})(ILe||(ILe={}));var wj;(function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.HEAD="HEAD",e.OPTIONS="OPTIONS"})(wj||(wj={}));var HP;(function(e){e.LOCAL="local",e.DOCKER="docker",e.KUBERNETES="k8s"})(HP||(HP={}));var wJt=Pt.nativeEnum(HP),EJt=Pt.preprocess(e=>e==="kubernetes"?HP.KUBERNETES:e,wJt);var vJt=Pt.object({language:Pt.nativeEnum(gee).describe("Programming language for the generated test (default: python). Must be one of: python, typescript, javascript, java"),framework:Pt.string().describe(`Testing framework to use. Supported: ${xLe.join(", ")} (e.g. pytest for python, playwright/vitest/jest for js/ts, junit for java).`)}),RLe=Pt.object({...vJt.shape,deployDashboard:Pt.boolean().default(!1).describe("Whether to deploy the Skyramp dashboard for test monitoring"),runtime:EJt.default(HP.LOCAL).describe("Runtime environment (local, docker, or k8s; accepts kubernetes as an alias)"),dockerNetwork:Pt.string().default("").describe("Docker network name to use for containerized testing"),dockerWorkerPort:Pt.number().int().min(0).max(65535).default(0).describe("Port number for the Docker worker service"),k8sNamespace:Pt.string().default("").describe("Kubernetes namespace for deployment"),k8sConfig:Pt.string().default("").describe("Path to Kubernetes configuration file"),k8sContext:Pt.string().default("").describe("Kubernetes context to use"),authHeader:Pt.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:Pt.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:Pt.boolean().default(!1).describe("Whether to allow insecure SSL connections for HTTPS endpoints"),output:Pt.string().optional().refine(e=>!e||e===""?!0:[".py",".ts",".js",".java"].some(r=>e.endsWith(r)),{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:Pt.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:Pt.boolean().default(!0).describe("Whether to overwrite existing files in the output directory"),mockPort:Pt.number().int().min(0).max(65535).default(0).describe("Port number for the mock server"),optionalFields:Pt.boolean().default(!1).describe("Whether to include optional fields in the generated test/mock"),prompt:Pt.string().describe("The prompt user provided to generate the test")}),SZr=Pt.object({playwrightInput:Pt.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:Pt.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:Pt.string().optional().describe(`Path to SAVE Playwright session storage after trace collection. Omit this argument to use the default \u2014 \`${CLe}\` resolved against the active outputDir, which produces an absolute path like '/abs/outputDir/${CLe}'. 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:Pt.union([Pt.enum(["","hd","full-hd","2k"]),Pt.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:Pt.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:Pt.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.")}),xZr=Pt.object({trace:Pt.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:Pt.array(Pt.string()).default([]).describe("List of endpoints or patterns to include in test generation."),exclude:Pt.array(Pt.string()).default([]).describe("List of endpoints or patterns to exclude from test generation."),...RLe.shape}),CZr={endpointURL:Pt.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:Pt.union([Pt.nativeEnum(wj),Pt.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:Pt.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:Pt.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:Pt.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:Pt.string().default("").describe("MUST be string of comma separated values like 'id=1,name=John' for form data parameters"),requestData:Pt.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:Pt.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"),...RLe.shape},IZr=Pt.object({codeReuse:Pt.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:Pt.boolean().default(!1).describe("Whether to modularize the code")}),RZr=[gf.INTEGRATION,gf.CONTRACT,gf.UI];var Ej;(function(e){e.Bug="bug",e.Lint="lint",e.Type="type",e.Config="config"})(Ej||(Ej={}));var vj;(function(e){e.NotMapped="not-mapped",e.DemotedByVerify="demoted-by-verify"})(vj||(vj={}));var Sj;(function(e){e.Passed="passed",e.Failed="failed",e.SkippedNoPom="skipped-no-pom"})(Sj||(Sj={}));var yee;(function(e){e.Passed="passed",e.Failed="failed",e.NoUtilsFile="no-utils-file"})(yee||(yee={}));wr();var xj=e=>`${e} POM call${e===1?"":"s"}`,kLe=(e,t)=>e===1?`1 ${t} test`:`${e} ${t} tests`,je={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=>`${xj(e)} reused and verified`,reusedThenVerified:(e,t)=>`${xj(e)} reused, ${t} of them verified`,reused:e=>`${xj(e)} reused`,verified:e=>`${xj(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 r=t?` Latest run: ${t}`:"";return`No final result was recorded for written cases: ${e}.${r}`},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}`,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}`,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,r)=>`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 \`${r}\` 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.",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.",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.`,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.`},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,r,n)=>`${e} (${t}) in the Test Environment runs ${r}, which does not contain ${n}, the commit this run validates.`,componentUnverified:(e,t,r,n)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${n}, the commit this run validates: it reports ${r}.`,componentUnread:(e,t,r)=>`Testbot could not confirm that ${e} (${t}) in the Test Environment runs ${r}, 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,r)=>`**${e}**: ${t} unit test${t===1?"":"s"}${r?` for ${r}`:""}`,addedToExistingFile:"added to an existing test file",testPackagesHeader:"### \u{1F4E6} Running these tests",testPackageLine:(e,t,r="")=>`\`${e}/\` is a self-contained test package Skyramp Testbot owns and maintains, with its own manifest, lockfile and runner config.${r?` This run added it, with ${r}, 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,r)=>`Added \`${e}\` to \`${t}\` (and its lockfile)${r?`: ${r}`:""}`,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,r)=>`${e}/${t} passed${r?`, ${r} skipped`:""}`,behaviourCoverageHeader:"\u{1F517} Behaviour Coverage",coverageCaption:(e,t,r,n)=>` (${e} generated \xB7 ${t} modified \xB7 ${r} verified \xB7 ${n} 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)=>`${kLe(e,"new")} and ${kLe(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,r)=>`Test results: ${e} passed, ${t} failed, ${r} 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,r)=>`_\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.${r?` [Full report](${r})`:""}_`,testsReplaced:(e,t,r)=>[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}).`,r?`The tests of [the earlier run](${r}) 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,r)=>`Testbot PR${e?` (${e})`:""} : [${t}](${r})`,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,r)=>`${e}: ${t} ${t===1?"test":"tests"} written, ${r} 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,r,n)=>`${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: ${r}. Their changes are in the run artifact's ${n}.`,testsNotProposed:e=>`The tests were not proposed in a pull request: ${e}.`}};var TLe={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 r=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${r}`},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}`,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}`,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,r)=>`${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 \`${r}\` \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",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",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`,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`},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,r,n)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u306F ${r} \u3092\u5B9F\u884C\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${n} \u3092\u542B\u3093\u3067\u3044\u307E\u305B\u3093\u3002`,componentUnverified:(e,t,r,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\u5831\u544A\u3055\u308C\u305F\u30B3\u30DF\u30C3\u30C8: ${r}\u3002`,componentUnread:(e,t,r)=>`Test Environment \u306E ${e}\uFF08${t}\uFF09\u304C\u3001\u3053\u306E\u5B9F\u884C\u304C\u691C\u8A3C\u3059\u308B\u30B3\u30DF\u30C3\u30C8 ${r} \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,r)=>`**${e}**: ${r?`${r} \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,r="")=>`\`${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${r?`\u3053\u306E\u5B9F\u884C\u3067\u8FFD\u52A0\u3057\u305F\u3082\u306E\u3067\u3001${r} \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,r)=>`\`${t}\`\uFF08\u304A\u3088\u3073\u305D\u306E\u30ED\u30C3\u30AF\u30D5\u30A1\u30A4\u30EB\uFF09\u306B \`${e}\` \u3092\u8FFD\u52A0${r?`: ${r}`:""}`,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,r)=>`${t} \u4EF6\u4E2D ${e} \u4EF6\u5408\u683C${r?`\u3001${r} \u4EF6\u30B9\u30AD\u30C3\u30D7`:""}`,behaviourCoverageHeader:"\u{1F517} \u632F\u308B\u821E\u3044\u306E\u30AB\u30D0\u30EC\u30C3\u30B8",coverageCaption:(e,t,r,n)=>`\uFF08\u751F\u6210 ${e} \xB7 \u5909\u66F4 ${t} \xB7 \u691C\u8A3C ${r} \xB7 \u5B9F\u884C ${n}\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,r)=>`\u30C6\u30B9\u30C8\u7D50\u679C: \u5408\u683C ${e} \u4EF6\u3001\u4E0D\u5408\u683C ${t} \u4EF6\u3001\u672A\u5B9F\u884C ${r} \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,r)=>`_\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${r?` [\u5B8C\u5168\u306A\u30EC\u30DD\u30FC\u30C8](${r})`:""}_`,testsReplaced:(e,t,r)=>[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`,r?`[\u4EE5\u524D\u306E\u5B9F\u884C](${r})\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,r)=>`Testbot PR${e?`\uFF08${e}\uFF09`:""}: [${t}](${r})`,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,r)=>`${e}: ${t} \u4EF6\u306E\u30C6\u30B9\u30C8\u3092\u4F5C\u6210\u3057\u3001${r} \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,r,n)=>`${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: ${r}\u3002\u5909\u66F4\u5185\u5BB9\u306F\u5B9F\u884C\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306E ${n} \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 KI=(r=>(r.En="en",r.Ja="ja",r))(KI||{}),SJt={en:je,ja:TLe},Aee="en";function Cj(e){let t=e.trim().toLowerCase();if(t==="")return"en";let r=Object.values(KI);return r.includes(t)?t:($e(`Invalid language '${e}'. Supported: ${r.join(", ")}. Falling back to 'en'.`),"en")}function bee(e){Aee=e}function QE(){return Aee}function yf(e,t){return(Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0)??t}function Re(){return SJt[Aee]}var Ij=(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))(Ij||{});(t=>{function e(r,n){switch(r){case"provider_outage":return{headline:Re().providerOutageHeadline(n.provider.name,n.maxRetries),action:Re().providerOutageActionStatusPage(n.provider.statusUrl)};case"provider_rate_limit":return{headline:Re().providerRateLimitHeadline(n.provider.name),action:Re().providerRateLimitAction};case"provider_usage_limit":return{headline:Re().providerUsageLimitHeadline(n.provider.name),action:Re().providerUsageLimitAction};case"provider_auth_expired":return{headline:Re().providerAuthExpiredHeadline(n.provider.name),action:Re().providerAuthExpiredAction};case"timeout":return{headline:Re().providerTimeoutHeadline(n.timeoutMinutes),action:Re().providerTimeoutAction};case"no_report":case"render_failure":return}}t.buildNotice=e})(Ij||={});var wee=(r=>(r.SameBranch="same-branch",r.SeparateBranch="separate-branch",r))(wee||{}),VP=class{supportsNdjsonLog=!1;reusesPreinstalledCli=!0;setupAgentEnv(t,r){let n=t[this.apiKeyField];n&&Ty(this.envVar,n)}};wVe();var EVe=e=>Bne({...e});var $ne=(r=>(r.Sonnet="sonnet",r.Opus="opus",r))($ne||{}),SYt="opus",xYt={sonnet:"anthropic.claude-sonnet-5[1m]",opus:"anthropic.claude-opus-5-5[1m]"};function FB(e){return Object.values($ne).includes(e)}function vVe(e){let t=(e??"").trim();if(t==="")return SYt;let r=t.toLowerCase();return FB(r)?r:t}function CYt(e){let t=(e??"").trim().toLowerCase();return t.startsWith("us-gov-")?"us-gov":t.startsWith("eu-")?"eu":t.startsWith("ap-")?"apac":"us"}function One(e,t){return`${CYt(t)}.${xYt[e]}`}function SVe(e){return e||process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||""}async function xVe(e){return EVe({roleArn:e.roleArn,webIdentityToken:e.webIdentityToken,roleSessionName:e.roleSessionName,durationSeconds:e.durationSeconds,clientConfig:{region:e.region}})()}var IYt=28800;async function CVe(e){let t=e.env??process.env;if(!e.roleArn.trim())throw new Error("useBedrock on Azure Pipelines needs the awsRoleArn input: the role Testbot assumes with the job's OIDC token");if(!e.region.trim())throw new Error("useBedrock needs the awsRegion input");let r=await(e.assumeRole??xVe)({roleArn:e.roleArn.trim(),webIdentityToken:await e.token("sts.amazonaws.com"),roleSessionName:`testbot-${e.runId}`.replace(/[^A-Za-z0-9=,.@_-]/g,"").slice(0,64),region:e.region.trim(),durationSeconds:IYt});if(!r.accessKeyId||!r.secretAccessKey||!r.sessionToken)throw new Error("assume-role returned an incomplete credential triple");e.setSecret(r.accessKeyId),e.setSecret(r.secretAccessKey),e.setSecret(r.sessionToken),t.AWS_ACCESS_KEY_ID=r.accessKeyId,t.AWS_SECRET_ACCESS_KEY=r.secretAccessKey,t.AWS_SESSION_TOKEN=r.sessionToken}var MB=3600,RYt=43200,kYt=15;function TYt(e){let t=Math.ceil((e+kYt)*60);return Math.min(RYt,Math.max(MB,t))}function _Yt(e){return e instanceof Error?e.name==="ValidationError"&&/MaxSessionDuration|DurationSeconds/i.test(e.message):!1}async function IVe(e){let t=e.env??process.env,r=t.AWS_ROLE_ARN?.trim(),n=t.AWS_REGION?.trim()||t.AWS_DEFAULT_REGION?.trim();if(t.SKYRAMP_REFRESH_BEDROCK_SESSION!=="1"||t.CLAUDE_CODE_USE_BEDROCK!=="1")return!1;let s=e.identity;if(!r||!s||!n)return e.debug("Bedrock session refresh skipped: needs AWS_ROLE_ARN, AWS_REGION (or AWS_DEFAULT_REGION) and a web identity from the job"),!1;try{let i=await s.token("sts.amazonaws.com");if(!i)throw new Error("OIDC response carried no token value");let o=`testbot-agent-${s.runId??"local"}`.replace(/[^A-Za-z0-9=,.@_-]/g,"").slice(0,64),a=e.assumeRole??xVe,c={roleArn:r,webIdentityToken:i,roleSessionName:o,region:n},u=TYt(e.timeoutMinutes),l,d=MB;try{l=await a({...c,durationSeconds:u}),d=u}catch(p){if(u<=MB||!_Yt(p))throw p;e.warning(`The Bedrock role rejected a ${u}s session (its MaxSessionDuration is lower). Minting a ${MB}s session instead, which is shorter than the ${e.timeoutMinutes}m testbotTimeout; raise MaxSessionDuration on ${r} to at least ${u}s or the agent can lose its credentials mid-run.`),l=await a({...c,durationSeconds:MB})}if(!l.accessKeyId||!l.secretAccessKey||!l.sessionToken)throw new Error("assume-role returned an incomplete credential triple");return e.setSecret(l.accessKeyId),e.setSecret(l.secretAccessKey),e.setSecret(l.sessionToken),t.AWS_ACCESS_KEY_ID=l.accessKeyId,t.AWS_SECRET_ACCESS_KEY=l.secretAccessKey,t.AWS_SESSION_TOKEN=l.sessionToken,e.debug(`Minted a fresh Bedrock session for this agent attempt (${d}s)`),e.onMinted?.(l.expiration?.getTime()??Date.now()+d*1e3),!0}catch(i){return e.warning(`Could not refresh the Bedrock session; continuing with existing credentials: ${i instanceof Error?i.message:String(i)}`),!1}}var sz=(i=>(i.Low="low",i.Medium="medium",i.High="high",i.XHigh="xhigh",i.Max="max",i))(sz||{}),vR="high",RVe="medium";function kVe(e){return Object.values(sz).includes(e)}var TVe=5;function NYt(e){let t=e.split(/\r?\n/).map(r=>r.trim()).filter(Boolean);if(t.length>TVe)throw new Error(`relatedRepoPaths supports at most ${TVe} entries (got ${t.length}); the cap limits how much cross-repo context is loaded to avoid overflowing Testbot's context window.`);return t}function PYt(e){let t=e.trim().toLowerCase();return t===""?"separate-branch":Object.values(wee).includes(t)?t:($e(`Invalid generatedTestsMode '${e}'. Falling back to 'separate-branch'.`),"separate-branch")}function BYt(e){let t=(e??"").trim();if(t!==""){if(/^(?:[1-9]|10)$/.test(t))return Number(t);$e(`Ignoring perTestMaxFixAttempts="${e}": expected a whole number from 1 to 10; the Skyramp MCP default applies`)}}function $Yt(e){let t=(e??"").trim().toLowerCase();return t===""?vR:kVe(t)?t:($e(`Ignoring effort="${e}": expected one of ${Object.values(sz).join(", ")}; using "${vR}"`),vR)}function _Ve(){let e=vVe(st("model"));return FB(e)||$e(`model '${e}' is not a tested alias (sonnet, opus); passing it to the agent verbatim as a raw model id.`),{skyrampLicenseFile:st("skyrampLicenseFile"),cursorApiKey:st("cursorApiKey"),copilotApiKey:st("copilotApiKey"),anthropicApiKey:st("anthropicApiKey"),useBedrock:_y("useBedrock"),awsRegion:st("awsRegion"),useLocalAuth:st("useLocalAuth").toLowerCase()==="true",model:e,effort:$Yt(st("effort")),targetSetupCommand:st("targetSetupCommand"),authTokenCommand:st("authTokenCommand"),uiCredentials:st("uiCredentials"),targetTeardownCommand:st("targetTeardownCommand"),skipTargetTeardown:_y("skipTargetTeardown"),skyrampMcpVersion:st("skyrampMcpVersion"),skyrampMcpSource:st("skyrampMcpSource"),skyrampMcpGithubToken:st("skyrampMcpGithubToken"),skyrampMcpGithubRef:st("skyrampMcpGithubRef"),nodeVersion:st("nodeVersion"),skipTargetSetup:_y("skipTargetSetup"),targetReadyCheckCommand:st("targetReadyCheckCommand"),targetReadyCheckTimeout:(()=>{let r=parseInt(st("targetReadyCheckTimeout"),10)||1800;return r<1?($e(`targetReadyCheckTimeout must be at least 1 second, got ${r}. Using 1s.`),1):r})(),targetReadyCheckInterval:(()=>{let r=parseInt(st("targetReadyCheckInterval"),10),n=isNaN(r)?30:r;return n<1?($e(`targetReadyCheckInterval must be at least 1 second, got ${n}. Using 1s.`),1):n})(),targetReadyCheckDiagnosticsCommand:(()=>{let r=st("targetReadyCheckDiagnosticsCommand");return r.trim().toLowerCase()==="none"?"":r})(),workingDirectory:st("workingDirectory"),autoCommit:_y("autoCommit"),commitMessage:st("commitMessage"),generatedTestsMode:PYt(st("generatedTestsMode")),postPrComment:_y("postPrComment"),testExecutionTimeout:parseInt(st("testExecutionTimeout"),10)||300,maxRecommendations:(()=>{let r=parseInt(st("maxRecommendations"),10);return isNaN(r)?void 0:Math.max(0,r)})(),maxGenerate:(()=>{let r=parseInt(st("maxGenerate"),10);return isNaN(r)?void 0:Math.max(0,r)})(),perTestMaxFixAttempts:BYt(st("perTestMaxFixAttempts")),testbotMaxRetries:parseInt(st("testbotMaxRetries"),10)||3,testbotRetryDelay:parseInt(st("testbotRetryDelay"),10)||10,testbotTimeout:parseInt(st("testbotTimeout"),10)||60,targetSetupRetries:parseInt(st("targetSetupRetries"),10)||3,targetSetupRetryDelay:parseInt(st("targetSetupRetryDelay"),10)||10,authTokenRetries:(()=>{let r=parseInt(st("authTokenRetries"),10);return Number.isFinite(r)&&r>=1?r:6})(),authTokenRetryDelay:(()=>{let r=parseInt(st("authTokenRetryDelay"),10);return Number.isFinite(r)&&r>=0?r:10})(),reportCollapsed:_y("reportCollapsed"),language:Cj(st("language")),enableDebug:_y("enableDebug"),testRepoPath:st("testRepoPath")||void 0,relatedRepoPaths:NYt(st("relatedRepoPaths")),allowedAuthors:st("allowedAuthors").split(/\r?\n/).map(r=>r.trim()).filter(Boolean)}}wr();D7();var BVe=H(require("child_process")),Dne=class extends Error{constructor(t){super(t),this.name="ExecTimeoutError"}},iz=class extends Error{constructor(t){super(t),this.name="ExecAbortedError"}};function NVe(e,t){if(!(!e||e.destroyed||e.writableEnded))try{e.write(t)}catch(r){$e(`stream write failed: ${r instanceof Error?r.message:String(r)}`)}}async function Xi(e,t=[],r={}){let n="",s="",i={cwd:r.cwd,silent:r.silent??!1,ignoreReturnCode:r.ignoreReturnCode??!1,env:r.env?{...process.env,...r.env}:void 0,input:r.input,listeners:{stdout:a=>{n+=a.toString(),NVe(r.stdoutStream,a)},stderr:a=>{s+=a.toString()}}};if(r.timeout||r.signal){let a=r.signal;return a?.aborted?Promise.reject(new iz(`Command aborted before start: ${e}`)):new Promise((c,u)=>{let l=BVe.spawn(e,t,{cwd:r.cwd,env:r.env?{...process.env,...r.env}:process.env,stdio:["pipe","pipe","pipe"],shell:!1});l.stdout?.on("data",g=>{n+=g.toString(),r.silent||process.stdout.write(g),NVe(r.stdoutStream,g)}),l.stderr?.on("data",g=>{s+=g.toString(),r.silent||process.stderr.write(g)}),r.input&&l.stdin?.end(r.input);let d=()=>{h&&clearTimeout(h),a?.removeEventListener("abort",f)},p=g=>{d();try{l.kill("SIGTERM")}catch{}u(g)},f=()=>p(new iz(`Command aborted: ${e}`)),h=r.timeout?setTimeout(()=>p(new Dne(`Command timed out after ${Math.round(r.timeout/6e4)}m: ${e}`)),r.timeout):void 0;a?.addEventListener("abort",f,{once:!0}),l.on("close",g=>{d();let y=g??1;y!==0&&!r.ignoreReturnCode?u(new Error(`The process '${e}' failed with exit code ${y}`)):c({exitCode:y,stdout:n,stderr:s})}),l.on("error",g=>{d(),u(g)})})}return{exitCode:await vQe(e,t,i),stdout:n,stderr:s}}function OYt(e){return new Promise(t=>setTimeout(t,e*1e3))}async function hv(e,t){for(let r=1;r<=t.retries;r++)try{return await e()}catch(n){if(r<t.retries)$e(`${t.label} failed, retrying (${r}/${t.retries})...`),await OYt(t.delay);else throw n}throw new Error("unreachable")}async function QB(e,t){EI(e);try{return await t()}finally{vI()}}var DYt=1e3;function mv(e){return e*DYt}function LB(e){let t=e.split("/");return t.length===2&&t[0]&&t[1]?{owner:t[0],repo:t[1]}:null}var PVe=/^[A-Za-z_][A-Za-z0-9_.-]*$/;function $Ve(e){if(e.startsWith("{"))try{let o=JSON.parse(e);return{username:typeof o.username=="string"?o.username:void 0,password:typeof o.password=="string"?o.password:void 0,role:typeof o.role=="string"?o.role:void 0}}catch{return{}}let t=e.indexOf(":"),n=!(t>=0&&!/[=;]/.test(e.slice(0,t)))&&/(^|;)\s*role\s*=/.test(e);if(/(^|;)\s*(username|password)\s*=/.test(e)||n){let o=new Map;for(let a of e.split(";")){let c=a.indexOf("=");c>0&&PVe.test(a.slice(0,c).trim())&&o.set(a.slice(0,c).trim(),a.slice(c+1).trim())}return{username:o.get("username"),password:o.get("password"),role:o.get("role")}}if(e==="")return{};if(!e.includes(":"))for(let o of e.split(";")){let a=o.indexOf("=");if(a>0&&PVe.test(o.slice(0,a).trim()))return{}}let[s,...i]=e.split(":");return{username:s,password:i.join(":")}}function MYt(e){let t=e.split(/\r?\n/).map(s=>s.trim()).find(s=>s!=="")??"",{username:r,password:n}=$Ve(t);return{username:r,password:n}}function SR(e){return e.toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")}function FYt(e){let t=e.split(/\r?\n/).map(n=>n.trim()).filter(n=>n!==""),r=new Set;return t.map((n,s)=>{let{username:i,password:o,role:a}=$Ve(n),c=s+1,u=a?SR(a):"";for(u||(u=String(c));r.has(u);)u=`${u}_${c}`;return r.add(u),{key:u,username:i,password:o}})}function QYt(e){let t=FYt(e);if(t.length<2)return[];let r=[];for(let{key:n,username:s,password:i}of t)s!==void 0&&r.push({envName:`SKYRAMP_UI_USERNAME_${n}`,value:s}),i!==void 0&&r.push({envName:`SKYRAMP_UI_PASSWORD_${n}`,value:i});return r}var oz="SKYRAMP_UI_USERNAME",xR="SKYRAMP_UI_PASSWORD";function az(e){let{username:t,password:r}=MYt(e);return[...t!==void 0?[{envName:oz,value:t}]:[],...r!==void 0?[{envName:xR,value:r}]:[],...QYt(e)]}var OVe=e=>e.replace(/[.[\]^$*+?(){}|\\]/g,"\\$&");async function Mne(e){try{let{stdout:t,exitCode:r}=await Xi("git",["remote","get-url","origin"],{cwd:e,silent:!0,ignoreReturnCode:!0});if(r!==0)return;let n=t.trim();if(!n)return;let i=n.replace(/\/+$/,"").replace(/\.git$/,"").match(/[/:]([^/:]+)\/([^/]+)$/);if(!i)return;let o=`${i[1]}/${i[2]}`;return LB(o)?o:void 0}catch{return}}wr();async function DVe(e){let t=e.targetSetupCommand,r=e.skyrampMcpVersion;r||(r="latest"),t||(t="docker compose up -d --build");let n={targetSetupCommand:t,authTokenCommand:e.authTokenCommand,targetTeardownCommand:e.targetTeardownCommand,skipTargetTeardown:e.skipTargetTeardown,skyrampMcpVersion:r,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};EI("Resolved configuration");for(let[s,i]of Object.entries(n))s==="authTokenCommand"?ke(` ${s}: [REDACTED]`):ke(` ${s}: ${i}`);return vI(),n}var LYt;function Fne(e){LYt=e}wr();var pc=H(require("fs")),_o=H(require("path"));var k4e=require("crypto"),Ez=H(wz()),ise=mv(180);async function T4e(e,t,r){return QB("Installing Skyramp MCP",async()=>{let n,s,i;if(e.skyrampMcpSource==="local"){let a=process.env.MCP_SERVER;if(!a)throw new Error("MCP_SERVER env var required when skyrampMcpSource is 'local'");n="node",s=a;let c=_o.resolve(_o.dirname(a),".."),u=_o.join(c,"node_modules");return ke(`Using local MCP server: ${a}`),Ty("SKYRAMP_MCP_INSTALL_PATH",c),{command:n,args:s,licensePath:"",nodeModulesDir:u}}let o=_o.join(r,"mcp");if(pc.mkdirSync(o,{recursive:!0}),e.skyrampMcpSource==="github"){if(!t.skyrampMcpGithubToken)throw new Error("skyrampMcpGithubToken is required when skyrampMcpSource is 'github'");ks(t.skyrampMcpGithubToken);let a=_o.join(o,"node_modules","@skyramp","mcp"),c=`https://x-access-token:${t.skyrampMcpGithubToken}@github.com/letsramp/mcp.git`,u=e.skyrampMcpGithubRef;try{await hv(async()=>{pc.rmSync(a,{recursive:!0,force:!0}),pc.mkdirSync(_o.dirname(a),{recursive:!0}),/^[0-9a-fA-F]{7,40}$/.test(u)?(ke(`Fetching @skyramp/mcp from github.com/letsramp/mcp at commit ${u}`),await Xi("git",["init",a]),await Xi("git",["-C",a,"remote","add","origin",c]),await Xi("git",["-C",a,"fetch","--depth","1","origin",u]),await Xi("git",["-C",a,"checkout","FETCH_HEAD"])):(ke(`Cloning @skyramp/mcp from github.com/letsramp/mcp (ref: ${u})`),await Xi("git",["clone","--depth","1","--branch",u,c,a]));let{stdout:d}=await Xi("git",["-C",a,"rev-parse","HEAD"],{silent:!0});lm(`@skyramp/mcp commit: ${d.trim()} (ref: ${u})`),pc.rmSync(_o.join(a,".git"),{recursive:!0,force:!0}),ke("Installing dependencies and building..."),await Xi("npm",["install","--include=dev"],{cwd:a,timeout:ise}),await Xi("npm",["run","build"],{cwd:a})},{retries:3,delay:10,label:"MCP install (github)"})}catch(l){throw pc.rmSync(a,{recursive:!0,force:!0}),l}n="node",s=_o.join(a,"build","index.js"),i=_o.join(a,"node_modules"),Fne(i),Ty("NODE_PATH",i),Ty("SKYRAMP_MCP_INSTALL_PATH",o)}else{let a=pc.mkdtempSync(_o.join(r,"mcp-npm-cache-"));try{await J9t(`@skyramp/mcp@${e.skyrampMcpVersion}`,o,_o.join(r,"mcp-tarball"),a)}finally{pc.rmSync(a,{recursive:!0,force:!0})}let c=_o.join(o,"node_modules","@skyramp","mcp");n="node",s=_o.join(c,"build","index.js"),i=_o.join(o,"node_modules"),Fne(i),Ty("NODE_PATH",i),Ty("SKYRAMP_MCP_INSTALL_PATH",o)}return lm(`Skyramp MCP installed successfully (source: ${e.skyrampMcpSource})`),{command:n,args:s,licensePath:"",nodeModulesDir:i}})}var W9t={retries:3,delay:10},R4e=mv(60);async function J9t(e,t,r,n){let s=(p,f,h)=>hv(async()=>(await Xi("npm",[...p,"--cache",n],{cwd:t,timeout:f})).stdout,{...W9t,label:h}),o=`@skyramp/mcp@${Y9t(await s(["view",e,"version","--json=true"],R4e,"MCP version lookup (npm)"),e)}`,a=(await s(["view",o,"dist.integrity","--json=false"],R4e,"MCP integrity lookup (npm)")).trim();if(!/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(a))throw new Error(`no sha512 dist.integrity for ${o}: "${a}"`);pc.rmSync(r,{recursive:!0,force:!0}),pc.mkdirSync(r,{recursive:!0});let c=await s(["pack",o,"--pack-destination",r,"--json=false","--loglevel=warn"],ise,"MCP download (npm)"),u=c.trim().split(/\r?\n/).pop()??"";if(!u.endsWith(".tgz"))throw new Error(`npm pack ${o} printed no tarball name: ${c}`);let l=_o.join(r,u);if(`sha512-${(0,k4e.createHash)("sha512").update(pc.readFileSync(l)).digest("base64")}`!==a)throw pc.rmSync(r,{recursive:!0,force:!0}),new Error(`The downloaded ${o} does not match the registry integrity ${a}`);ke(`Verified ${o} against registry integrity ${a}`),await s(["install",l],ise,"MCP install (npm)")}function Y9t(e,t){let r=e.trim(),n;try{n=r?JSON.parse(r):[]}catch{n=[]}let s=(Array.isArray(n)?n:[n]).filter(i=>typeof i=="string"&&Ez.valid(i)!==null);if(s.length===0)throw new Error(`npm view ${t} printed no version: ${r}`);return Ez.rsort(s)[0]}wr();var HB=H(require("fs")),_4e=H(require("os")),vz=H(require("path"));var ose="CLAUDE_CODE_EFFORT_LEVEL";function K9t(){return vz.join(process.env.RUNNER_TEMP||_4e.tmpdir(),"claude-code")}var aA=class extends VP{label="Claude Code";provider={name:"Claude API",statusUrl:"https://status.claude.com/"};reusesPreinstalledCli=!1;get binary(){return vz.join(this.prefix(),"node_modules",".bin","claude")}envVar="ANTHROPIC_API_KEY";apiKeyField="anthropicApiKey";supportsNdjsonLog=!0;effort;cliVersion;cleanupRegistered=!1;cliPrefix;constructor(t=vR,r="latest"){super(),this.effort=t,this.cliVersion=r}prefix(){return this.cliPrefix??K9t()}async install(){let t=this.prefix();HB.rmSync(t,{recursive:!0,force:!0}),this.cleanupRegistered||(this.cleanupRegistered=!0,process.on("exit",()=>HB.rmSync(t,{recursive:!0,force:!0}))),await Xi("npm",["install","--prefix",t,`@anthropic-ai/claude-code@${this.cliVersion}`]);let r=vz.join(t,"node_modules","@anthropic-ai","claude-code","install.cjs");HB.existsSync(r)&&await Xi("node",[r]);let{stdout:n}=await Xi(this.binary,["--version"],{silent:!0});lm(`Claude Code CLI ${n.trim()} installed at ${this.binary}`)}async initialize(){try{await Xi(this.binary,["--version"]),lm("Claude Code CLI initialized successfully")}catch{$e("Could not verify Claude Code CLI version")}}pinEffortEnv(){let t=process.env[ose];t&&t!==this.effort&&$e(`${ose}=${t} from the environment is overridden by the effort input ("${this.effort}").`),process.env[ose]=this.effort,ke(`Agent effort level: ${this.effort}`)}setupAgentEnv(t,r){!t.useBedrock&&!t.anthropicApiKey||(process.env.MCP_TIMEOUT=String(mv(r.testExecutionTimeout)),process.env.ENABLE_TOOL_SEARCH="false",this.pinEffortEnv(),t.useBedrock?(process.env.CLAUDE_CODE_USE_BEDROCK="1",t.awsRegion&&(process.env.AWS_REGION=t.awsRegion),delete process.env.ANTHROPIC_API_KEY,process.env.AWS_ACCESS_KEY_ID||process.env.AWS_BEARER_TOKEN_BEDROCK||process.env.AWS_PROFILE||process.env.AWS_WEB_IDENTITY_TOKEN_FILE||$e("useBedrock is set but no AWS credentials were detected in the environment. Add an aws-actions/configure-aws-credentials step (OIDC) before Testbot.")):t.anthropicApiKey&&(process.env.ANTHROPIC_API_KEY=t.anthropicApiKey,delete process.env.CLAUDE_CODE_USE_BEDROCK))}};var Sz=class extends aA{provider={name:"Amazon Bedrock",statusUrl:"https://health.aws.amazon.com/health/status"}};var xz=class extends aA{setupAgentEnv(t,r){process.env.MCP_TIMEOUT=String(mv(r.testExecutionTimeout)),process.env.ENABLE_TOOL_SEARCH="false",this.pinEffortEnv(),delete process.env.ANTHROPIC_API_KEY,delete process.env.CLAUDE_CODE_USE_BEDROCK,process.env.CLAUDE_CODE_DISABLE_CLAUDE_MDS="1"}};function N4e(e){return e?.useBedrock?new Sz(e.effort,e.claudeCodeVersion):e?.useLocalAuth?new xz(e.effort,e.claudeCodeVersion):new aA(e?.effort,e?.claudeCodeVersion)}wr();async function P4e(e){await QB(`Installing ${e.label} CLI`,async()=>{e.reusesPreinstalledCli&&await Z9t(e)||await hv(async()=>{await e.install(),lm(`${e.label} CLI installed successfully`)},{retries:3,delay:5,label:`${e.label} CLI install`})})}async function Z9t(e){try{let{exitCode:t,stdout:r}=await Xi(e.binary,["--version"],{silent:!0,ignoreReturnCode:!0});if(t===0&&r.trim())return lm(`${e.label} CLI already installed (version: ${r.trim()})`),!0;ke(`${e.label} CLI not found (non-zero exit or empty output), will install`)}catch(t){ke(`${e.label} CLI not found, will install (${t instanceof Error?t.message:String(t)})`)}return!1}async function B4e(e){await QB(`Initializing ${e.label} agent`,async()=>{await e.initialize()})}var $4e=H(require("path")),Mi="Skyramp Testbot",No="test-bot@skyramp.dev",ase="skyramp-testbot[bot]";function RR(){return $4e.join(process.env.RUNNER_TEMP??"/tmp","skyramp")}var gv=(i=>(i.NotFound="not_found",i.NoAccess="no_access",i.Unavailable="unavailable",i.AccessLost="access_lost",i.CannotOpen="cannot_open",i))(gv||{}),xf=e=>e.source==="other"?{source:e.source,key:e.key}:{source:e.source,site:e.site,key:e.key},oa=e=>`${e.source}:${e.site??""}:${e.key}`;var VB=/^pasted-[0-9a-f]{16}$/,Xc=/^file-[0-9a-f]{16}$/,TR=(s=>(s.Pdf="application/pdf",s.Csv="text/csv",s.Docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.Xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s))(TR||{}),Xr=e=>e.trim().toUpperCase(),kR=(e,t)=>{let r=e.trim();return VB.test(r.toLowerCase())?"Pasted text":Xc.test(r.toLowerCase())?t?.get(Xr(r))??"Uploaded document":/^\d+$/.test(r)?`Confluence page ${r}`:r.toUpperCase()},Ba=(e,t,r)=>t?`${kR(e,r)} AC${t}`:kR(e,r),Cz=(n=>(n.New="new",n.Updated="updated",n.Existing="existing",n))(Cz||{}),Jl=(n=>(n.Sufficient="sufficient",n.Insufficient="insufficient",n.NoChange="no_change",n))(Jl||{}),Cf=(m=>(m.RelatedChangeConflict="related_change_conflict",m.ReferenceOutsideTarget="reference_outside_target",m.SourceAccessLost="source_access_lost",m.ConfigurationIncomplete="configuration_incomplete",m.CredentialUnavailable="credential_unavailable",m.WorkflowBindingUnverified="workflow_binding_unverified",m.WorkflowRefUnprotected="workflow_ref_unprotected",m.BedrockWorkflowRequired="bedrock_workflow_required",m.DeploymentReview="deployment_review",m.SutRevisionMismatch="sut_revision_mismatch",m.IsolationUnavailable="isolation_unavailable",m.EvidenceInsufficient="evidence_insufficient",m.ConfigurationUnresolved="configuration_unresolved",m.ModelProviderDenied="model_provider_denied",m.ModelProviderUnavailable="model_provider_unavailable",m.RunnerProviderNotReady="runner_provider_not_ready",m.MergeConflict="merge_conflict",m))(Cf||{}),cA=(i=>(i.CiCheck="ci_check",i.TestReport="test_report",i.StaticAnalysis="static_analysis",i.CodeReview="code_review",i.Other="other",i))(cA||{}),_R=(n=>(n.Application="application",n.Environment="environment",n.TestDefect="test_defect",n))(_R||{}),WB=(a=>(a.AuthToken="auth_token",a.Secret="secret",a.DataConnection="data_connection",a.AppNotStarted="app_not_started",a.Login="login",a.ExternalDependency="external_dependency",a.RecordingReplay="recording_replay",a))(WB||{});var JB=(r=>(r.Probe="probe",r.Agent="agent",r))(JB||{}),YB=(n=>(n.Seed="seed",n.RuntimeMock="runtime_mock",n.EnvOverride="env_override",n))(YB||{}),Iz=(n=>(n.TestCode="test_code",n.SkyrampMocker="skyramp_mocker",n.RecipeOverride="recipe_override",n))(Iz||{});var NR=(r=>(r.NoTime="no-time",r.Failed="failed",r))(NR||{});var Lr=e=>e.slice(0,12);var _r=(y=>(y.Preflight="preflight",y.Onboard="onboard",y.Analyze="analyze",y.Triage="triage",y.Deploy="deploy",y.Recommend="recommend",y.Generate="generate",y.GenerateUi="generate-ui",y.GenerateUnit="generate-unit",y.Adapt="adapt",y.NativeRun="native-run",y.Finalize="finalize",y.Report="report",y.Deliver="deliver",y.Plan="plan",y.Write="write",y))(_r||{});var yv=(r=>(r.GenerateUnit="generate-unit",r.Write="write",r))(yv||{});var use=["generate-unit","native-run"],KB=["preflight","plan","write",...use,"report","deliver"],BR=["preflight","onboard","deploy"];var uA=(n=>(n.Unit="unit",n.Integration="integration",n.E2e="e2e",n))(uA||{}),lse=Object.values(uA);function Rz(e){return lse.includes(e)}var kz=(n=>(n.Focused="focused",n.ImpactedCritical="impacted_critical",n.Broad="broad",n))(kz||{}),Tz=1440;function fc(e){return"execute"in e}var i$=require("node:crypto");var ZB=(r=>(r.Skyramp="skyramp",r.Llm="llm",r))(ZB||{}),If=b.string().trim().min(1),X9t=b.object({case:If.describe("recommend id this assertion enforces"),evidence:If.describe("the exact assertion line from the file that checks that case's observable")}),dse=b.object({route:b.literal("persistence"),url:b.string().url()}).strict(),Av=b.object({kind:b.nativeEnum(YB).describe("seed: data the test creates in the app; runtime_mock: a mock on a Skyramp worker, which other tests reach too; env_override: an env value the app runs with. A stub inside the test's own process, such as a browser page's route, is none of these"),target:If.describe("the dependency, endpoint or data it affects"),mechanism:b.nativeEnum(Iz).describe("test_code: the test applies and undoes it; skyramp_mocker: a mock the test applies on a Skyramp worker; recipe_override: the mocker cannot reach the dependency (its URL is fixed in the build)"),detail:If.describe("what it sets up"),worker:If.optional().describe("skyramp_mocker: host:port of the worker the test applies the mock to (default localhost:35142)"),safety:dse.optional().describe("shared seed that keeps its data only because the environment permits it: the persistence route and the exact endpoint; Testbot checks the current permission just before it runs the test"),cleanup:If.optional().describe("seed: when its data can be removed, a command that removes it if the test does not; otherwise declare leftBehind instead. Run as written and without a shell: give real values, not a placeholder such as <id>, single-quote an argument that holds shell syntax, or put the logic in a script in the repository and run that"),leftBehind:If.optional().describe("seed: the records the test creates and cannot remove from the app, and how to find them")}).refine(e=>!e.leftBehind||e.kind==="seed",{message:"leftBehind is for a seed only: a runtime mock or an env override creates no records",path:["leftBehind"]}),e5t=b.object({file:If.describe("staged path under .skyramp/staged/"),source:b.nativeEnum(ZB),language:If,covers:b.array(b.string()).min(1,"must be a non-empty array of recommend ids").describe("recommend ids this test covers"),assertions:b.array(X9t).min(1,"must be a non-empty array").describe("one per case covered, citing the real line"),context:b.array(Av).optional().describe("what the test sets up against the running app, in order: data it seeds, Skyramp mocks it applies, env overrides; omit when none")}),pse=b.object({schemaVersion:b.literal(1),tests:b.array(e5t),deferredUi:b.array(b.string()).describe("recommend ui ids left for the UI stage (generate) \u2014 [] for generate-ui"),summary:If.describe("one paragraph")});var Nm=(o=>(o.Place="place",o.Update="update",o.Regenerate="regenerate",o.Delete="delete",o.Verify="verify",o.None="none",o))(Nm||{}),to=(n=>(n.Pass="pass",n.Fail="fail",n.Skip="skip",n))(to||{}),hc=b.string().trim().min(1),XB=(s=>(s.Setup="setup",s.Expectation="expectation",s.Locator="locator",s.Other="other",s))(XB||{}),_z=b.object({kind:b.nativeEnum(XB),reason:hc.describe("what in the test is wrong, with the evidence: the setup error it raised, or the requirement or changed line its expectation contradicts")}),e$=b.array(b.string().url().max(2048).regex(/^https?:\/\//i)).max(50),O4e=b.object({case:hc.describe("a covers id \u2014 the recommend case this test realizes"),status:b.nativeEnum(to),runtimeTargets:e$.optional().describe("HTTP(S) URLs this case actually exercised in its current run; omit for in-process or mocked checks, never infer from test type"),environmentRestriction:hc.optional().describe("for a skipped case: what this run lacks to execute it; the test is still written"),fromJourney:b.boolean().optional(),testProblem:_z.optional().describe("[derived] write's reading of a failing case: the test, not the app, is at fault"),defect:b.boolean().optional().describe("[derived] write's reading of a failing case: true when the app is wrong and the test is right"),failure:b.string().optional().describe("[derived] for a failing case: the runner's failure for it, as printed")}).refine(e=>!e.environmentRestriction||e.status==="skip"&&!e.runtimeTargets?.length,{message:"an environment-restricted case must be skipped and have no runtimeTargets"}),D4e=b.object({started:b.boolean().optional().describe("with exit null: true if the 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:b.number({invalid_type_error:"must be a number or null"}).nullable().describe("process exit of the re-run; null when no SUT was available"),details:b.string().optional().describe("what failed, or why a file was not run \u2014 required on any non-zero exit"),tests:b.array(O4e).optional().describe("ONE ENTRY PER CASE the file covers, its own result; must agree with exit (0 \u2192 no fail; non-zero \u2192 at least one, or the non-test reason in details). The report reads the file by these where they are given")}),M4e=b.object({context:b.array(Av).optional().describe("[derived] setup declarations retained for every executed test, including maintained tests"),from:b.string().optional().describe("staged path \u2014 required for placements"),file:hc.describe("final path relative to its repository, inside that checkout, with a source-file extension"),repository:hc.optional().describe("owner/repo the file lives in, when the run has several checkouts; omit for the working checkout"),action:b.nativeEnum(Nm),covers:b.array(b.string()).optional().describe("recommend ids a placed test covers"),repro:b.boolean().optional().describe("this test is MEANT to fail \u2014 it reproduces a reported bug"),finding:b.boolean().optional().describe("a non-repro test that failed on a REAL product bug"),placementBroken:b.boolean().optional().describe('placement/harness problem one repair could not fix \u2014 every reran.tests entry is then "skip"'),keptReason:hc.optional().describe("why a planned delete/regenerate was declined and the file kept"),isolatedRun:hc.optional().describe('only for a test marked "runs alone": the command, from its checkout root and without a shell, that runs only this file and writes its JUnit XML into $SKYRAMP_RESULTS_DIR (named by its path: no shell expands it) \u2014 the harness runs it, so leave reran.exit null'),reran:D4e,assertionCount:b.number().int().nonnegative().optional().describe("[derived] assertions reachable from the file, counted at write time"),addedOnly:b.boolean().optional().describe("[derived] an existing test file the run only added to: every line it had is still there"),added:b.array(hc).optional().describe("[derived] the cases of the test functions the run added to an existing file: functions it did not have"),staleOnBase:b.boolean().optional().describe("[derived] an existing test that fails the same way on the base branch: its failure is the test's own")}).refine(e=>e.action!=="place"||typeof e.from=="string"&&e.from.trim().length>0,{message:'is a place but has no "from" staged path',path:[]}),F4e=(r=>(r.Junit="junit",r.Converter="converter",r))(F4e||{}),t5t=hc.optional().describe("the items[].file this test is in \u2014 needed only when two of this suite's files cover the same case id"),r5t=b.object({results:hc.describe("the JUnit XML file this run wrote, a plain file name inside $SKYRAMP_RESULTS_DIR (e.g. backend.xml)"),source:b.nativeEnum(F4e),run:hc.describe("the command you ran that wrote it, exactly as you ran it (with any converter)"),files:b.array(hc).min(1).describe("the items[].file paths this run covered"),cases:b.array(b.object({test:hc.describe("the test's name as the runner reports it, qualified by its class or file (e.g. tests/test_a.py::test_x) when the bare name repeats"),case:hc.describe("the covers id it realizes"),file:t5t})).describe("map each reported test name to the case it covers")}),n5t=b.object({suites:b.array(r5t).min(1)}),fse=b.object({schemaVersion:b.literal(1),items:b.array(M4e),runnerResults:n5t.optional().describe("the JUnit XML your test runs wrote into $SKYRAMP_RESULTS_DIR, so the harness reads each test's result from the runner \u2014 omit only when no SUT is available"),ignored:b.array(b.string()).describe("existing tests assessed and deliberately left untouched"),summary:hc.describe("one paragraph")});var bv=b.object({environmentId:b.string().uuid(),allowed:b.boolean(),revision:b.string().uuid(),updatedAt:b.string().datetime(),updatedBy:b.string().uuid()}).strict();function hse(e){let t=bv.passthrough().safeParse(e);return t.success?t.data:void 0}function t$(e){switch(e){case"no_environment":return"the run has no selected Test Environment address";case"no_recorded_grant":return"the run's configuration did not record permission to keep test data in this environment";case"unavailable":return"the current permission to keep test data could not be read";case"changed":return"the permission to keep test data changed after the run started";case"denied":return"the environment does not permit test data to stay";case"out_of_scope":return"the request is outside the environment's address"}}function r$(e,t,r){let n=bv.safeParse(t);return!n.success||!n.data.allowed||!e.environmentId||n.data.environmentId!==e.environmentId||!e.environmentAddress||e.persistentDataPolicy&&e.persistentDataPolicy.revision!==n.data.revision?!1:lA(e.environmentAddress,r)}function lA(e,t){try{let r=new URL(t),n=new URL(e);if(n.search||n.hash)return!1;let s=/%(?:2f|5c|2e|25)/i;if(t.includes("\\")||e.includes("\\")||s.test(r.pathname)||s.test(n.pathname))return!1;let i=n.pathname.replace(/\/$/,"");return["https:","http:"].includes(n.protocol)&&r.origin===n.origin&&(r.pathname===i||r.pathname.startsWith(`${i}/`))}catch{return!1}}var X4e=b.unknown().optional(),gse={handshake:"/api/v1/runner/runs/:runId/attempts",report:"/api/v1/runner/attempts/:attemptId/report",end:"/api/v1/runner/attempts/:attemptId/end",configuration:"/api/v1/runner/attempts/:attemptId/configuration",progress:"/api/v1/runner/attempts/:attemptId/progress",sutRecipe:"/api/v1/runner/attempts/:attemptId/sut-recipe",runtimePlan:"/api/v1/runner/attempts/:attemptId/runtime-plan",persistentDataPolicy:"/api/v1/runner/attempts/:attemptId/persistent-data-policy",heartbeat:"/api/v1/runner/attempts/:attemptId/heartbeat",setupEvents:"/api/v1/runner/attempts/:attemptId/setup-events",runEvents:"/api/v1/runner/attempts/:attemptId/run-events",requirements:"/api/v1/runner/attempts/:attemptId/requirements",requirementFile:"/api/v1/runner/attempts/:attemptId/requirements/:key/file",deployedRevisions:"/api/v1/runner/attempts/:attemptId/deployed-revisions"},MR=(r=>(r.GitHub="github",r.AzureDevOps="azure-devops",r))(MR||{}),Oz=(i=>(i.Trigger="TRIGGER",i.Baseline="BASELINE",i.AuthoritativeRelatedChange="AUTHORITATIVE_RELATED_CHANGE",i.ConfiguredSharedDependency="CONFIGURED_SHARED_DEPENDENCY",i.ManualOverride="MANUAL_OVERRIDE",i))(Oz||{}),o$=(o=>(o.PullRequest="pull_request",o.ReadyForReview="ready_for_review",o.Schedule="schedule",o.Manual="manual",o.SutSetup="sut_setup",o.RevisionRead="revision_read",o))(o$||{}),s5t=["sut_setup"],i5t=["sut_setup","schedule","revision_read"],o5t=["sut_setup"],Dz=(t=>(t.PullRequest="pull_request",t))(Dz||{}),yse=(r=>(r.PullRequest="pull_request",r.Branch="branch",r))(yse||{}),Q4e=["TRIGGER","AUTHORITATIVE_RELATED_CHANGE","MANUAL_OVERRIDE"];var Mz=(i=>(i.ReportUploaded="report_uploaded",i.NoReport="no_report",i.Cancelled="cancelled",i.RecipeUploaded="recipe_uploaded",i.RevisionsUploaded="revisions_uploaded",i))(Mz||{}),eJe=(r=>(r.Running="running",r.Ended="ended",r))(eJe||{}),Fz=(p=>(p.TimedOut="timed_out",p.AgentFailed="agent_failed",p.SetupFailed="setup_failed",p.CredentialMissing="credential_missing",p.RunnerLost="runner_lost",p.CheckoutFailed="checkout_failed",p.EnvironmentUnverified="environment_unverified",p.ModelProviderDenied="model_provider_denied",p.ModelProviderUnavailable="model_provider_unavailable",p.RunnerProviderNotReady="runner_provider_not_ready",p.MergeConflict="merge_conflict",p.EnvironmentUnavailable="environment_unavailable",p))(Fz||{}),Ase=(n=>(n.Onboard="onboard",n.Deploy="deploy",n.Recheck="recheck",n))(Ase||{}),a$=(r=>(r.Started="started",r.Finished="finished",r))(a$||{}),bse=(n=>(n.Passed="passed",n.Failed="failed",n.Skipped="skipped",n))(bse||{}),pA=(o=>(o.Log="log",o.Component="component",o.Reply="reply",o.Question="question",o.Delivered="delivered",o.Credentials="credentials",o))(pA||{}),Qz=(n=>(n.ChooseCredential="choose_credential",n.FreeText="free_text",n.ChooseSource="choose_source",n))(Qz||{});var c$=(s=>(s.Answered="answered",s.Followed="followed",s.NotFollowed="not_followed",s.TooLate="too_late",s))(c$||{}),FR=(n=>(n.Discover="discover",n.Start="start",n.Check="check",n))(FR||{}),Bm=(s=>(s.ValidationPlan="validation_plan",s.TestEnvironment="test_environment",s.TestConditions="test_conditions",s.Tests="tests",s))(Bm||{});var QR=(s=>(s.Found="found",s.Starting="starting",s.Up="up",s.OutOfScope="out_of_scope",s))(QR||{}),Yl=b.string().regex(/^[1-9][0-9]{0,18}$/),Kl=b.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),mse=b.string().regex(/^(?!.*\.\.)(?!\/)(?!.*\/$)[A-Za-z0-9._/-]{1,255}$/),wv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function u$(e,t){return`${e.replace(/\/+$/,"")}/runs/${t}`}function Lz(e,t){if(t)try{let r=new URL(e),n=r.pathname.startsWith("/runs/")?r.pathname.slice(6):"";return wv.test(n)&&e===u$(r.origin,n)&&r.origin===new URL(t).origin?e:void 0}catch{return}}var $a=b.string().regex(wv),mc=b.string().regex(/^[0-9a-f]{64}$/),$z=b.object({id:$a,revision:Yl}).strict(),Uz={provider:b.literal("github"),providerAccountId:Yl,providerRepositoryId:Yl},jz={provider:b.literal("azure-devops"),providerAccountId:$a,providerRepositoryId:$a},Yu=b.discriminatedUnion("provider",[b.object(Uz).strict(),b.object(jz).strict()]),wse=b.discriminatedUnion("provider",[b.object(Uz).passthrough(),b.object(jz).passthrough()]),en=e=>`${e.provider}:${e.providerRepositoryId}`,L4e={namespace:b.string().min(1),name:b.string().min(1)},tJe=b.discriminatedUnion("provider",[b.object({...Uz,...L4e}).strict(),b.object({...jz,...L4e}).strict()]),U4e=b.object({ref:b.string().min(1),revision:Kl}).strict(),a5t=b.object({kind:b.nativeEnum(yse),number:Yl.optional(),ref:b.string().min(1),revision:Kl,reason:b.nativeEnum(Oz)}).strict(),c5t=b.object({repository:tJe,revision:Kl,ref:b.string().nullable(),reason:b.nativeEnum(Oz),change:b.object({kind:b.nativeEnum(Dz),number:Yl,base:U4e.optional()}).strict().nullable(),compareWith:U4e.optional(),merge:b.array(a5t).min(2).optional()}).strict();function u5t(e){let t=e.merge;if(!t)return null;if(e.change||e.compareWith)return{path:["merge"],message:"a merged source names no change and no compareWith"};if(e.ref===null)return{path:["ref"],message:"a merged source names its baseline branch"};let r=new Set,n=new Set;for(let[i,o]of t.entries()){if(o.kind==="pull_request"!=(o.number!==void 0))return{path:["merge",i,"number"],message:"a pull request names its number, and a branch none"};if(!Q4e.includes(o.reason))return{path:["merge",i,"reason"],message:`${o.reason} does not select a merged revision`};if(o.kind==="branch"&&o.reason!=="MANUAL_OVERRIDE")return{path:["merge",i,"reason"],message:"only a person chooses a branch to merge"};if(o.ref===e.ref)return{path:["merge",i,"ref"],message:"the baseline branch is what the source merges onto"};if(o.number!==void 0&&r.has(o.number)||n.has(o.ref))return{path:["merge",i],message:"names a revision the source already merges"};o.number!==void 0&&r.add(o.number),n.add(o.ref)}let s=Q4e.find(i=>t.some(o=>o.reason===i));return e.reason!==s?{path:["reason"],message:`a source that merges these revisions is ${s}`}:null}function l5t(e){if(e.trigger.kind==="revision_read"!=!e.baseline)return e.baseline?"a revision_read run names no baseline":"names its baseline";if(!e.baseline)return null;let{confirmedRunId:t,initialBaselineId:r,comparisonBaselineId:n,sources:s}=e.baseline;if([t,r,n].filter(u=>u!=null).length>1)return"a run compares with one baseline";let i=e.trigger.kind==="schedule"&&t!==null||r!==void 0||n!==void 0;if(!s)return i?"names every source of the snapshot, once":null;if(t===null&&r===void 0&&n===void 0)return"a run with no Confirmed Baseline names no baseline sources";let o=new Set(e.sources.map(u=>en(u.repository))),a=new Set(s.map(u=>en(u.repository)));return a.size===s.length&&a.size===o.size&&[...a].every(u=>o.has(u))?null:"names every source of the snapshot, once"}var rJe=/^[A-Z][A-Z0-9_]+-[1-9][0-9]*$/,nJe=/^[1-9][0-9]{0,18}$/,j4e=new RegExp(`${rJe.source}|${nJe.source}`),q4e=/^https:\/\/[a-z0-9-]+(\.[a-z0-9-]+)+$/,d5t=b.union([b.object({source:b.literal("jira"),site:b.string().regex(q4e),key:b.string().regex(rJe),updated:b.string().datetime(),contentHash:mc}).strict(),b.object({source:b.literal("confluence"),site:b.string().regex(q4e),key:b.string().regex(nJe),version:b.number().int().positive(),contentHash:mc}).strict(),b.object({source:b.literal("other"),key:b.string().regex(VB),contentHash:mc}).strict(),b.object({source:b.literal("other"),key:b.string().regex(Xc),contentHash:mc,fileName:b.string().min(1).max(255),mediaType:b.nativeEnum(TR)}).strict()]),z4e=b.union([b.literal("jira"),b.literal("confluence")]),sJe=b.object({schemaVersion:b.literal(1),items:b.array(b.union([b.object({source:z4e,site:b.string(),key:b.string().regex(j4e),state:b.literal("read"),text:b.string(),version:b.string().min(1),contentMatches:b.boolean()}).strict(),b.object({source:z4e,site:b.string(),key:b.string().regex(j4e),state:b.literal("not_read"),reason:b.nativeEnum(gv)}).strict(),b.object({source:b.literal("other"),key:b.string().regex(VB),state:b.literal("read"),text:b.string(),version:b.string().min(1),contentMatches:b.boolean()}).strict(),b.object({source:b.literal("other"),key:b.string().regex(VB),state:b.literal("not_read"),reason:b.nativeEnum(gv)}).strict(),b.object({source:b.literal("other"),key:b.string().regex(Xc),state:b.literal("read"),version:mc,fileName:b.string().min(1).max(255),mediaType:b.nativeEnum(TR)}).strict(),b.object({source:b.literal("other"),key:b.string().regex(Xc),state:b.literal("not_read"),reason:b.nativeEnum(gv)}).strict()])),instructions:b.array(b.string()).optional()}).strict(),p5t=b.object({resultId:b.string().min(1),repository:b.string().min(1),testType:b.string().min(1),path:b.string(),finding:b.string().min(1)}).strict(),f5t=b.object({schemaVersion:b.literal(1),runId:$a,skyrampOrgId:$a,target:$z,policy:$z.nullable(),trigger:b.object({kind:b.nativeEnum(o$),requestedAt:b.string().datetime()}).strict(),configuration:b.object({captureId:$a,revision:Yl.nullable(),hash:mc}).strict(),baseline:b.object({confirmedRunId:$a.nullable(),initialBaselineId:$a.optional(),comparisonBaselineId:$a.optional(),knownFailures:b.array(p5t).optional(),sources:b.array(b.object({repository:Yu,revision:Kl}).strict()).optional()}).strict().optional(),sources:b.array(c5t).min(1).max(1e3),execution:b.object({provider:b.nativeEnum(MR),repository:tJe,workflowPath:b.string(),ref:b.string()}).strict(),credentials:b.array(b.object({name:b.string(),purpose:b.nativeEnum(wE),required:b.boolean()}).strict()),requirements:b.array(d5t).min(1).optional(),instructions:b.object({contentHash:mc}).strict().optional(),deployedRevisions:b.array(b.object({repository:Yu,revision:Kl}).strict()).min(1).optional()}).strict().superRefine((e,t)=>{let r=new Set;(e.requirements??[]).forEach((c,u)=>{let l="fileName"in c?"file":"pasted";c.source==="other"&&c.key!==`${l}-${c.contentHash.slice(0,16)}`&&t.addIssue({code:b.ZodIssueCode.custom,message:"is not the key of its content hash",path:["requirements",u,"key"]});let d=oa({source:c.source,key:c.key});r.has(d)&&t.addIssue({code:b.ZodIssueCode.custom,message:"names an item that the run already names",path:["requirements",u,"key"]}),r.add(d)});let n=e.trigger.kind,s=s5t.includes(n);s!==(e.policy===null)&&t.addIssue({code:b.ZodIssueCode.custom,path:["policy"],message:s?`a ${n} run has no policy`:"names the policy revision"}),e.baseline?.knownFailures&&!e.baseline.comparisonBaselineId&&t.addIssue({code:b.ZodIssueCode.custom,path:["baseline","knownFailures"],message:"known failures require a chosen comparison checkpoint"});let i=l5t(e);i&&t.addIssue({code:b.ZodIssueCode.custom,path:e.baseline?["baseline","sources"]:["baseline"],message:i}),i5t.includes(n)&&e.sources.forEach((c,u)=>{c.reason!=="BASELINE"&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u,"reason"],message:`a ${n} run selects only BASELINE sources`})}),e.deployedRevisions&&n!=="manual"&&t.addIssue({code:b.ZodIssueCode.custom,path:["deployedRevisions"],message:"only a manual run pins deployed revisions"});let o=new Set(e.sources.map(c=>en(c.repository))),a=new Set;(e.deployedRevisions??[]).forEach((c,u)=>{let l=en(c.repository);o.has(l)?a.has(l)&&t.addIssue({code:b.ZodIssueCode.custom,path:["deployedRevisions",u,"repository"],message:"repository appears twice"}):t.addIssue({code:b.ZodIssueCode.custom,path:["deployedRevisions",u,"repository"],message:"names a repository outside the snapshot"}),a.add(l)}),e.sources.forEach((c,u)=>{c.compareWith&&(c.reason!=="MANUAL_OVERRIDE"||c.change)&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u,"compareWith"],message:"only a MANUAL_OVERRIDE source without a change names a revision to compare with"}),e.baseline?.comparisonBaselineId&&(c.change?.base||c.compareWith||c.merge)&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u],message:"a chosen checkpoint cannot be combined with a source comparison base or merge"});let l=u5t(c);l&&t.addIssue({code:b.ZodIssueCode.custom,path:["sources",u,...l.path],message:l.message})})});var Ese=(r=>(r.Person="person",r.Policy="policy",r))(Ese||{}),h5t=b.object({kind:b.nativeEnum(Ese),name:b.string().min(1).max(256)}).strict(),m5t=b.object({mcp:b.discriminatedUnion("source",[b.object({source:b.literal("npm"),version:b.string().regex(/^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/).nullable()}).strict(),b.object({source:b.literal("github"),ref:b.string().regex(/^[A-Za-z0-9._/-]{1,255}$/)}).strict()]),bedrock:b.object({region:b.string().regex(/^[a-z]{2}(-[a-z]+)+-[0-9]$/),roleArn:b.string().regex(/^arn:aws(-[a-z]+)*:iam::[0-9]{12}:role\/[\w+=,.@/-]{1,512}$/)}).strict().nullable()}).strict(),g5t=b.object({schemaVersion:b.literal(1),attempt:b.object({id:$a,number:b.number().int().positive(),deadlineAt:b.string().datetime()}).strict(),manifest:f5t,manifestHash:mc,entitlements:b.array(b.string()).optional(),runToken:b.string().min(1).optional(),requestedBy:h5t.nullable().optional(),writeAllowed:b.boolean().optional(),claudeCodeVersion:b.string().regex(/^[0-9]+\.[0-9]+\.[0-9]+$/,"an exact version, such as 2.1.290").nullable().optional(),deployedRevisions:b.array(b.object({repository:Yu,revision:Kl}).strict()).optional(),statedRevisions:b.array(b.object({repository:Yu,revision:Kl}).strict()).optional(),runSettings:m5t.optional()}).strict(),G4e={providerRunAttempt:b.number().int().positive(),workflowRef:b.string().min(1)},y5t=b.string().regex(/^[^/]+\/[^/]+\/[1-9][0-9]{0,15}\/[1-9][0-9]{0,15}$/),A5t=b.object({schemaVersion:b.literal(1),runId:$a,execution:b.discriminatedUnion("provider",[b.object({...G4e,provider:b.literal("github"),repository:b.object(Uz).strict(),providerRunId:Yl}).strict(),b.object({...G4e,provider:b.literal("azure-devops"),repository:b.object(jz).strict(),providerRunId:y5t}).strict()]),requester:b.literal(!0).optional(),writeCheck:b.literal(!0).optional(),claudeCodePin:b.literal(!0).optional(),deployedPins:b.literal(!0).optional(),statedPins:b.literal(!0).optional(),runSettings:b.literal(!0).optional()}).strict(),H4e=b.object({repository:Yu,number:Yl,commitSha:Kl.optional()}).strict(),Nz=b.array(b.object({repository:Yu,reason:b.string().max(4096).regex(/\S/)}).strict()).max(1e3).optional(),qz=b.object({branch:mse.optional(),commitSha:Kl.optional()}).strict(),Ev=4096,vse=b.array(b.object({file:b.string().max(4096).regex(/\S/),dependsOn:b.array(b.string().max(2048).regex(/\S/)).max(100)}).strict()).min(1).max(500),V4e=b.object({repository:Yu,message:b.string().max(Ev),...qz.shape,heldBack:vse.optional()}).strict(),b5t=b.discriminatedUnion("status",[b.object({status:b.literal("none"),noTests:Nz}).strict(),b.object({status:b.literal("delivered"),noTests:Nz,pullRequests:b.array(H4e).min(1)}).strict(),b.object({status:b.literal("partial"),noTests:Nz,pullRequests:b.array(H4e).min(1),failures:b.array(V4e).min(1)}).strict(),b.object({status:b.literal("failed"),message:b.string().max(Ev),noTests:Nz,failures:b.array(V4e).min(1).optional()}).strict()]),Sse=1024*1024,iJe=16*1024*1024,n$={id:4096,text:16384,businessCase:65536},l$={id:n$.id,statement:n$.text,rows:1e3},W4e=b.string().min(1).max(n$.id),Bz=b.string().max(n$.text),Pz=(e,t)=>b.array(b.object({[e]:Bz}).strict()).max(t).optional(),xse=b.object({language:b.custom(e=>e==="ja","Invalid"),businessCaseAnalysis:b.string().max(n$.businessCase),validation:b.object({rationale:Bz.min(1),gaps:b.array(b.string().min(1).max(4096)).max(200)}).strict().optional(),changes:b.array(b.object({id:W4e,text:Bz}).strict()).max(1e3).optional(),requirements:b.array(b.object({id:W4e,statement:Bz}).strict()).max(l$.rows).optional(),issuesFound:Pz("description",5e3),newTestsCreated:Pz("description",5e3),testResults:Pz("details",5e3),caveats:Pz("text",100)}).strict(),w5t=b.object({blockedPreflight:b.object({file:b.string().min(1),repository:b.string().min(1).optional(),reason:b.string().min(1).max(300),evidence:b.string().min(1).max(400)}).strict().optional(),sufficiency:b.nativeEnum(Jl),rationale:b.string().min(1),gaps:b.array(b.string().min(1)),acceptedEvidence:b.array(b.object({kind:b.nativeEnum(cA),repository:b.string().min(1),revision:Kl,reference:b.string().min(1),summary:b.string().min(1)}).strict()),actionRequired:b.array(b.nativeEnum(Cf))}).strict().superRefine((e,t)=>{e.sufficiency==="insufficient"!=e.gaps.length>0&&t.addIssue({code:b.ZodIssueCode.custom,path:["gaps"],message:"only insufficient evidence names gaps, and it names at least one"}),new Set(e.actionRequired).size!==e.actionRequired.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["actionRequired"],message:"a reason appears twice"})}),OR=500,Cse=2048,Ise=1e3,E5t=/[\\/:*?"<>|;#$*{},+=[\]%\p{Cc}\p{Cf}]/u,J4e=e=>e.length>0&&e.length<=64&&e===e.trim()&&!E5t.test(e)&&!/[^\S ]/u.test(e)&&!/^[._]/.test(e)&&!e.endsWith("."),oJe=e=>{if(/^[A-Za-z0-9._-]{1,100}\/[A-Za-z0-9._-]{1,100}$/.test(e))return!0;let[t,r,n,...s]=e.split("/");return e.length<=201&&s.length===0&&n!==void 0&&/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,48}[A-Za-z0-9])?$/.test(t)&&J4e(r)&&J4e(n)},v5t=b.object({testResults:b.array(b.object({resultId:b.string().regex(/^[^\u0000-\u001f]{1,512}$/),repository:b.string().refine(oJe,"Invalid"),testType:b.string(),runtimeTargets:e$.optional(),endpoint:b.string(),status:b.enum(["Pass","Fail","Skipped"]),details:b.string(),fileName:b.string().optional(),testId:b.string().regex(/^[^\u0000-\u001f]{1,512}$/).optional(),failureCause:b.object({kind:b.nativeEnum(_R),family:b.nativeEnum(WB).optional()}).strict().optional(),origin:b.nativeEnum(Cz).optional()}).strict()),validation:w5t,changes:b.array(b.object({id:b.string().min(1).max(512),text:b.string().max(16384),source:b.string().max(Cse),testedBy:b.array(b.string().min(1).max(1024)).max(OR),writtenBy:b.array(b.string().min(1).max(1024)).max(OR),maintainedBy:b.array(b.string().min(1).max(1024)).max(OR)}).strict()).max(Ise).optional(),traceVersion:b.literal(1),display:xse.optional()}).passthrough().superRefine((e,t)=>{let r=e.display,n={issuesFound:e.issuesFound,newTestsCreated:e.newTestsCreated,testResults:e.testResults,caveats:e.caveats};for(let i of["issuesFound","newTestsCreated","testResults","caveats"]){let o=r?.[i];o&&o.length!==(Array.isArray(n[i])?n[i].length:0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["display",i],message:`has not one row per ${i} row`})}r?.validation&&r.validation.gaps.length!==e.validation.gaps.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["display","validation","gaps"],message:"has not one gap per validation gap"});let s=new Set;e.testResults.forEach((i,o)=>{let a=i.failureCause;a&&i.status==="Pass"&&t.addIssue({code:b.ZodIssueCode.custom,path:["testResults",o,"failureCause"],message:"a passing result has no failure cause"}),a&&a.kind==="environment"!=(a.family!==void 0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["testResults",o,"failureCause"],message:"an environment cause names its family, and no other cause does"});let c=["testResults",o,"resultId"],u=i.resultId.slice(`${i.repository}:${i.testType}:`.length);(!i.resultId.startsWith(`${i.repository}:${i.testType}:`)||u===""||u.startsWith("/")||u.startsWith("#"))&&t.addIssue({code:b.ZodIssueCode.custom,path:c,message:"is not repository:testType:path for this result"}),s.has(i.resultId)&&t.addIssue({code:b.ZodIssueCode.custom,path:c,message:"stable identity repeated"}),s.add(i.resultId)})}),Y4e=e=>e.replace(/[%:#]/g,t=>encodeURIComponent(t));function $m(e,t,r,n){let s=r.replace(/\\/g,"/"),i=s.split("/").filter(c=>c!==""&&c!==".");if(s.startsWith("/")||/^[A-Za-z]:/.test(s)||i.length===0||i.includes(".."))throw new Error(`testResultId needs a path relative to the repository root, got "${r}"`);let o=i.join("/"),a=`${e}:${t}:${Y4e(o)}`;return n?`${a}#${Y4e(n)}`:a}var zz=50,Gz=b.discriminatedUnion("kind",[b.object({kind:b.literal("branch_pushed"),repository:Yu,branch:mse,commit:Kl}).strict(),b.object({kind:b.enum(["pull_request_opened","pull_request_edited"]),repository:Yu,number:Yl,branch:mse}).strict()]),aJe=b.object({schemaVersion:b.literal(1),run:b.object({runId:$a,attemptNumber:b.number().int().positive(),manifestHash:mc}).strict(),target:$z,policy:$z,provenance:b.object({sources:b.array(b.object({repository:Yu,revision:Kl}).strict()),firstQualification:b.literal(!0).optional()}).strict(),delivery:b.object({generatedTests:b5t}).strict(),producer:b.object({testbot:b.string().regex(/^[0-9A-Za-z.+-]{1,64}$/),mcp:b.string().regex(/^[0-9A-Za-z.+-]{1,64}$/)}).strict(),report:v5t,githubWrites:b.array(Gz).max(zz).optional()}).strict(),Hz=(s=>(s.Recipe="recipe",s.CredentialRejected="credential_rejected",s.Environment="environment",s.Unknown="unknown",s))(Hz||{}),LR=200,S5t=b.object({cause:b.nativeEnum(Hz),credential:b.string().regex(Wc).optional(),reason:b.string().trim().min(1).max(LR).optional()}).strict().refine(e=>e.cause==="credential_rejected"==(e.credential!==void 0&&e.reason!==void 0),{message:"a credential_rejected check, and only one, names the credential and why"}),x5t=b.object({name:b.string().regex(Wc),purpose:b.enum(["sut_access","other"]),required:b.boolean(),how:b.string().trim().min(1).max(MP)}).strict(),C5t=aJe.pick({schemaVersion:!0,run:!0,target:!0,provenance:!0,producer:!0}).extend({recipe:UP,check:S5t.optional(),inputs:b.array(x5t).min(1).max(50).optional()}).strict().superRefine(({recipe:e},t)=>{let r=(i,o)=>t.addIssue({code:b.ZodIssueCode.custom,path:["recipe",...i],message:o});e.status==="blocked"&&e.blockers.length===0&&r(["blockers"],"a blocked recipe names at least one blocker");let n=new Set,s=0;e.files.forEach((i,o)=>{Qy(i.path)||r(["files",o,"path"],"is not a file under .skyramp/sut/, or the .skyramp/workspace.yml a recipe stored before SKYR-5829 carries"),n.has(i.path)&&r(["files",o,"path"],"file repeated"),n.add(i.path),fj.test(i.content)&&r(["files",o,"content"],"is not text");let a=Buffer.byteLength(i.content,"utf8");s+=a,a>EE&&r(["files",o,"content"],`larger than ${EE} bytes`)}),s>vE&&r(["files"],`recipe text over ${vE} bytes in total`)}),I5t=b.object({components:b.array(b.object({name:b.string().min(1),repository:b.string().refine(oJe,"Invalid"),observedRevision:b.string().regex(/^[0-9a-f]{7,64}$/).nullable(),source:b.nativeEnum(JB),evidence:b.string()}).strict().refine(e=>e.source!=="agent"||e.observedRevision===null,{path:["observedRevision"],message:"a component only an agent session can read names no revision"}))}).strict();function vv(e){return e.trigger.kind==="schedule"||e.trigger.kind==="manual"&&e.sources.every(t=>t.reason==="BASELINE")}function cJe(e,t){if(e.trigger.kind!=="revision_read"&&!vv(e))throw new Error(`The deployed revisions upload is invalid: only a revision_read, scheduled or unchosen manual run sends one, not a ${e.trigger.kind} run`);let r=e.sources.map(s=>`${s.repository.namespace}/${s.repository.name}`),n=I5t.safeParse({components:t.map((s,i)=>{let o=r.find(a=>a.toLowerCase()===s.repository.toLowerCase());if(!o)throw new Error(`The deployed revisions upload is invalid: components.${i}.repository: ${s.repository} is not a source of the run`);return{...s,repository:o,evidence:s.evidence.trim()}})});if(!n.success)throw new Error(`The deployed revisions upload is invalid: ${Use(n.error)}`);return n.data}var uJe=b.object({schemaVersion:b.literal(1),stage:b.nativeEnum(Ase),event:b.nativeEnum(a$),status:b.nativeEnum(bse).optional()}).strict().refine(e=>e.status===void 0||e.event==="finished",{path:["status"],message:"only a finished stage has a status"}),kf=100,fA=5e3,Pm=2e3,s$=100,Vz=/^[A-Za-z0-9_-]{1,64}$/,Rse=20,kse=200,Tse=100,_se=100,R5t=200,K4e="[^/\\s](?:(?:[^/\\s]| )*[^/\\s])?",k5t=new RegExp(`^(?:[^/\\s]+/[^/\\s]+|[^/\\s]+/${K4e}/${K4e})$`),Nse=500,Pse=50,Bse=10,$se=/^[A-Za-z0-9](?:[A-Za-z0-9 _-]{0,48}[A-Za-z0-9])?$/,UR=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Ju=e=>b.string().max(e).refine(t=>t.trim().length>0&&!UR.test(t),"blank, or not text"),Rf={sequence:b.number().int().min(1).max(fA),at:b.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?Z$/)},lJe=b.object({...Rf,kind:b.literal("reply"),to:b.string().uuid(),outcome:b.nativeEnum(c$),accepted:b.boolean(),text:Ju(Pm),note:b.object({source:b.enum(["target","environment"]),quote:Ju(Pm)}).strict().optional(),kept:Ju(Pm).optional()}).strict();function dJe(e,t){if(e.kind!=="reply")return;let r=e;r.accepted!==(r.outcome==="answered"||r.outcome==="followed")&&t.addIssue({code:b.ZodIssueCode.custom,path:["accepted"],message:"accepted exactly when answered or followed"}),r.note&&r.outcome!=="not_followed"&&t.addIssue({code:b.ZodIssueCode.custom,path:["note"],message:"a note only when not_followed"}),r.kept&&r.outcome!=="followed"&&t.addIssue({code:b.ZodIssueCode.custom,path:["kept"],message:"kept only when followed"})}var Ose=b.discriminatedUnion("kind",[b.object({...Rf,kind:b.literal("log"),phase:b.nativeEnum(FR),text:Ju(Pm)}).strict(),b.object({...Rf,kind:b.literal("component"),name:Ju(s$),repository:Ju(R5t).refine(e=>k5t.test(e)||e===Nn,"not owner/name"),file:Ju(Nse).nullable(),status:b.nativeEnum(QR),version:Ju(_se).optional()}).strict(),lJe,b.object({...Rf,kind:b.literal("question"),id:b.string().regex(Vz),type:b.nativeEnum(Qz),text:Ju(Pm),component:Ju(s$).nullable(),choices:b.array(Ju(kse)).max(Rse),placeholder:Ju(Tse).optional()}).strict(),b.object({...Rf,kind:b.literal("delivered"),ids:b.array(b.string().uuid()).max(kf)}).strict(),b.object({...Rf,kind:b.literal("credentials"),names:b.array(b.string().regex(Wc)).min(1).max(Pse),logins:b.array(b.object({key:b.string().regex($se),usernameVariable:b.string().regex(Wc),passwordVariable:b.string().regex(Wc)}).strict()).min(1).max(Bse).optional()}).strict()]).superRefine((e,t)=>{if(dJe(e,t),e.kind==="credentials"&&new Set(e.names).size!==e.names.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["names"],message:"a name twice"}),e.kind==="credentials"&&e.logins){let r=e.logins.map(n=>SR(n.key));new Set(r).size!==r.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["logins"],message:"a key twice"}),e.logins.forEach((n,s)=>{for(let i of["usernameVariable","passwordVariable"])e.names.includes(n[i])||t.addIssue({code:b.ZodIssueCode.custom,path:["logins",s,i],message:"not one of the names"})})}e.kind==="question"&&(e.type==="free_text"!=(e.choices.length===0)&&t.addIssue({code:b.ZodIssueCode.custom,path:["choices"],message:"choices exactly when the question is not free_text"}),new Set(e.choices).size!==e.choices.length&&t.addIssue({code:b.ZodIssueCode.custom,path:["choices"],message:"a choice twice"}))}),pJe=b.object({schemaVersion:b.literal(1),events:b.array(Ose).max(kf)}).strict(),Dse=b.discriminatedUnion("kind",[b.object({...Rf,kind:b.literal("log"),stage:b.nativeEnum(Bm),text:Ju(Pm)}).strict(),lJe,b.object({...Rf,kind:b.literal("delivered"),ids:b.array(b.string().uuid()).max(kf)}).strict(),b.object({...Rf,kind:b.literal("stage"),stage:b.nativeEnum(Bm),event:b.nativeEnum(a$)}).strict(),b.object({...Rf,kind:b.literal("test"),resultId:b.string().regex(/^[^\u0000-\u001f]{1,512}$/),status:b.enum(["Pass","Fail","Skipped"]),details:b.string().max(Pm).refine(e=>!UR.test(e),"not text")}).strict()]).superRefine(dJe),fJe=b.object({schemaVersion:b.literal(1),events:b.array(Dse).max(kf)}).strict(),Z4e={id:b.string().uuid(),text:b.string(),by:b.string().nullable(),at:b.string(),replied:b.literal(!0).optional()},hJe=b.discriminatedUnion("kind",[b.object({...Z4e,kind:b.literal("instruction"),question:b.null()}),b.object({...Z4e,kind:b.literal("answer"),question:b.string().regex(Vz)})]),mJe=b.string().regex(/^[A-Za-z0-9+/]{43}=$/),T5t=b.object({id:b.string().uuid(),revision:b.string(),by:b.string().nullable(),at:b.string(),target:b.string(),own:b.object({source:b.enum(["policy","test_environment"]),text:b.string()}).nullable()}),Wz=b.object({schemaVersion:b.literal(1),leftOut:b.array(b.string()),messages:b.array(hJe).optional(),stop:b.object({key:mJe}).optional(),notes:T5t.optional()}),gJe=b.object({schemaVersion:b.literal(1),messages:b.array(hJe).optional()}),d$=7,Jz=500*1024*1024,yJe=b.object({id:Yl,name:b.string().regex(/^[A-Za-z0-9._-]{1,200}$/),providerRunId:Yl,expiresAt:b.string().datetime()}).strict(),AJe=b.object({schemaVersion:b.literal(1),artifact:yJe,sessionId:$a,contentHash:mc,bytes:b.number().int().min(1).max(Jz)}).strict(),bJe=b.object({schemaVersion:b.literal(1),checkpoint:b.object({artifact:yJe,repository:b.object({namespace:b.string().min(1),name:b.string().min(1)}).strict(),sessionId:$a,contentHash:mc,key:mJe}).strict().nullable()}).strict(),_5t=200,$R=100,Yz=(n=>(n.Resume="resume",n.Retry="retry",n.Update="update",n))(Yz||{}),N5t=b.object({kind:b.nativeEnum(Yz),setup:b.object({runId:$a,endedAt:b.string().nullable(),outcome:b.string().nullable()}).strict(),components:b.array(b.object({name:b.string().min(1),repository:b.string().min(1),status:b.nativeEnum(QR)}).strict()).max($R),credentials:b.array(b.string().min(1)).max($R),answers:b.array(b.object({question:b.string(),answer:b.string().nullable()}).strict()).max($R),instructions:b.array(b.object({text:b.string(),reply:b.string().nullable()}).strict()).max($R),log:b.array(b.object({phase:b.nativeEnum(FR),text:b.string()}).strict()).max(_5t),recipe:b.object({files:b.array(b.object({path:b.string().min(1),content:b.string()}).strict()).max($R),blockers:b.array(b.object({component:b.string(),problem:b.string(),evidence:b.string(),fix:b.string()}).strict()).max($R)}).strict().optional()}).strict(),wJe=b.object({schemaVersion:b.literal(1),context:N5t.nullable()}).strict(),EJe=b.object({schemaVersion:b.literal(1),configuration:b.object({captureId:$a,revision:Yl.nullable(),hash:mc}).strict(),capture:b.object({schemaVersion:b.literal(1),settings:b.object({target:b.object({environment:b.unknown()}).passthrough(),timeoutMinutes:b.number().int().positive(),answerWaitMinutes:b.number().int().positive().optional(),testEnvironment:b.object({name:b.string().min(1),address:b.string().min(1).optional(),readyWhen:b.string().min(1).optional(),environmentId:b.string().uuid().optional(),persistentDataPolicy:X4e}).passthrough().optional()}).passthrough(),provenance:b.object({}).passthrough(),hash:mc}).strict()}).strict(),vJe=b.object({schemaVersion:b.literal(1),environmentId:b.string().uuid().nullable(),environmentAddress:b.string().url().nullable(),persistentDataPolicy:bv.nullable()}).strict(),P5t=LI.extend({environmentId:b.string().uuid().optional(),persistentDataPolicy:X4e,version:b.number().int().positive(),components:b.array(b.object({name:b.string().min(1),repository:b.string().min(1)}).strict()),contentHash:mc.optional(),files:b.array(b.object({path:b.string().refine(e=>Qy(e)&&!jI.includes(e),"not a file of a customer_deployed plan"),content:b.string()}).strict()).optional()}).strict(),SJe=b.object({schemaVersion:b.literal(1),testEnvironment:P5t.nullable().optional(),runtimePlan:b.object({version:b.number().int().positive(),contentHash:mc,files:b.array(b.object({path:b.string().refine(Qy,"not a recipe file path"),content:b.string()}).strict()).min(1),repository:hj.optional(),recipeRepository:hj.optional(),recipe:b.record(b.unknown()).optional()}).strict().nullable()}).strict().refine(e=>!(e.runtimePlan&&e.testEnvironment),{message:"a run pins a recipe or a customer's Test Environment, never both",path:["testEnvironment"]}),xJe=b.object({schemaVersion:b.literal(1),state:b.nativeEnum(eJe),ending:b.nativeEnum(Mz).nullable(),cause:b.nativeEnum(Fz).nullable(),deadlineAt:b.string().datetime()}).strict();function Mse(e,t){return e.state==="ended"?e.ending==="cancelled"?"cancelled":e.cause==="runner_lost"?"expired":"ended":t.getTime()>=Date.parse(e.deadlineAt)?"expired":null}var Fse=50,B5t=b.object({repository:Yu,revisions:b.array(b.number().int().nonnegative()).min(1).max(2).refine(e=>e.length<2||e[0]<e[1],"two revisions name the earlier first"),files:b.array(b.string().min(1)).min(1).max(Fse)}).strict();function dA(e){if(typeof e=="number"&&!Number.isFinite(e))throw new TypeError("Canonical JSON requires JSON values");if(Array.isArray(e))return`[${e.map(dA).join(",")}]`;if(e!==null&&typeof e=="object"){let r=e;return`{${Object.keys(r).sort().map(n=>`${JSON.stringify(n)}:${dA(r[n])}`).join(",")}}`}let t=JSON.stringify(e);if(t===void 0)throw new TypeError("Canonical JSON requires JSON values");return t}function Qse(e){return(0,i$.createHash)("sha256").update(dA(e),"utf8").digest("hex")}function CJe(e,t){let r=[...e].sort((n,s)=>n.path<s.path?-1:n.path>s.path?1:0).map(n=>({path:n.path,content:n.content}));return(0,i$.createHash)("sha256").update(dA(t===void 0?r:{repository:t,files:r}),"utf8").digest("hex")}function IJe(e){let t=(i,o)=>i<o?-1:i>o?1:0,r=[...e.files].sort((i,o)=>t(i.path,o.path)).map(i=>({path:i.path,content:i.content})),n={address:e.address,readyWhen:e.readyWhen,credentials:[...e.credentials].sort(t),revisionSources:e.revisionSources.map(i=>dA({method:i.method,detail:i.detail,components:[...i.components].sort(t)})).sort(t)},s=e.components.map(i=>dA({name:i.name,repository:i.repository})).sort(t);return(0,i$.createHash)("sha256").update(dA({type:"customer_deployed",environment:n,components:s,files:r}),"utf8").digest("hex")}function RJe(e){return(0,i$.createHash)("sha256").update(dA({schemaVersion:e.schemaVersion,settings:e.settings,provenance:e.provenance}),"utf8").digest("hex")}var DR=e=>({provider:e.provider,providerAccountId:e.providerAccountId,providerRepositoryId:e.providerRepositoryId});function Lse(e,t,{statedPins:r=!0}={}){return A5t.parse({schemaVersion:1,runId:e,execution:t.execution(),requester:!0,writeCheck:!0,claudeCodePin:!0,deployedPins:!0,...r?{statedPins:!0}:{},...t.runSettingsFromApp?{runSettings:!0}:{}})}function kJe(e){let t=g5t.parse(e);if(Qse(t.manifest)!==t.manifestHash)throw new Error("The handshake manifest hash does not match its manifest");return t}function $5t(e){let t=s=>s.map(i=>({repository:DR(i.repository),number:i.number,...i.commitSha===void 0?{}:{commitSha:i.commitSha}})),r=e.noTests?{noTests:e.noTests.map(s=>({repository:DR(s.repository),reason:s.reason}))}:{};if(e.status==="delivered")return{status:e.status,...r,pullRequests:t(e.pullRequests)};let n=s=>s.map(i=>({repository:DR(i.repository),message:i.message,...i.branch===void 0?{}:{branch:i.branch},...i.commitSha===void 0?{}:{commitSha:i.commitSha},...i.heldBack===void 0?{}:{heldBack:i.heldBack}}));return e.status==="partial"?{status:e.status,...r,pullRequests:t(e.pullRequests),failures:n(e.failures)}:e.status==="failed"&&e.failures?{...e,...r,failures:n(e.failures)}:{...e,...r}}function Use(e){return e.issues.map(t=>`${t.path.map((n,s)=>typeof n=="number"?`[${n}]`:s===0?n:`.${n}`).join("")}: ${t.message}`).join("; ")}function TJe(e){let{manifest:t}=e;if(o5t.includes(t.trigger.kind))throw new Error(`The report upload is invalid: a ${t.trigger.kind} run uploads its SUT recipe, never a report`);if(t.trigger.kind==="revision_read")throw new Error("The report upload is invalid: a revision_read run uploads what each component runs, never a report");if(e.firstQualification&&!t.baseline?.sources)throw new Error("The report upload is invalid: only a run whose manifest names baseline sources can be a first qualification");let r=aJe.safeParse({schemaVersion:1,run:{runId:t.runId,attemptNumber:e.attemptNumber,manifestHash:Qse(t)},target:{id:t.target.id,revision:t.target.revision},policy:t.policy&&{id:t.policy.id,revision:t.policy.revision},provenance:{sources:e.checkedOut.map(n=>({repository:DR(n.repository),revision:n.revision})),...e.firstQualification?{firstQualification:!0}:{}},delivery:{generatedTests:$5t(e.generatedTests)},producer:e.producer,report:e.report,...e.githubWrites?.length?{githubWrites:e.githubWrites.map(n=>({...n,repository:DR(n.repository)}))}:{}});if(!r.success)throw new Error(`The report upload is invalid: ${Use(r.error)}`);return O5t(r.data,t,e.checkedOut),r.data}function _Je(e,t,r,n,s,i={}){let o=C5t.safeParse({schemaVersion:1,run:{runId:e.runId,attemptNumber:t,manifestHash:Qse(e)},target:{id:e.target.id,revision:e.target.revision},provenance:{sources:r.map(a=>({repository:DR(a.repository),revision:a.revision}))},producer:s,recipe:n,...i.check?{check:i.check}:{},...i.inputs?.length?{inputs:i.inputs}:{}});if(!o.success)throw new Error(`The SUT recipe upload is invalid: ${Use(o.error)}`);return o.data}function O5t(e,t,r){let n=i=>r.find(o=>en(o.repository)===en(i.repository))?.revision??i.revision,s=new Map(t.sources.map(i=>[`${i.repository.namespace}/${i.repository.name}`.toLowerCase(),n(i)]));e.report.validation.acceptedEvidence.forEach((i,o)=>{let a=`report.validation.acceptedEvidence[${o}]`,c=s.get(i.repository.toLowerCase());if(!c)throw new Error(`${a}.repository: ${i.repository} is outside the run's snapshot`);if(i.revision!==c)throw new Error(`${a}.revision: evidence is not from the checked-out revision ${c}`)})}var jse=H(require("path"));var jR=H(require("fs")),Tf=H(require("path"));function qR(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var D5t=8;function tr(e,t,r={}){let n=t.slice(0,D5t),s=t.length-n.length;return{name:e,passed:!1,details:n.join("; ")+(s>0?`; \u2026and ${s} more`:""),...r.fatal?{fatal:!0}:{}}}function ro(e){if(jR.existsSync(e))try{return JSON.parse(jR.readFileSync(e,"utf-8"))}catch{return}}function le(e,t){return ro(Tf.join(e.outputsDir,t))}function on(e,t,r,n){if(!r)throw new Error(`${t}.json unexpectedly invalid at artifact time: ${n[0]}`);let s=Tf.join(e.outputsDir,`${t}.json`);return jR.writeFileSync(s,JSON.stringify(r,null,2)+`
|
|
183
183
|
`),{[t]:Tf.relative(e.runDir,s)}}function Po(e,t){return{name:e,verify(r,n){let{errors:s}=t(r,n);return s.length===0?{name:this.name,passed:!0}:tr(this.name,s,{fatal:!0})}}}function eu(e,t){return Tf.relative(e,Tf.resolve(e,t)).replace(/\/+$/,"")}function p$(e){return e.replace(/\s+/g," ").trim()}function Sv(e){return Tf.basename(e).replace(/\.[^.]+$/,"").toLowerCase()}function Om(e,t){let r=e.trim().replace(/^\.\//,""),n=t.trim().replace(/^\.\//,"");return r===n||r.endsWith(`/${n}`)||n.endsWith(`/${r}`)}function Kz(e,t){return(e.match(/[\w.@-]+(?:\/[\w.@-]+)*\.\w+/g)??[]).some(r=>Om(r,t))}var Ku=new RegExp("(^|/)("+["test_[^/]+\\.py","[^/]+_test\\.py","[^/]+\\.(spec|test)\\.[cm]?[jt]sx?","[^/]+\\.e2e-(spec|test)\\.[cm]?[jt]sx?","[^/]+_test\\.go","[^/]+Tests?\\.(java|kts?)","[^/]+_(test|spec)\\.rb","[^/]+\\.feature","[^/]+Tests?\\.cs","[^/]+_test\\.rs","tests/[^/]+\\.rs","[^/]+Test\\.php","[^/]+(Test|Spec|Suite)\\.scala","[^/]+Tests?\\.swift","[^/]+_test\\.exs","[^/]+_test\\.dart","[^/]+_test\\.(c|cc|cpp|cxx)","test_[^/]+\\.(c|cc|cpp|cxx)","[^/]+(Spec|Test)\\.groovy"].join("|")+")$","i");function zR(e){if(!e.inputs.skyrampMcp?.command)return!1;for(let t of Object.values(e.state.stages))for(let r of t.attempts??[]){let n=r.mcpServers?.skyramp;if(n!==void 0&&n!=="connected")return!1}return!0}var qse="outputs/preflight.json",Dm="pr-diff.txt",zse="related-diffs";function Zz(e){return jse.join(zse,`${e.toLowerCase().replace(/\//g,"__").replace(/[^a-z0-9._-]/g,"_")}.diff`)}function Zu(e,t){return[...e.changedFiles.map(r=>({repository:t,path:r.path,...r.status?{status:r.status}:{}})),...(e.relatedChanges??[]).flatMap(r=>r.changedFiles.map(n=>({repository:r.repository,path:n.path,...n.status?{status:n.status}:{}})))]}function f$(e,t,r){return e.some(n=>n.path===r&&n.repository.toLowerCase()===t.toLowerCase())}function an(e){if(e.outputsDir)return ro(jse.join(e.outputsDir,"preflight.json"))}var rG=H(require("fs")),En=H(require("path"));var eG=H(require("fs")),GR=H(require("path"));var hA="ci-evidence.json";function h$(e){return e.map(t=>`${t.repository}@${Lr(t.revision)}`).join(", ")}var Xz=(e,t)=>yt(t,{cwd:e,encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim(),M5t=/^Merge ([0-9a-f]{40}) into [0-9a-f]{40}$/;function F5t(e){try{let t=Xz(e,["rev-parse","HEAD"]);if(Xz(e,["rev-list","--parents","-n","1","HEAD"]).split(/\s+/).slice(1).length===2){let n=M5t.exec(Xz(e,["log","-1","--format=%s","HEAD"]));if(n)return n[1]}return t}catch{return}}function tG(e){let t="";try{t=Xz(e,["remote","get-url","origin"])}catch{}let r=/[:/]([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?\/?$/.exec(t);return r&&!t.startsWith("/")&&!t.startsWith(".")?`${r[1]}/${r[2]}`:`local/${GR.basename(GR.resolve(e)).replace(/[^A-Za-z0-9._-]/g,"-")||"repo"}`}var Q5t=new Set(Object.values(cA));function L5t(e){let t=[];for(let r of e??[]){let n=r.trim();if(!n)continue;let s=n.lastIndexOf("="),i=s>0?n.slice(s+1).trim():"",o=Q5t.has(i),c=(o?n.slice(0,s).trim():n).split("*").map(u=>u.replace(/[.+?^${}()|[\]\\]/g,"\\$&")).join(".*");t.push({pattern:new RegExp(`^${c}$`,"i"),kind:o?i:"ci_check"})}return t}var U5t=new Set(["failure","timed_out","action_required","error","startup_failure"]);function NJe(e,t){let r=new Map(t.revisions.map(s=>[s.repository.toLowerCase(),s])),n=[];for(let s of e){if(s.name.startsWith(Mi))continue;let i=r.get((s.repository??t.primary).toLowerCase());if(!i)continue;let o=t.trusted.find(u=>u.pattern.test(s.name)),a=s.conclusion??s.status,c=o?s.headSha.toLowerCase()!==i.revision.toLowerCase()?"stale":s.status!=="completed"?"pending":s.conclusion==="success"?"accepted":U5t.has(s.conclusion??"")?"failing":"inconclusive":"untrusted";n.push({id:`ci-${n.length+1}`,repository:i.repository,revision:i.revision,checkSha:s.headSha,name:s.name,kind:o?.kind??"ci_check",status:c,conclusion:a,reference:s.url||`${i.repository}@${s.headSha.slice(0,12)} ${s.name}`,summary:(s.summary||`${s.name}: ${a}`).slice(0,300)})}return n}var j5t=b.object({checks:b.array(b.object({repository:b.string().optional(),name:b.string().min(1),headSha:b.string().regex(/^[0-9a-f]{40}$|^[0-9a-f]{64}$/i),status:b.string().default("completed"),conclusion:b.string().nullable().optional(),url:b.string().optional(),summary:b.string().optional()}))});function q5t(e){let t=j5t.safeParse(JSON.parse(eG.readFileSync(e,"utf-8")));if(!t.success)throw new Error(`${e} is not a CI evidence file: ${t.error.issues[0]?.message??"invalid"}`);return t.data.checks}function z5t(e){let t=[{path:e.inputs.repositoryPath,slug:e.inputs.repositorySlug},...(e.inputs.relatedRepos??[]).map(n=>({path:n.path,slug:n.slug}))],r=[];for(let n of t){let s=F5t(n.path);s&&r.push({repository:n.slug??tG(n.path),revision:s})}return r}async function PJe(e){let t=z5t(e),r=t[0]?.repository??tG(e.inputs.repositoryPath),n=L5t(e.inputs.trustedChecks),s;try{if(e.inputs.ciEvidenceFile){let i=q5t(e.inputs.ciEvidenceFile);s={source:"file",revisions:t,items:NJe(i,{revisions:t,primary:r,trusted:n})}}else if(e.platform?.listCommitChecks){let i=[],o=[],a=[];for(let l of t){let d=`${l.repository}@${l.revision.slice(0,12)}`,p=await e.platform.listCommitChecks(l);p&&p.failure===void 0?i.push(...p.records):o.push({...l,...p?.failure?{cause:p.failure}:{}});for(let f of p?.unreadSources??[])a.push(`${f} could not be read for ${d}`)}let c=o.length>1?"them":"it",u=[...o.length?[`CI results could not be read for ${h$(o)}, so no CI evidence was available for ${c}`]:[],...a];s={source:"platform",revisions:t,items:NJe(i,{revisions:t,primary:r,trusted:n}),...o.length?{unavailable:o}:{},...u.length?{note:u.join("; ")}:{}}}else s={source:"none",revisions:t,items:[],note:"this platform keeps no CI results"}}catch(i){s={source:"none",revisions:t,items:[],note:`CI results could not be read: ${i instanceof Error?i.message:String(i)}`}}return s.items.length>0&&n.length===0&&(s.note=[s.note,"no trustedChecks were configured, so no CI result counts as evidence"].filter(Boolean).join("; ")),eG.writeFileSync(GR.join(e.outputsDir,hA),JSON.stringify(s,null,2)+`
|
|
184
184
|
`),s}var Mm=8e3,Gse=new Map;function $Je(e){return e.repositorySlug?e.repositorySlug:(Gse.has(e.repositoryPath)||Gse.set(e.repositoryPath,tG(e.repositoryPath)),Gse.get(e.repositoryPath))}function pt(e){return[{slug:$Je(e),path:e.repositoryPath,writable:!0,working:!0},...(e.relatedRepos??[]).map(t=>({slug:t.slug,path:t.path,writable:t.writable===!0,working:!1}))]}function jn(e){return pt(e)[0]}function nG(e,t){return Hse(pt(e),t)}function Hse(e,t){return[...e].sort((r,n)=>n.path.length-r.path.length).find(r=>{let n=En.relative(r.path,t);return!n.startsWith("..")&&!En.isAbsolute(n)})}var Ur=(e,t)=>e.toLowerCase()===t.toLowerCase();function os(e,t){return`${e?.trim().toLowerCase()??""}\0${En.posix.normalize(t.trim().replace(/^\.\//,""))}`}function mA(e,t){return t?.trim()?e.find(r=>Ur(r.slug,t.trim())):e[0]}function BJe(e,t){return t?e.find(r=>Ur(r.slug,t)):void 0}function Ht(e,t){return mA(pt(e),t)}var OJe=(e,t)=>`${t} is not a repository of this run (${pt(e).map(r=>r.slug).join(", ")})`;function _f(e,t){let r=Ht(e,t);if(!r)throw new Error(OJe(e,t));return r.path}function sp(e,t){let r=Ht(e,t);return r?r.writable?{source:r}:{error:`${r.slug} is read-only in this run: tests are written only to ${pt(e).filter(n=>n.writable).map(n=>n.slug).join(", ")}`}:{error:OJe(e,t)}}function Qt(e,t){return m$(pt(e),t)}var HR=e=>En.basename(En.resolve(e.path));function Bo(e,t,r){let n=e.relatedRepos??[],s=c=>n.filter(u=>HR(u)===c).length;if(!t||!BJe(n,t)&&Ur(t,$Je(e)))return s(r.split("/")[0])?En.join(En.resolve(e.repositoryPath),r):r;let o=BJe(n,t);if(!o)return r;let a=HR(o);return s(a)>1||rG.existsSync(En.join(e.repositoryPath,a))?En.join(En.resolve(o.path),r):`${a}/${r}`}function m$(e,t){return e.length<2?"":`${mA(e,t)?.slug??t}: `}function xv(e,t,r){let n=e.testPlacements?.find(s=>s.testType===r&&Ur(s.repository,t));return n&&(En.posix.normalize(n.directory.trim()).replace(/\/+$/,"")||".")}function Fm(e,t){return pt(e).flatMap(r=>{let n=r.writable?xv(e,r.slug,t):void 0;return n?[{...r,dir:n}]:[]})}function Vse(e){return Rz(e)?void 0:`test type "${e}" is not one this engine places (${lse.join(", ")})`}function Wse(e){let t=e.trim();if(!t||En.isAbsolute(t)||t.split(/[\\/]/).includes(".."))return`directory "${e}" is not inside the repository`}function DJe(e){return(e.testPlacements??[]).flatMap(t=>{let r=G5t(e,t);return r?[`${t.testType} tests in ${t.repository} go in ${t.directory}: ${r}`]:[]})}function G5t(e,t){let r=Vse(t.testType)??Wse(t.directory);if(r)return r;let n=sp(e,t.repository);return"error"in n?n.error:void 0}function MJe(e){return(e.relatedRepos??[]).map(t=>t.path)}function FJe(e){let t=pt(e);if(t.length<2)return[];let r=n=>n.working?"your working directory; writable":n.writable?"writable":"read-only: read it, never write a test there";return["",`This run has ${t.length} checkouts, and none is primary. Every test, maintained test and result lives in exactly one of`,'them: name it by "repository" (owner/repo), with its path relative to that checkout. Place a test in the',"checkout whose test tree it belongs to, which need not be the checkout the change is in.",...t.map(n=>` - ${n.slug}: ${n.path} (${r(n)})`)]}function VR(e){return e.pullRequest?`the description of ${e.pullRequest}`:e.repository?`the description of the related PR in ${e.repository}`:"the PR description"}function WR(e){let t=(e.pullRequests??[]).flatMap(n=>n.body?.trim()?[{pullRequest:`${n.repository}#${n.number}`,body:n.body}]:[]),r=e.prDescription;return r?.trim()&&!t.some(n=>n.body.trim()===r.trim())?[{body:r},...t]:t}function Nf(e){return[...WR(e),...(e.relatedRepos??[]).map(t=>({repository:t.slug,body:t.prDescription??""}))]}var Jse=e=>e?`(the first ${Mm.toLocaleString("en-US")} characters; the whole description is in ${e}: read it)`:`(cut at ${Mm.toLocaleString("en-US")} characters)`;function Cv(e,t=new Map){let r={label:"PR",title:e.prTitle,body:e.prDescription?.trim(),cut:!1,note:void 0},n=e.pullRequests?.length?[...e.pullRequests.map(a=>({label:`${a.repository}#${a.number}`,title:a.title,body:a.body?.trim().slice(0,Mm),cut:(a.body?.trim().length??0)>Mm,note:a.note})),...WR(e).some(a=>!a.pullRequest)?[r]:[]]:r.title||r.body?[r]:[];if(n.length===0)return["","No pull request describes this change."];let s=`This change is ${n.length} pull requests. Read every description: each states part of what the change must do.`;return["",...e.pullRequests?.length||!e.relatedRepos?.length?[n.length>1?s:"This change is 1 pull request. Read its description: it states what the change must do."]:[],...n.flatMap(a=>[`--- ${[a.label,a.title].filter(Boolean).join(": ")} ---`,a.note?`(${a.note})`:a.body||"(no description)",...a.cut?[Jse(t.get(a.label))]:[]])]}function ni(e,t){let r=e.relatedRepos??[];if(En.isAbsolute(t)){let a=r.find(c=>t.startsWith(En.resolve(c.path)+En.sep));return a?{file:En.relative(En.resolve(a.path),t),repository:a.slug}:{file:En.relative(En.resolve(e.repositoryPath),t)}}let n=t.replace(/^\.\//,"");if(rG.existsSync(En.resolve(e.repositoryPath,n)))return{file:n};let s=n.split("/")[0],i=n.slice(s.length+1),o=r.find(a=>En.basename(En.resolve(a.path))===s&&rG.existsSync(En.join(a.path,i)));return o?{file:i,repository:o.slug}:{file:n}}var H5t={focused:"Focused",impacted_critical:"Impacted and critical",broad:"Broad"},V5t=e=>Object.values(kz).includes(e),Yse=e=>e.trigger.kind==="schedule"||e.baseline?.sources!==void 0;function QJe(e,t,r=!1){if(!Yse(e))return;let n=t?.policy,s=n&&typeof n=="object"?n.depth:void 0;return{depth:V5t(s)?s:null,confirmedRunId:e.baseline?.confirmedRunId??null,initialBaselineId:e.baseline?.initialBaselineId??null,...e.baseline?.comparisonBaselineId?{comparisonBaselineId:e.baseline.comparisonBaselineId,knownFailures:e.baseline.knownFailures??[]}:{},...r?{firstQualification:r}:{}}}var Pn=e=>!!e.inputs?.scheduledValidation?.comparisonBaselineId;function g$(e,t){return Zu(e,t).length+(e.relatedChanges??[]).filter(r=>r.note).length}var LJe=e=>e.confirmedRunId===null&&e.initialBaselineId===null,Iv=e=>!!(e&&(e.firstQualification||!e.comparisonBaselineId&&LJe(e))),sG='This run has no earlier state to compare with, so it cannot tell which defects are new. Below, "the change" means the code checked out now.';function iG(e,t){return e.comparisonBaselineId?"chosen_comparison":LJe(e)?"first_qualification":t>0?"delta":"unchanged"}var Rv="nothing changed since the baseline, so there is nothing to validate";function UJe(e){return e?.sufficiency==="no_change"}function jJe(e){let t=e.baseline;if(t?.comparisonBaselineId||!Yse(e)||!t?.sources||t.confirmedRunId===null&&t.initialBaselineId===void 0)return!1;let r=new Map(t.sources.map(n=>[en(n.repository),n.revision]));return e.sources.length>0&&e.sources.every(n=>r.get(en(n.repository))===n.revision)}function Kse(e,t){return e!==void 0&&iG(e,t)==="unchanged"}var kv=e=>(e.sharedEnvironment?.components.length??0)>0;function Tv(e){let t=an(e);return!kv(e.inputs)&&t!==void 0&&Kse(e.inputs.scheduledValidation,g$(t,jn(e.inputs).slug))}function qJe(e,t){return`No changes since ${e.confirmedRunId?`the Confirmed Baseline (run ${e.confirmedRunId})`:"the Initial Baseline"}: no file changed in ${t.join(", ")}. The Change Set is empty, so there was nothing to validate; Testbot ran no test and wrote none.`}function W5t(){throw new Error(`a scheduled run with no change since its baseline has no frame: ${Rv}`)}var J5t=e=>e.depth?` at depth ${H5t[e.depth]}`:"",zJe=e=>e.confirmedRunId?`the Confirmed Baseline (run ${e.confirmedRunId})`:"the Initial Baseline (the heads saved without a run when the schedule was turned on or its setup changed; it was never validated, so do not assume its code works)",Y5t="Sweep the configured scope instead of a diff: every repository of the run, its public surface (endpoints, screens, exported functions) and its existing test suites, and list the behaviors they establish, so triage can plan evidence for them. A finding here is a latent defect of the current state.",K5t=e=>[`No changes since ${zJe(e)}. There is no new change to validate. Check that the deployed environment still works under the policy's evidence rules: use its existing runtime tests and public behavior, not the revision read as health evidence. Never claim success merely because nothing changed.`,Zse];var Zse="Plan evidence for the behaviors analyze found: run the existing suites (existing_unit), accept current approved CI evidence, and bring up the SUT only where only runtime evidence will do. The existing suites run under runtime_required too. A run that obtains no evidence validated nothing.";function GJe(e,t,r=!1){switch(iG(e,t)){case"chosen_comparison":return Z5t(e);case"first_qualification":return["Scheduled validation, first qualification: the policy has no Confirmed Baseline yet. Validate the configured scope broadly; this run's success becomes the Confirmed Baseline.",Zse];case"delta":return[`Scheduled validation${J5t(e)}: the files below changed since ${zJe(e)}, across every source. Judge the evidence the policy needs for them, at its depth, as for any change.`];case"unchanged":return r?K5t(e):W5t()}}function Z5t(e){return[e.firstQualification?`The user-selected comparison checkpoint (${e.comparisonBaselineId}) is unavailable as a diff base: the checkout does not contain it. This is a full qualification with no baseline comparison, not a review of the delta from that checkpoint. Validate the configured scope and retest its known failures; the checkpoint is not proof of successful validation.`:`This run compares with a user-selected comparison checkpoint (${e.comparisonBaselineId}), not proof of successful validation. Review the delta and validate the configured scope even when no file changed. Known failures must still be tested: changing the comparison point never waives them, and only passing evidence can establish their resolution.`,Y5t,Zse]}var itt=H(require("fs")),the=H(require("path"));var y$=H(require("fs")),ip=H(require("path"));var HJe=H(require("fs")),oG=H(require("path"));function gA(e,t,r={}){let n=r.maxDepth??1/0,s=!1,i=(o,a)=>{let c;try{c=HJe.readdirSync(o,{withFileTypes:!0})}catch{return}for(let u of c){if(s)return;let l=oG.join(o,u.name);if(u.isDirectory())!r.skip?.has(u.name)&&a<n&&i(l,a+1);else if(t(l,oG.relative(e,l))===!1){s=!0;return}}};i(e,0)}var X5t=4,yA="\xABredacted\xBB";function qn(e){let t=new Set;for(let r of e){let n=(r??"").trim();n.length>=X5t&&t.add(n)}return[...t].sort((r,n)=>n.length-r.length)}function eZt(e){return e.replace(/AUTHORIZATION: (basic|bearer) \S+/gi,"AUTHORIZATION: $1 ***").replace(/x-access-token:[^@\s]+@/gi,"x-access-token:***@")}function Pf(e){return e.replace(/(https?:\/\/)[^\s/@]+@/gi,"$1[redacted]@")}function Xt(e,t){if(!e||t.length===0)return e;let r=e;for(let n of t)!n||!r.includes(n)||(r=r.split(n).join(yA));return r}function aG(e,t,r){let n=e;for(let s of[...new Set(t.filter(Boolean))].sort((i,o)=>o.length-i.length))n=n.split(s).join("*".repeat(s.length));return n.slice(-r)}function VJe(e){let t=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=e.flatMap(s=>{let i=new URL("https://example.invalid");i.username=s,i.password=s;let o=encodeURIComponent(s.toWellFormed()),a=new URL("https://example.invalid");a.search=`?value=${s}`;let c=new URL("https://example.invalid");return c.pathname=`/${s}`,[s,o,encodeURI(s.toWellFormed()),new URLSearchParams({value:s}).toString().slice(6),i.username,i.password,a.search.slice(7),c.pathname.slice(1)]}),n=[];for(let s of[...new Set(r)].filter(Boolean).sort((i,o)=>o.length-i.length)){let i=Array.from(s).map(o=>/[a-zA-Z0-9_%]/.test(o)?o:`\\${o}`).join("").replace(/%([0-9a-fA-F]{2})/g,(o,a)=>`%${Array.from(a).map(c=>/[a-fA-F]/.test(c)?`[${c.toLowerCase()}${c.toUpperCase()}]`:c).join("")}`);n.push(new RegExp(i,"g"))}for(let s of[...e].filter(Boolean).sort((i,o)=>o.length-i.length)){let i=Array.from(s,o=>{let a=[...Buffer.from(o)].map(u=>"%"+u.toString(16).padStart(2,"0").replace(/[a-f]/g,d=>`[${d}${d.toUpperCase()}]`)).join(""),c=[t(o),a];return o===" "&&c.push("\\+"),`(?:${c.join("|")})`}).join("");n.push(new RegExp(i,"g"))}return s=>{let i=s;for(let o of n)i=i.replace(o,()=>yA);return i}}function aa(e,t){return!e||!t.length?e:VJe(t)(e)}function Bf(e,t){return t.length?Xse(e,VJe(t)):e}function Zl(e,t){return Xt(eZt(e),t)}function Xse(e,t){let r=n=>typeof n=="string"?t(n):Array.isArray(n)?n.map(r):n&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([s,i])=>[s,r(i)])):n;return r(e)}function vn(e,t){return t.length===0?e:Xse(e,r=>Xt(r,t))}function WJe(e,t){return Xse(e,r=>Zl(r,t))}function tZt(e,t){return/\.(json|txt|md)$/.test(e)||t&&e.endsWith(".ndjson")}var JJe=new Set;function YJe(e){JJe.add(ip.resolve(e))}function KJe(e,t){let r=[];return gA(e,n=>{try{if(ip.relative(e,n).split(ip.sep).includes("data-safety")&&/^dataSafetyLedger-.*\.json$/.test(ip.basename(n)))return;!JJe.has(ip.resolve(n))&&tZt(ip.basename(n),t)&&y$.lstatSync(n).isFile()&&r.push(n)}catch{}}),r}var mgn=new TextDecoder("utf-8",{fatal:!0});function as(e,t=[]){let r=e.trim();if(!r)return{error:"session produced no output"};let n=c=>{try{let u=JSON.parse(c);return typeof u=="object"&&u!==null&&!Array.isArray(u)?u:void 0}catch{return}},s=n(r);if(s!==void 0)return{value:s};let i;if(r.startsWith("{")&&r.endsWith("}"))try{JSON.parse(r)}catch(c){i=c instanceof Error?c.message:String(c)}let o=[...r.matchAll(/```(?:json)?\s*\n([\s\S]*?)```/g)];for(let c=o.length-1;c>=0;c--){let u=n(o[c][1].trim());if(u!==void 0)return{value:u}}let a;for(let c=r.indexOf("{");c!==-1;c=r.indexOf("{",c+1)){let u=0,l=!1,d=!1;for(let p=c;p<r.length;p++){let f=r[p];if(d){d=!1;continue}if(f==="\\"){d=l;continue}if(f==='"'){l=!l;continue}if(!l){if(f==="{")u++;else if(f==="}"&&(u--,u===0)){let h=n(r.slice(c,p+1));h!==void 0&&Object.keys(h).length>0&&(a=h,c=p);break}}}}return i&&(a===void 0||Object.keys(a).length<3)?{error:`final message is not valid JSON \u2014 ${i}. Most often an unescaped double quote inside a string (e.g. in "summary" or "evidence"): escape it as \\" or use single quotes in prose`}:a!==void 0?{value:a}:i?{error:`final message is not valid JSON \u2014 ${i}. Most often an unescaped double quote inside a string (e.g. in "summary" or "evidence"): escape it as \\" or use single quotes in prose`}:{error:`no parseable JSON object found in session output \u2014 the final message was: "${rZt(Xt(r,t))}"`}}var ZJe=240;function rZt(e){let t=e.replace(/\s+/g," ").trim();return t.length<=ZJe?t:`\u2026${t.slice(-ZJe)}`}function op(e,t=0,r=new Set){return A$(e,t,r)}var XJe=e=>" ".repeat(e);function A$(e,t,r){let n=nZt(e);switch(n._def.typeName){case"ZodObject":{let i=n.shape,o=Object.keys(i).filter(c=>!r.has(c)&&!i[c].description?.startsWith("[derived]"));return o.length===0?"{}":`{
|
|
185
185
|
${o.map((c,u)=>{let l=i[c],d=l.isOptional()?" (optional)":"",p=l.description?` // ${l.description}`:"",f=A$(l,t+2,r);return`${XJe(t+2)}"${c}": ${f}${u<o.length-1?",":""}${d}${p}`}).join(`
|