@github/copilot-linuxmusl-x64
Advanced tools
@@ -20,3 +20,3 @@ # NOTE: If you edit this agent, also update code-review.split.agent.yaml — the | ||
| prompt: | | ||
| You are a code review agent with an extremely high bar for feedback. Your guiding principle: finding your feedback should feel like finding a $20 bill in your jeans after doing laundry - a genuine, delightful surprise. Not noise to wade through. | ||
| You are a code review agent with an extremely high bar for feedback. Your guiding principle: finding your feedback should feel like finding a $20 bill in your jeans after doing laundry - a genuine, delightful surprise. Not noise to wade through. You should generally perform the code review yourself, delegating to additional code-review subagents only when the request explicitly calls for multiple reviewers or the scope clearly benefits from parallel review. | ||
@@ -23,0 +23,0 @@ **Environment Context:** |
@@ -24,3 +24,3 @@ # Cache-optimized ("split") variant of code-review.agent.yaml. | ||
| prompt: | | ||
| You are a code review agent with an extremely high bar for feedback. Your guiding principle: finding your feedback should feel like finding a $20 bill in your jeans after doing laundry - a genuine, delightful surprise. Not noise to wade through. | ||
| You are a code review agent with an extremely high bar for feedback. Your guiding principle: finding your feedback should feel like finding a $20 bill in your jeans after doing laundry - a genuine, delightful surprise. Not noise to wade through. You should generally perform the code review yourself, delegating to additional code-review subagents only when the request explicitly calls for multiple reviewers or the scope clearly benefits from parallel review. | ||
@@ -27,0 +27,0 @@ **File paths:** |
@@ -20,3 +20,3 @@ # NOTE: If you edit this agent, also update security-review.split.agent.yaml — the | ||
| prompt: | | ||
| You are a senior security engineer conducting a thorough security review of code changes. | ||
| You are the security-review subagent, acting as a senior security engineer conducting a thorough security review of code changes. Perform the requested security review yourself. If the request asks to use or call security-review, that instruction has already been fulfilled by launching you; do not hand the same review to another security-review subagent. Only delegate independently scoped work when the request explicitly calls for multiple reviewers. | ||
@@ -23,0 +23,0 @@ **Environment Context:** |
@@ -24,3 +24,3 @@ # Cache-optimized ("split") variant of security-review.agent.yaml. | ||
| prompt: | | ||
| You are a senior security engineer conducting a thorough security review of code changes. | ||
| You are the security-review subagent, acting as a senior security engineer conducting a thorough security review of code changes. Perform the requested security review yourself. If the request asks to use or call security-review, that instruction has already been fulfilled by launching you; do not hand the same review to another security-review subagent. Only delegate independently scoped work when the request explicitly calls for multiple reviewers. | ||
@@ -27,0 +27,0 @@ **File paths:** |
+7
-7
@@ -9,8 +9,8 @@ #!/usr/bin/env node | ||
| var Ve=Object.create;var B=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var M=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var x=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var Ge=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of je(r))!qe.call(e,o)&&o!==t&&B(e,o,{get:()=>r[o],enumerable:!(n=Ue(r,o))||n.enumerable});return e};var Ke=(e,r,t)=>(t=e!=null?Ve(We(e)):{},Ge(r||!e||!e.__esModule?B(t,"default",{value:e,enumerable:!0}):t,e));var X=x((Jr,z)=>{"use strict";var Y=()=>process.platform==="linux",C=null,Ze=()=>{if(!C)if(Y()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,C=process.report.getReport(),process.report.excludeNetwork=e}else C={};return C};z.exports={isLinux:Y,getReport:Ze}});var Z=x((Yr,Q)=>{"use strict";var y=M("fs"),er="/usr/bin/ldd",rr="/proc/self/exe",L=2048,tr=e=>{let r=y.openSync(e,"r"),t=Buffer.alloc(L),n=y.readSync(r,t,0,L,0);return y.close(r,()=>{}),t.subarray(0,n)},nr=e=>new Promise((r,t)=>{y.open(e,"r",(n,o)=>{if(n)t(n);else{let i=Buffer.alloc(L);y.read(o,i,0,L,0,(s,a)=>{r(i.subarray(0,a)),y.close(o,()=>{})})}})});Q.exports={LDD_PATH:er,SELF_PATH:rr,readFileSync:tr,readFile:nr}});var re=x((zr,ee)=>{"use strict";var or=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;let r=e.readUInt32LE(32),t=e.readUInt16LE(54),n=e.readUInt16LE(56);for(let o=0;o<n;o++){let i=r+o*t;if(e.readUInt32LE(i)===3){let a=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(a,a+h).toString().replace(/\0.*$/g,"")}}return null};ee.exports={interpreterPath:or}});var xe=x((Xr,ve)=>{"use strict";var ne=M("child_process"),{isLinux:b,getReport:oe}=X(),{LDD_PATH:S,SELF_PATH:ie,readFile:w,readFileSync:I}=Z(),{interpreterPath:se}=re(),u,f,d,ae="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",ce=()=>m||new Promise(e=>{ne.exec(ae,(r,t)=>{m=r?" ":t,e(m)})}),le=()=>{if(!m)try{m=ne.execSync(ae,{encoding:"utf8"})}catch{m=" "}return m},p="glibc",ue=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,g="musl",ir=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),fe=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?p:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(ir)?g:null},de=e=>{let[r,t]=e.split(/[\r\n]+/);return r&&r.includes(p)?p:t&&t.includes(g)?g:null},pe=e=>{if(e){if(e.includes("/ld-musl-"))return g;if(e.includes("/ld-linux-"))return p}return null},me=e=>(e=e.toString(),e.includes("musl")?g:e.includes("GNU C Library")?p:null),sr=async()=>{if(f!==void 0)return f;f=null;try{let e=await w(S);f=me(e)}catch{}return f},ar=()=>{if(f!==void 0)return f;f=null;try{let e=I(S);f=me(e)}catch{}return f},cr=async()=>{if(u!==void 0)return u;u=null;try{let e=await w(ie),r=se(e);u=pe(r)}catch{}return u},lr=()=>{if(u!==void 0)return u;u=null;try{let e=I(ie),r=se(e);u=pe(r)}catch{}return u},ge=async()=>{let e=null;if(b()&&(e=await cr(),!e&&(e=await sr(),e||(e=fe()),!e))){let r=await ce();e=de(r)}return e},he=()=>{let e=null;if(b()&&(e=lr(),!e&&(e=ar(),e||(e=fe()),!e))){let r=le();e=de(r)}return e},ur=async()=>b()&&await ge()!==p,fr=()=>b()&&he()!==p,dr=async()=>{if(d!==void 0)return d;d=null;try{let r=(await w(S)).match(ue);r&&(d=r[1])}catch{}return d},pr=()=>{if(d!==void 0)return d;d=null;try{let r=I(S).match(ue);r&&(d=r[1])}catch{}return d},ye=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},te=e=>e.trim().split(/\s+/)[1],be=e=>{let[r,t,n]=e.split(/[\r\n]+/);return r&&r.includes(p)?te(r):t&&n&&t.includes(g)?te(n):null},mr=async()=>{let e=null;if(b()&&(e=await dr(),e||(e=ye()),!e)){let r=await ce();e=be(r)}return e},gr=()=>{let e=null;if(b()&&(e=pr(),e||(e=ye()),!e)){let r=le();e=be(r)}return e};ve.exports={GLIBC:p,MUSL:g,family:ge,familySync:he,isNonGlibcLinux:ur,isNonGlibcLinuxSync:fr,version:mr,versionSync:gr}});import Dr from"node:module";import{dirname as $r,join as Br}from"node:path";import*as Me from"node:sea";import{fileURLToPath as Mr,pathToFileURL as R}from"node:url";import{basename as hr,join as A}from"node:path";var V="0.0.1";import{readdir as Je,access as Ye,constants as ze}from"node:fs/promises";import{join as c,basename as U}from"node:path";import{homedir as E}from"node:os";function W(){return process.env.XDG_CACHE_HOME||c(E(),".cache")}function q(){if(process.argv.includes("--no-auto-update")||process.argv.includes("--prefer-version"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function G(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function Xe(){if(process.platform==="darwin")return c(E(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||c(E(),".cache");return c(e,"copilot")}return c(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(c(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(c(Xe(),"pkg")),e.push(c(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(c(process.env.COPILOT_HOME,"pkg")),e.push(c(E(),".copilot","pkg")),[...new Set(e)]}function j(e){let r=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(r)return[Number(r[1]),Number(r[2]),Number(r[3])]}function Qe(e,r){let t=j(e),n=j(r);if(!t&&!n)return 0;if(!t)return-1;if(!n)return 1;for(let s=0;s<3;s++)if(t[s]!==n[s])return t[s]-n[s];let o=e.includes("-"),i=r.includes("-");return o!==i?o?-1:1:e.localeCompare(r)}async function J(e,...r){let t=[];for(let n of r){let o;try{o=await Je(n)}catch{continue}for(let i of o){let s=c(n,i);try{await Ye(c(s,e),ze.R_OK),t.push(s)}catch{continue}}}return t.sort((n,o)=>{let i=Qe(U(o),U(n));return i!==0?i:n.localeCompare(o)}),t}import{join as Ce}from"node:path";var P=Ke(xe(),1);function T(e={}){return(e.platform??process.platform)!=="linux"?"gnu":(e.detectLibcFamily??P.familySync)()===P.MUSL?"musl":"gnu"}function N(e=process.platform,r){let t=r??(e==="linux"?T():"gnu");return e==="linux"&&t==="musl"?"linuxmusl":e}function Ee(e=process.platform,r,t=process.arch){return`${N(e,r)}-${t}`}function Le(){let e=Ee();return K().flatMap(r=>[Ce(r,"universal"),Ce(r,e)])}function yr(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.70"}async function Se(e,r){let t=A(e,"app.js"),n=yr()===V,o=G();if(r&&(o||q()&&!n)){let i=Le(),s=await J("app.js",...i);if(o){let a=s.find(h=>hr(h)===o);a?t=A(a,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version | ||
| `)}else s.length>0&&(t=A(s[0],"app.js"))}return t}import{existsSync as br}from"node:fs";import{basename as vr,resolve as xr}from"node:path";var Pe="extension_bootstrap.mjs";function Te(e,r,t=br){let n=e.find(s=>vr(s)===Pe);if(!n)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${r}, argv-bootstrap=${n} | ||
| `);let o=xr(r,"preloads",Pe),i=t(o);if(process.stderr.write(`[extension-fork] resolveBootstrapPath: localBootstrap=${o}, localExists=${i} | ||
| `),i)return o}var Er=new Set(["--server","--headless","--acp","--embedded-host"]),Cr=new Set(["completion","help","init","login","mcp","plugin","update","version"]);function Lr(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function Sr(e){if(e.some(t=>Er.has(t)||Lr(t)))return!0;let r=e.find(t=>!t.startsWith("-"));return r!==void 0&&Cr.has(r)}function Oe(e){return!Sr(e)}var Pr="github.copilot.cli.typeahead.capture",_e=Symbol.for(Pr);function F(){let e=globalThis,r=e[_e];return r||(r={buffer:[],capturing:!1,listener:null,exitHandler:null},e[_e]=r),r}var H=class{detachListener(r){r.listener&&(process.stdin.removeListener("data",r.listener),r.listener=null)}clearExitHandler(r){r.exitHandler&&(process.removeListener("exit",r.exitHandler),r.exitHandler=null)}start(){let r=F();if(!process.stdin.isTTY||typeof process.stdin.setRawMode!="function"||r.capturing)return;try{process.stdin.setRawMode(!0)}catch{return}if(!r.exitHandler){let n=()=>{if(r.capturing)try{process.stdin.setRawMode(!1)}catch{}};r.exitHandler=n,process.once("exit",n)}let t=n=>{if(n.length===1&&n[0]===3){this.dispose(),process.kill(process.pid,"SIGINT");return}r.buffer.push(Buffer.from(n))};r.listener=t,process.stdin.on("data",t),process.stdin.unref(),r.capturing=!0}drain(){let r=F();if(this.detachListener(r),this.clearExitHandler(r),r.capturing=!1,r.buffer.length===0)return null;let t=Buffer.concat(r.buffer);return r.buffer=[],t}dispose(){let r=F();if(this.detachListener(r),this.clearExitHandler(r),r.buffer=[],!!r.capturing){try{process.stdin.setRawMode(!1)}catch{}process.stdin.pause(),r.capturing=!1}}},we=new H;import ke from"node:path";import{fileURLToPath as kr}from"node:url";function Tr(e){if(e.includes("<!DOCTYPE")||e.includes("<html")){let r=Math.min(e.indexOf("<!DOCTYPE")!==-1?e.indexOf("<!DOCTYPE"):1/0,e.indexOf("<html")!==-1?e.indexOf("<html"):1/0),t=e.substring(0,r).trim();return t?`${t} [HTML error page omitted]`:"[HTML error page omitted]"}return e}function Ie(e){let r;if(e instanceof Error)r=String(e);else if(typeof e=="object"&&e!==null)try{r=JSON.stringify(e)??"[object]"}catch{return"[object with circular reference]"}else r=String(e);return Tr(r)}import{createRequire as Or}from"node:module";import{platform as _r,type as wr}from"node:os";import{join as Ne,resolve as Ir}from"node:path";import{fileURLToPath as Nr}from"node:url";function Ar(){let e=Fe(),r=e==="linux"?T({platform:e}):"gnu";return`${N(e,r)}-${process.arch}`}function Fr(){let e=Fe(),{arch:r}=process;switch(e){case"win32":return`win32-${r}-msvc`;case"darwin":return`darwin-${r}`;case"linux":return`linux-${r}-${T({platform:e})}`;default:throw new Error(`Unsupported platform: ${e}/${r}`)}}var l;function Fe(){if(l!==void 0)return l;switch(wr()){case"Windows_NT":l="win32";break;case"Darwin":l="darwin";break;case"Linux":l="linux";break;case"AIX":l="aix";break;case"FreeBSD":case"DragonFly":l="freebsd";break;case"OpenBSD":l="openbsd";break;case"NetBSD":l="netbsd";break;case"SunOS":l="sunos";break;default:l=_r();break}return l}function He(e,r){let t=Ar(),n=`${e}.node`,o=`${e}.${Fr()}.node`,i=[];for(let a of r){let h=Ir(a),D=Ne(h,"prebuilds",t,n),O=Ae(D);if(O.ok)return O.value;i.push({path:D,err:O.err});let $=Ne(h,o),_=Ae($);if(_.ok)return _.value;i.push({path:$,err:_.err})}let s=i.map(a=>` ${a.path}: ${Hr(a.err)}`).join(` | ||
| `);throw new Error(`Native addon "${e}" not found for ${t}. Tried: | ||
| ${s}`)}function Hr(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return Object.prototype.toString.call(e)}}function Ae(e){try{return{ok:!0,value:Rr(e)}}catch(r){return{ok:!1,err:r}}}function Rr(e){return Or(Nr(import.meta.url))(e)}var v,Re=ke.dirname(kr(import.meta.url));function De(){if(v){if(v.kind==="ok")return v.addon;throw v.error}try{let e=He("cli-native",[Re,ke.resolve(Re,"..","native","cli")]);return v={kind:"ok",addon:e},e}catch(e){let r=e instanceof Error?e:new Error(`Failed to load cli-native addon: ${Ie(e)}`);throw v={kind:"error",error:r},r}}function $e(){if(process.platform==="win32")return De()}try{Dr.enableCompileCache?.()}catch{}var k=$r(Mr(import.meta.url)),Vr=Me.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=$e();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var Be=Te(process.argv,k);if(Be)await import(R(Be).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=Br(k,"voice-server.js");try{let{runVoiceServer:r}=await import(R(e).href);await r()}catch(r){process.stderr.write(`voice server: fatal at ${e}: ${r.stack??String(r)} | ||
| `),process.exit(1)}}else if(process.env.COPILOT_SHUTDOWN_FLUSH){try{let{url:e,headers:r,body:t}=JSON.parse(process.env.COPILOT_SHUTDOWN_FLUSH);await fetch(e,{method:"POST",headers:r,body:t,signal:AbortSignal.timeout(3e4)})}catch{}process.exit(0)}else{Oe(process.argv.slice(2))&&we.start();let e=await Se(k,Vr);await import(R(e).href)} | ||
| var Ve=Object.create;var B=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var M=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var x=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Ge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of je(t))!qe.call(e,o)&&o!==r&&B(e,o,{get:()=>t[o],enumerable:!(n=Ue(t,o))||n.enumerable});return e};var Ke=(e,t,r)=>(r=e!=null?Ve(We(e)):{},Ge(t||!e||!e.__esModule?B(r,"default",{value:e,enumerable:!0}):r,e));var X=x((Jt,z)=>{"use strict";var Y=()=>process.platform==="linux",C=null,Ze=()=>{if(!C)if(Y()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,C=process.report.getReport(),process.report.excludeNetwork=e}else C={};return C};z.exports={isLinux:Y,getReport:Ze}});var Z=x((Yt,Q)=>{"use strict";var y=M("fs"),et="/usr/bin/ldd",tt="/proc/self/exe",L=2048,rt=e=>{let t=y.openSync(e,"r"),r=Buffer.alloc(L),n=y.readSync(t,r,0,L,0);return y.close(t,()=>{}),r.subarray(0,n)},nt=e=>new Promise((t,r)=>{y.open(e,"r",(n,o)=>{if(n)r(n);else{let i=Buffer.alloc(L);y.read(o,i,0,L,0,(s,a)=>{t(i.subarray(0,a)),y.close(o,()=>{})})}})});Q.exports={LDD_PATH:et,SELF_PATH:tt,readFileSync:rt,readFile:nt}});var te=x((zt,ee)=>{"use strict";var ot=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;let t=e.readUInt32LE(32),r=e.readUInt16LE(54),n=e.readUInt16LE(56);for(let o=0;o<n;o++){let i=t+o*r;if(e.readUInt32LE(i)===3){let a=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(a,a+h).toString().replace(/\0.*$/g,"")}}return null};ee.exports={interpreterPath:ot}});var xe=x((Xt,ve)=>{"use strict";var ne=M("child_process"),{isLinux:b,getReport:oe}=X(),{LDD_PATH:S,SELF_PATH:ie,readFile:w,readFileSync:I}=Z(),{interpreterPath:se}=te(),u,f,d,ae="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",ce=()=>m||new Promise(e=>{ne.exec(ae,(t,r)=>{m=t?" ":r,e(m)})}),le=()=>{if(!m)try{m=ne.execSync(ae,{encoding:"utf8"})}catch{m=" "}return m},p="glibc",ue=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,g="musl",it=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),fe=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?p:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(it)?g:null},de=e=>{let[t,r]=e.split(/[\r\n]+/);return t&&t.includes(p)?p:r&&r.includes(g)?g:null},pe=e=>{if(e){if(e.includes("/ld-musl-"))return g;if(e.includes("/ld-linux-"))return p}return null},me=e=>(e=e.toString(),e.includes("musl")?g:e.includes("GNU C Library")?p:null),st=async()=>{if(f!==void 0)return f;f=null;try{let e=await w(S);f=me(e)}catch{}return f},at=()=>{if(f!==void 0)return f;f=null;try{let e=I(S);f=me(e)}catch{}return f},ct=async()=>{if(u!==void 0)return u;u=null;try{let e=await w(ie),t=se(e);u=pe(t)}catch{}return u},lt=()=>{if(u!==void 0)return u;u=null;try{let e=I(ie),t=se(e);u=pe(t)}catch{}return u},ge=async()=>{let e=null;if(b()&&(e=await ct(),!e&&(e=await st(),e||(e=fe()),!e))){let t=await ce();e=de(t)}return e},he=()=>{let e=null;if(b()&&(e=lt(),!e&&(e=at(),e||(e=fe()),!e))){let t=le();e=de(t)}return e},ut=async()=>b()&&await ge()!==p,ft=()=>b()&&he()!==p,dt=async()=>{if(d!==void 0)return d;d=null;try{let t=(await w(S)).match(ue);t&&(d=t[1])}catch{}return d},pt=()=>{if(d!==void 0)return d;d=null;try{let t=I(S).match(ue);t&&(d=t[1])}catch{}return d},ye=()=>{let e=oe();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},re=e=>e.trim().split(/\s+/)[1],be=e=>{let[t,r,n]=e.split(/[\r\n]+/);return t&&t.includes(p)?re(t):r&&n&&r.includes(g)?re(n):null},mt=async()=>{let e=null;if(b()&&(e=await dt(),e||(e=ye()),!e)){let t=await ce();e=be(t)}return e},gt=()=>{let e=null;if(b()&&(e=pt(),e||(e=ye()),!e)){let t=le();e=be(t)}return e};ve.exports={GLIBC:p,MUSL:g,family:ge,familySync:he,isNonGlibcLinux:ut,isNonGlibcLinuxSync:ft,version:mt,versionSync:gt}});import Dt from"node:module";import{dirname as $t,join as Bt}from"node:path";import*as Me from"node:sea";import{fileURLToPath as Mt,pathToFileURL as k}from"node:url";import{basename as ht,join as A}from"node:path";var V="0.0.1";import{readdir as Je,access as Ye,constants as ze}from"node:fs/promises";import{join as c,basename as U}from"node:path";import{homedir as E}from"node:os";function W(){return process.env.XDG_CACHE_HOME||c(E(),".cache")}function q(){if(process.argv.includes("--no-auto-update")||process.argv.includes("--prefer-version"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function G(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function Xe(){if(process.platform==="darwin")return c(E(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||c(E(),".cache");return c(e,"copilot")}return c(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(c(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(c(Xe(),"pkg")),e.push(c(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(c(process.env.COPILOT_HOME,"pkg")),e.push(c(E(),".copilot","pkg")),[...new Set(e)]}function j(e){let t=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(t)return[Number(t[1]),Number(t[2]),Number(t[3])]}function Qe(e,t){let r=j(e),n=j(t);if(!r&&!n)return 0;if(!r)return-1;if(!n)return 1;for(let s=0;s<3;s++)if(r[s]!==n[s])return r[s]-n[s];let o=e.includes("-"),i=t.includes("-");return o!==i?o?-1:1:e.localeCompare(t)}async function J(e,...t){let r=[];for(let n of t){let o;try{o=await Je(n)}catch{continue}for(let i of o){let s=c(n,i);try{await Ye(c(s,e),ze.R_OK),r.push(s)}catch{continue}}}return r.sort((n,o)=>{let i=Qe(U(o),U(n));return i!==0?i:n.localeCompare(o)}),r}import{join as Ce}from"node:path";var P=Ke(xe(),1);function T(e={}){return(e.platform??process.platform)!=="linux"?"gnu":(e.detectLibcFamily??P.familySync)()===P.MUSL?"musl":"gnu"}function N(e=process.platform,t){let r=t??(e==="linux"?T():"gnu");return e==="linux"&&r==="musl"?"linuxmusl":e}function Ee(e=process.platform,t,r=process.arch){return`${N(e,t)}-${r}`}function Le(){let e=Ee();return K().flatMap(t=>[Ce(t,"universal"),Ce(t,e)])}function yt(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.71-0"}async function Se(e,t){let r=A(e,"app.js"),n=yt()===V,o=G();if(t&&(o||q()&&!n)){let i=Le(),s=await J("app.js",...i);if(o){let a=s.find(h=>ht(h)===o);a?r=A(a,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version | ||
| `)}else s.length>0&&(r=A(s[0],"app.js"))}return r}import{existsSync as bt}from"node:fs";import{basename as vt,resolve as xt}from"node:path";var Pe="extension_bootstrap.mjs";function Te(e,t,r=bt){let n=e.find(s=>vt(s)===Pe);if(!n)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${t}, argv-bootstrap=${n} | ||
| `);let o=xt(t,"preloads",Pe),i=r(o);if(process.stderr.write(`[extension-fork] resolveBootstrapPath: localBootstrap=${o}, localExists=${i} | ||
| `),i)return o}var Et=new Set(["--server","--headless","--acp","--embedded-host"]),Ct=new Set(["completion","help","init","login","mcp","plugin","update","version"]);function Lt(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function St(e){if(e.some(r=>Et.has(r)||Lt(r)))return!0;let t=e.find(r=>!r.startsWith("-"));return t!==void 0&&Ct.has(t)}function Oe(e){return!St(e)}var Pt="github.copilot.cli.typeahead.capture",_e=Symbol.for(Pt);function F(){let e=globalThis,t=e[_e];return t||(t={buffer:[],capturing:!1,listener:null,exitHandler:null},e[_e]=t),t}var H=class{detachListener(t){t.listener&&(process.stdin.removeListener("data",t.listener),t.listener=null)}clearExitHandler(t){t.exitHandler&&(process.removeListener("exit",t.exitHandler),t.exitHandler=null)}start(){let t=F();if(!process.stdin.isTTY||typeof process.stdin.setRawMode!="function"||t.capturing)return;try{process.stdin.setRawMode(!0)}catch{return}if(!t.exitHandler){let n=()=>{if(t.capturing)try{process.stdin.setRawMode(!1)}catch{}};t.exitHandler=n,process.once("exit",n)}let r=n=>{if(n.length===1&&n[0]===3){this.dispose(),process.kill(process.pid,"SIGINT");return}t.buffer.push(Buffer.from(n))};t.listener=r,process.stdin.on("data",r),process.stdin.unref(),t.capturing=!0}drain(){let t=F();if(this.detachListener(t),this.clearExitHandler(t),t.capturing=!1,t.buffer.length===0)return null;let r=Buffer.concat(t.buffer);return t.buffer=[],r}dispose(){let t=F();if(this.detachListener(t),this.clearExitHandler(t),t.buffer=[],!!t.capturing){try{process.stdin.setRawMode(!1)}catch{}process.stdin.pause(),t.capturing=!1}}},we=new H;import Re from"node:path";import{fileURLToPath as Rt}from"node:url";function Tt(e){if(e.includes("<!DOCTYPE")||e.includes("<html")){let t=Math.min(e.indexOf("<!DOCTYPE")!==-1?e.indexOf("<!DOCTYPE"):1/0,e.indexOf("<html")!==-1?e.indexOf("<html"):1/0),r=e.substring(0,t).trim();return r?`${r} [HTML error page omitted]`:"[HTML error page omitted]"}return e}function Ie(e){let t;if(e instanceof Error)t=String(e);else if(typeof e=="object"&&e!==null)try{t=JSON.stringify(e)??"[object]"}catch{return"[object with circular reference]"}else t=String(e);return Tt(t)}import{createRequire as Ot}from"node:module";import{platform as _t,type as wt}from"node:os";import{join as Ne,resolve as It}from"node:path";import{fileURLToPath as Nt}from"node:url";function At(){let e=Fe(),t=e==="linux"?T({platform:e}):"gnu";return`${N(e,t)}-${process.arch}`}function Ft(){let e=Fe(),{arch:t}=process;switch(e){case"win32":return`win32-${t}-msvc`;case"darwin":return`darwin-${t}`;case"linux":return`linux-${t}-${T({platform:e})}`;default:throw new Error(`Unsupported platform: ${e}/${t}`)}}var l;function Fe(){if(l!==void 0)return l;switch(wt()){case"Windows_NT":l="win32";break;case"Darwin":l="darwin";break;case"Linux":l="linux";break;case"AIX":l="aix";break;case"FreeBSD":case"DragonFly":l="freebsd";break;case"OpenBSD":l="openbsd";break;case"NetBSD":l="netbsd";break;case"SunOS":l="sunos";break;default:l=_t();break}return l}function He(e,t){let r=At(),n=`${e}.node`,o=`${e}.${Ft()}.node`,i=[];for(let a of t){let h=It(a),D=Ne(h,"prebuilds",r,n),O=Ae(D);if(O.ok)return O.value;i.push({path:D,err:O.err});let $=Ne(h,o),_=Ae($);if(_.ok)return _.value;i.push({path:$,err:_.err})}let s=i.map(a=>` ${a.path}: ${Ht(a.err)}`).join(` | ||
| `);throw new Error(`Native addon "${e}" not found for ${r}. Tried: | ||
| ${s}`)}function Ht(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return Object.prototype.toString.call(e)}}function Ae(e){try{return{ok:!0,value:kt(e)}}catch(t){return{ok:!1,err:t}}}function kt(e){return Ot(Nt(import.meta.url))(e)}var v,ke=Re.dirname(Rt(import.meta.url));function De(){if(v){if(v.kind==="ok")return v.addon;throw v.error}try{let e=He("cli-native",[ke,Re.resolve(ke,"..","native","cli")]);return v={kind:"ok",addon:e},e}catch(e){let t=e instanceof Error?e:new Error(`Failed to load cli-native addon: ${Ie(e)}`);throw v={kind:"error",error:t},t}}function $e(){if(process.platform==="win32")return De()}try{Dt.enableCompileCache?.()}catch{}var R=$t(Mt(import.meta.url)),Vt=Me.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=$e();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var Be=Te(process.argv,R);if(Be)await import(k(Be).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=Bt(R,"voice-server.js");try{let{runVoiceServer:t}=await import(k(e).href);await t()}catch(t){process.stderr.write(`voice server: fatal at ${e}: ${t.stack??String(t)} | ||
| `),process.exit(1)}}else if(process.env.COPILOT_SHUTDOWN_FLUSH){try{let{url:e,headers:t,body:r}=JSON.parse(process.env.COPILOT_SHUTDOWN_FLUSH);await fetch(e,{method:"POST",headers:t,body:r,signal:AbortSignal.timeout(3e4)})}catch{}process.exit(0)}else{Oe(process.argv.slice(2))&&we.start();let e=await Se(R,Vt);await import(k(e).href)} |
+1
-1
| { | ||
| "name": "@github/copilot-linuxmusl-x64", | ||
| "version": "1.0.70", | ||
| "version": "1.0.71-0", | ||
| "description": "GitHub Copilot CLI for linuxmusl-x64", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
@@ -1,2 +0,2 @@ | ||
| (()=>{const stack=new Error().stack;stack&&(globalThis._sentryDebugIds=globalThis._sentryDebugIds||{},globalThis._sentryDebugIds[stack]="587296b5-4139-5002-a65a-b44e74a392c7",globalThis._sentryDebugIdIdentifier="sentry-dbid-587296b5-4139-5002-a65a-b44e74a392c7");})(); | ||
| (()=>{const stack=new Error().stack;stack&&(globalThis._sentryDebugIds=globalThis._sentryDebugIds||{},globalThis._sentryDebugIds[stack]="4c0b8fb3-62fe-59b1-a671-430f070c2238",globalThis._sentryDebugIdIdentifier="sentry-dbid-4c0b8fb3-62fe-59b1-a671-430f070c2238");})(); | ||
@@ -60,4 +60,4 @@ /*--------------------------------------------------------------------------------------------- | ||
| const __esmShimDirname = __path.dirname(__esmShimFilename); | ||
| import{parentPort as F,workerData as B}from"node:worker_threads";var d=class{initialQueue=[];initialQueueResolvers=Promise.withResolvers();logWriter=null;writePromise=this.initialQueueResolvers.promise;setLogWriter(e){this.logWriter=e;for(let t of this.initialQueue)this.writePromise=this.logWriter.writeLog(t.method,t.message);this.initialQueue=[],this.initialQueueResolvers.resolve()}async flush(){this.logWriter&&await this.writePromise}async dispose(){await this.flush()}outputPath(){return this.logWriter?.outputPath()}logToLevel(e,t){this.logWriter?this.writePromise=this.logWriter.writeLog(e,t):this.initialQueue.push({method:e,message:t})}info(e){this.logToLevel("info",e)}debug(e){this.logToLevel("debug",e)}warning(e){this.logToLevel("warning",e)}error(e){this.logToLevel("error",e instanceof Error?e.message:e)}log(e){this.error(e)}isDebug(){return!1}shouldLog(e){return!0}notice(e){this.info(e instanceof Error?e.message:e)}startGroup(e,t){this.info(`--- Start of group: ${e} ---`)}endGroup(e){this.info("--- End of group ---")}},u=new d;import{createRequire as A}from"node:module";import*as n from"node:fs/promises";import*as a from"node:path";import{createHash as j}from"node:crypto";import{join as l,basename as ir}from"node:path";import{homedir as h}from"node:os";function W(){return process.env.XDG_CACHE_HOME||l(h(),".cache")}function O(){if(process.platform==="darwin")return l(h(),"Library","Caches","copilot");if(process.platform==="win32"){let r=process.env.LOCALAPPDATA||l(h(),".cache");return l(r,"copilot")}return l(W(),"copilot")}function D(r){if(r.includes("<!DOCTYPE")||r.includes("<html")){let e=Math.min(r.indexOf("<!DOCTYPE")!==-1?r.indexOf("<!DOCTYPE"):1/0,r.indexOf("<html")!==-1?r.indexOf("<html"):1/0),t=r.substring(0,e).trim();return t?`${t} [HTML error page omitted]`:"[HTML error page omitted]"}return r}function y(r){let e;if(r instanceof Error)e=String(r);else if(typeof r=="object"&&r!==null)try{e=JSON.stringify(r)??"[object]"}catch{return"[object with circular reference]"}else e=String(r);return D(e)}var H=1,I=".complete";var v={"win32-x64":"win-x64","win32-arm64":"win-arm64","linux-x64":"linux-x64","darwin-arm64":"osx-arm64"};function b(){return typeof __foundryRequire<"u"&&__foundryRequire||A(import.meta.url)}var p;function U(){if(p)return p;try{let r=b()("foundry-local-sdk/script/install-utils.cjs");if(typeof r.runInstall!="function")throw new Error(`Expected exports {runInstall: function}, got: ${JSON.stringify(Object.fromEntries(Object.entries(r).map(([e,t])=>[e,typeof t])))}`);return p=r,p}catch(r){throw new Error(`Failed to load foundry-local-sdk/script/install-utils.cjs: ${y(r)}. The upstream foundry-local-sdk installer may have changed shape \u2014 re-run the audit checklist in src/cli/voice/foundry/installer/nativeLoader.ts and update accordingly.`)}}var g;function J(){if(g)return g;try{let r=b()("foundry-local-sdk/deps_versions.json");if(typeof r["foundry-local-core"]?.nuget!="string"||typeof r.onnxruntime?.version!="string"||typeof r["onnxruntime-genai"]?.version!="string")throw new Error('deps_versions.json is missing one of the expected version keys: ["foundry-local-core"].nuget, .onnxruntime.version, ["onnxruntime-genai"].version');return g=r,g}catch(r){throw new Error(`Failed to load foundry-local-sdk/deps_versions.json: ${y(r)}. The upstream foundry-local-sdk installer may have changed shape \u2014 re-run the audit checklist in src/cli/voice/foundry/installer/nativeLoader.ts and update accordingly.`)}}function S(r=process.platform){let e=J();return[{name:"Microsoft.AI.Foundry.Local.Core",version:e["foundry-local-core"].nuget},{name:r==="linux"?"Microsoft.ML.OnnxRuntime.Gpu.Linux":"Microsoft.ML.OnnxRuntime.Foundry",version:e.onnxruntime.version},{name:"Microsoft.ML.OnnxRuntimeGenAI.Foundry",version:e["onnxruntime-genai"].version}]}function C(r){return r==="win32"?".dll":r==="darwin"?".dylib":".so"}function V(r,e){return a.join(r,`Microsoft.AI.Foundry.Local.Core${C(e)}`)}function q(r){let e=C(r),t=r==="win32"?"":"lib";return[`Microsoft.AI.Foundry.Local.Core${e}`,`${t}onnxruntime${e}`,`${t}onnxruntime-genai${e}`]}function K(r,e=process.platform,t=process.arch){let o=v[`${e}-${t}`];if(!o)throw new Error(`Voice mode not supported on ${e}-${t}`);let i=r??process.env.COPILOT_CACHE_HOME??O(),s=S(e),c=j("sha256").update(JSON.stringify({schema:H,artifacts:s})).digest("hex").slice(0,12);return a.join(i,"foundry",c,o)}async function $(r={}){let e=r.platform??process.platform,t=r.arch??process.arch,o=`${e}-${t}`;if(!v[o])throw new Error(`Voice mode is not supported on ${o}. Supported platforms: ${Object.keys(v).join(", ")}.`);let s=K(r.cacheRoot,e,t),c=V(s,e),f=q(e);return await N(s,f)?{corePath:c}:(r.onDownloadStart?.(),await G(s,e,f,r.runInstall),{corePath:c})}async function N(r,e){return await w(a.join(r,I))?(await Promise.all(e.map(o=>w(a.join(r,o))))).every(Boolean):!1}async function w(r){try{return await n.access(r),!0}catch{return!1}}async function G(r,e,t,o){let i=a.dirname(r);await n.mkdir(i,{recursive:!0});let s=a.join(i,`.tmp-${a.basename(r)}-${process.pid}-${Date.now()}`);await n.mkdir(s,{recursive:!0});try{let c=o??U().runInstall,f=S(e);await z(()=>c(f,{binDir:s}));for(let k of t)if(!await w(a.join(s,k)))throw new Error(`Foundry runtime download finished but required file is missing: ${k}. RID for ${e} may not be supported by the published packages.`);await n.writeFile(a.join(s,I),""),await Q(s,r,t)}catch(c){throw await n.rm(s,{recursive:!0,force:!0}).catch(()=>{}),c}}async function Q(r,e,t){try{await n.rename(r,e)}catch(o){let i=o.code;if(i==="ENOTEMPTY"||i==="EEXIST"||i==="EPERM"){if(await N(e,t)){await n.rm(r,{recursive:!0,force:!0}).catch(()=>{});return}await n.rm(e,{recursive:!0,force:!0}),await n.rename(r,e);return}throw o}}async function z(r){let e=process.stdout.write.bind(process.stdout),t=process.stderr.write.bind(process.stderr);process.stdout.write=(()=>!0),process.stderr.write=(()=>!0);try{return await r()}finally{process.stdout.write=e,process.stderr.write=t}}var L=class extends Error{constructor(t,o,i){super(t,i);this.code=o;this.name="VoiceBackendError"}code};function _(r){return r instanceof L?{message:r.message,code:r.code}:r instanceof Error?{message:r.message}:{message:String(r)}}function R(r){return r instanceof Error?r:new Error(String(r))}var X=16;function E(r){return M(r,new WeakSet,0)}function M(r,e,t){if(t>=X)return"<cause chain truncated>";if(typeof r=="object"&&r!==null){if(e.has(r))return"<cyclic cause>";e.add(r)}if(!(r instanceof Error))return String(r);let o=r.stack??`${r.name}: ${r.message}`;if(r.cause===void 0)return o;let i=M(r.cause,e,t+1);return`${o} | ||
| Caused by: ${i}`}var x=16*1024,P=class{constructor(e){this.port=e}port;writeLog(e,t){let o={kind:"log",level:e,message:Y(t)};try{this.port.postMessage(o)}catch{}return Promise.resolve()}outputPath(){return"<voice-worker>"}};function T(r,e=u){e.setLogWriter(new P(r))}function Y(r){return r.length<=x?r:`${r.slice(0,x)}\u2026 [truncated, ${r.length-x} more chars]`}if(!F)throw new Error("voice-installer.worker.js must be loaded as a worker thread.");var m=F;T(m);var Z=B??{};async function rr(){try{let e={kind:"ok",location:await $({cacheRoot:Z.cacheRoot,onDownloadStart:()=>{let t={kind:"download-started"};m.postMessage(t)}})};m.postMessage(e)}catch(r){let e=R(r);u.error(`[voice-installer worker] install failed: ${E(e)}`);let t={kind:"error",error:_(e)};m.postMessage(t)}finally{setImmediate(()=>process.exit(0))}}rr().catch(r=>{u.error(`[voice-installer worker] fatal: ${E(r)}`),process.exit(1)}); | ||
| import{parentPort as F,workerData as B}from"node:worker_threads";var d=class{initialQueue=[];initialQueueResolvers=Promise.withResolvers();logWriter=null;writePromise=this.initialQueueResolvers.promise;setLogWriter(e){this.logWriter=e;for(let t of this.initialQueue)this.writePromise=this.logWriter.writeLog(t.method,t.message);this.initialQueue=[],this.initialQueueResolvers.resolve()}async flush(){this.logWriter&&await this.writePromise}async dispose(){await this.flush()}outputPath(){return this.logWriter?.outputPath()}logToLevel(e,t){this.logWriter?this.writePromise=this.logWriter.writeLog(e,t):this.initialQueue.push({method:e,message:t})}info(e){this.logToLevel("info",e)}debug(e){this.logToLevel("debug",e)}warning(e){this.logToLevel("warning",e)}error(e){this.logToLevel("error",e instanceof Error?e.message:e)}log(e){this.error(e)}isDebug(){return!1}shouldLog(e){return!0}notice(e){this.info(e instanceof Error?e.message:e)}startGroup(e,t){this.info(`--- Start of group: ${e} ---`)}endGroup(e){this.info("--- End of group ---")}},u=new d;import{createRequire as A}from"node:module";import*as n from"node:fs/promises";import*as a from"node:path";import{createHash as j}from"node:crypto";import{join as l,basename as ir}from"node:path";import{homedir as h}from"node:os";function W(){return process.env.XDG_CACHE_HOME||l(h(),".cache")}function O(){if(process.platform==="darwin")return l(h(),"Library","Caches","copilot");if(process.platform==="win32"){let r=process.env.LOCALAPPDATA||l(h(),".cache");return l(r,"copilot")}return l(W(),"copilot")}function D(r){if(r.includes("<!DOCTYPE")||r.includes("<html")){let e=Math.min(r.indexOf("<!DOCTYPE")!==-1?r.indexOf("<!DOCTYPE"):1/0,r.indexOf("<html")!==-1?r.indexOf("<html"):1/0),t=r.substring(0,e).trim();return t?`${t} [HTML error page omitted]`:"[HTML error page omitted]"}return r}function y(r){let e;if(r instanceof Error)e=String(r);else if(typeof r=="object"&&r!==null)try{e=JSON.stringify(r)??"[object]"}catch{return"[object with circular reference]"}else e=String(r);return D(e)}var H=1,I=".complete";var v={"win32-x64":"win-x64","win32-arm64":"win-arm64","linux-x64":"linux-x64","darwin-arm64":"osx-arm64"};function b(){return typeof __foundryRequire<"u"&&__foundryRequire||A(import.meta.url)}var p;function U(){if(p)return p;try{let r=b()("foundry-local-sdk/script/install-utils.cjs");if(typeof r.runInstall!="function")throw new Error(`Expected exports {runInstall: function}, got: ${JSON.stringify(Object.fromEntries(Object.entries(r).map(([e,t])=>[e,typeof t])))}`);return p=r,p}catch(r){throw new Error(`Failed to load foundry-local-sdk/script/install-utils.cjs: ${y(r)}. The upstream foundry-local-sdk installer may have changed shape \u2014 re-run the audit checklist in src/cli/voice/foundry/installer/nativeLoader.ts and update accordingly.`)}}var g;function J(){if(g)return g;try{let r=b()("foundry-local-sdk/deps_versions.json");if(typeof r["foundry-local-core"]?.nuget!="string"||typeof r.onnxruntime?.version!="string"||typeof r["onnxruntime-genai"]?.version!="string")throw new Error('deps_versions.json is missing one of the expected version keys: ["foundry-local-core"].nuget, .onnxruntime.version, ["onnxruntime-genai"].version');return g=r,g}catch(r){throw new Error(`Failed to load foundry-local-sdk/deps_versions.json: ${y(r)}. The upstream foundry-local-sdk installer may have changed shape \u2014 re-run the audit checklist in src/cli/voice/foundry/installer/nativeLoader.ts and update accordingly.`)}}function S(r=process.platform){let e=J();return[{name:"Microsoft.AI.Foundry.Local.Core",version:e["foundry-local-core"].nuget},{name:r==="linux"?"Microsoft.ML.OnnxRuntime.Gpu.Linux":"Microsoft.ML.OnnxRuntime.Foundry",version:e.onnxruntime.version},{name:"Microsoft.ML.OnnxRuntimeGenAI.Foundry",version:e["onnxruntime-genai"].version}]}function C(r){return r==="win32"?".dll":r==="darwin"?".dylib":".so"}function V(r,e){return a.join(r,`Microsoft.AI.Foundry.Local.Core${C(e)}`)}function q(r){let e=C(r),t=r==="win32"?"":"lib";return[`Microsoft.AI.Foundry.Local.Core${e}`,`${t}onnxruntime${e}`,`${t}onnxruntime-genai${e}`]}function K(r,e=process.platform,t=process.arch){let o=v[`${e}-${t}`];if(!o)throw new Error(`Voice mode not supported on ${e}-${t}`);let i=r??process.env.COPILOT_CACHE_HOME??O(),s=S(e),c=j("sha256").update(JSON.stringify({schema:H,artifacts:s})).digest("hex").slice(0,12);return a.join(i,"foundry",c,o)}async function $(r={}){let e=r.platform??process.platform,t=r.arch??process.arch,o=`${e}-${t}`;if(!v[o])throw new Error(`Voice mode is not supported on ${o}. Supported platforms: ${Object.keys(v).join(", ")}.`);let s=K(r.cacheRoot,e,t),c=V(s,e),f=q(e);return await N(s,f)?{corePath:c}:(r.onDownloadStart?.(),await G(s,e,f,r.runInstall),{corePath:c})}async function N(r,e){return await w(a.join(r,I))?(await Promise.all(e.map(o=>w(a.join(r,o))))).every(Boolean):!1}async function w(r){try{return await n.access(r),!0}catch{return!1}}async function G(r,e,t,o){let i=a.dirname(r);await n.mkdir(i,{recursive:!0});let s=a.join(i,`.tmp-${a.basename(r)}-${process.pid}-${Date.now()}`);await n.mkdir(s,{recursive:!0});try{let c=o??U().runInstall,f=S(e);await z(()=>c(f,{binDir:s}));for(let P of t)if(!await w(a.join(s,P)))throw new Error(`Foundry runtime download finished but required file is missing: ${P}. RID for ${e} may not be supported by the published packages.`);await n.writeFile(a.join(s,I),""),await Q(s,r,t)}catch(c){throw await n.rm(s,{recursive:!0,force:!0}).catch(()=>{}),c}}async function Q(r,e,t){try{await n.rename(r,e)}catch(o){let i=o.code;if(i==="ENOTEMPTY"||i==="EEXIST"||i==="EPERM"){if(await N(e,t)){await n.rm(r,{recursive:!0,force:!0}).catch(()=>{});return}await n.rm(e,{recursive:!0,force:!0}),await n.rename(r,e);return}throw o}}async function z(r){let e=process.stdout.write.bind(process.stdout),t=process.stderr.write.bind(process.stderr);process.stdout.write=(()=>!0),process.stderr.write=(()=>!0);try{return await r()}finally{process.stdout.write=e,process.stderr.write=t}}var E=class extends Error{constructor(t,o,i){super(t,i);this.code=o;this.name="VoiceBackendError"}code};function _(r){return r instanceof E?{message:r.message,code:r.code}:r instanceof Error?{message:r.message}:{message:String(r)}}function M(r){return r instanceof Error?r:new Error(String(r))}var X=16;function L(r){return R(r,new WeakSet,0)}function R(r,e,t){if(t>=X)return"<cause chain truncated>";if(typeof r=="object"&&r!==null){if(e.has(r))return"<cyclic cause>";e.add(r)}if(!(r instanceof Error))return String(r);let o=r.stack??`${r.name}: ${r.message}`;if(r.cause===void 0)return o;let i=R(r.cause,e,t+1);return`${o} | ||
| Caused by: ${i}`}var x=16*1024,k=class{constructor(e){this.port=e}port;writeLog(e,t){let o={kind:"log",level:e,message:Y(t)};try{this.port.postMessage(o)}catch{}return Promise.resolve()}outputPath(){return"<voice-worker>"}};function T(r,e=u){e.setLogWriter(new k(r))}function Y(r){return r.length<=x?r:`${r.slice(0,x)}\u2026 [truncated, ${r.length-x} more chars]`}if(!F)throw new Error("voice-installer.worker.js must be loaded as a worker thread.");var m=F;T(m);var Z=B??{};async function rr(){try{let e={kind:"ok",location:await $({cacheRoot:Z.cacheRoot,onDownloadStart:()=>{let t={kind:"download-started"};m.postMessage(t)}})};m.postMessage(e)}catch(r){let e=M(r);u.error(`[voice-installer worker] install failed: ${L(e)}`);let t={kind:"error",error:_(e)};m.postMessage(t)}finally{setImmediate(()=>process.exit(0))}}rr().catch(r=>{u.error(`[voice-installer worker] fatal: ${L(r)}`),process.exit(1)}); | ||
| //# sourceMappingURL=voice-installer.worker.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 4 instances
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 3 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
297853607
1.99%161950
-0.01%9
12.5%130
0.78%