🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@github/copilot

Package Overview
Dependencies
Maintainers
23
Versions
731
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/copilot - npm Package Compare versions

Comparing version
1.0.63
to
1.0.64-0
+2
-2
index.js

@@ -9,7 +9,7 @@ #!/usr/bin/env node

var Ze=Object.create;var K=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var z=(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 R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ot=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tt(t))!nt.call(e,o)&&o!==r&&K(e,o,{get:()=>t[o],enumerable:!(s=et(t,o))||s.enumerable});return e};var st=(e,t,r)=>(r=e!=null?Ze(rt(e)):{},ot(t||!e||!e.__esModule?K(r,"default",{value:e,enumerable:!0}):r,e));var de=R((Er,le)=>{"use strict";var ue=()=>process.platform==="linux",N=null,St=()=>{if(!N)if(ue()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,N=process.report.getReport(),process.report.excludeNetwork=e}else N={};return N};le.exports={isLinux:ue,getReport:St}});var pe=R((Or,fe)=>{"use strict";var I=z("fs"),Pt="/usr/bin/ldd",Et="/proc/self/exe",A=2048,Ot=e=>{let t=I.openSync(e,"r"),r=Buffer.alloc(A),s=I.readSync(t,r,0,A,0);return I.close(t,()=>{}),r.subarray(0,s)},wt=e=>new Promise((t,r)=>{I.open(e,"r",(s,o)=>{if(s)r(s);else{let n=Buffer.alloc(A);I.read(o,n,0,A,0,(c,d)=>{t(n.subarray(0,d)),I.close(o,()=>{})})}})});fe.exports={LDD_PATH:Pt,SELF_PATH:Et,readFileSync:Ot,readFile:wt}});var ge=R((wr,me)=>{"use strict";var xt=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),s=e.readUInt16LE(56);for(let o=0;o<s;o++){let n=t+o*r;if(e.readUInt32LE(n)===3){let d=e.readUInt32LE(n+8),E=e.readUInt32LE(n+32);return e.subarray(d,d+E).toString().replace(/\0.*$/g,"")}}return null};me.exports={interpreterPath:xt}});var Ae=R((xr,Ne)=>{"use strict";var ye=z("child_process"),{isLinux:L,getReport:ve}=de(),{LDD_PATH:k,SELF_PATH:be,readFile:W,readFileSync:V}=pe(),{interpreterPath:Se}=ge(),h,y,v,Pe="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",x="",Ee=()=>x||new Promise(e=>{ye.exec(Pe,(t,r)=>{x=t?" ":r,e(x)})}),Oe=()=>{if(!x)try{x=ye.execSync(Pe,{encoding:"utf8"})}catch{x=" "}return x},P="glibc",we=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,T="musl",Tt=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),xe=()=>{let e=ve();return e.header&&e.header.glibcVersionRuntime?P:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(Tt)?T:null},Te=e=>{let[t,r]=e.split(/[\r\n]+/);return t&&t.includes(P)?P:r&&r.includes(T)?T:null},Ie=e=>{if(e){if(e.includes("/ld-musl-"))return T;if(e.includes("/ld-linux-"))return P}return null},Le=e=>(e=e.toString(),e.includes("musl")?T:e.includes("GNU C Library")?P:null),It=async()=>{if(y!==void 0)return y;y=null;try{let e=await W(k);y=Le(e)}catch{}return y},Lt=()=>{if(y!==void 0)return y;y=null;try{let e=V(k);y=Le(e)}catch{}return y},_t=async()=>{if(h!==void 0)return h;h=null;try{let e=await W(be),t=Se(e);h=Ie(t)}catch{}return h},Ft=()=>{if(h!==void 0)return h;h=null;try{let e=V(be),t=Se(e);h=Ie(t)}catch{}return h},_e=async()=>{let e=null;if(L()&&(e=await _t(),!e&&(e=await It(),e||(e=xe()),!e))){let t=await Ee();e=Te(t)}return e},Fe=()=>{let e=null;if(L()&&(e=Ft(),!e&&(e=Lt(),e||(e=xe()),!e))){let t=Oe();e=Te(t)}return e},Rt=async()=>L()&&await _e()!==P,Ct=()=>L()&&Fe()!==P,Nt=async()=>{if(v!==void 0)return v;v=null;try{let t=(await W(k)).match(we);t&&(v=t[1])}catch{}return v},At=()=>{if(v!==void 0)return v;v=null;try{let t=V(k).match(we);t&&(v=t[1])}catch{}return v},Re=()=>{let e=ve();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},he=e=>e.trim().split(/\s+/)[1],Ce=e=>{let[t,r,s]=e.split(/[\r\n]+/);return t&&t.includes(P)?he(t):r&&s&&r.includes(T)?he(s):null},kt=async()=>{let e=null;if(L()&&(e=await Nt(),e||(e=Re()),!e)){let t=await Ee();e=Ce(t)}return e},$t=()=>{let e=null;if(L()&&(e=At(),e||(e=Re()),!e)){let t=Oe();e=Ce(t)}return e};Ne.exports={GLIBC:P,MUSL:T,family:_e,familySync:Fe,isNonGlibcLinux:Rt,isNonGlibcLinuxSync:Ct,version:kt,versionSync:$t}});import Jt from"node:module";import{spawn as Yt}from"node:child_process";import{chmodSync as Ge,copyFileSync as Be,mkdirSync as Kt,readFileSync as We,realpathSync as zt,rmSync as q,statSync as Qt,writeFileSync as Ve,writeSync as Xt}from"node:fs";import{basename as ze,dirname as Zt,join as u,sep as qe}from"node:path";import{createInterface as er}from"node:readline";import*as Qe from"node:sea";import{fileURLToPath as Xe,pathToFileURL as M}from"node:url";var it=new Set;function Q(e,t){let r=Object.create(null);if(e)for(let[o,n]of Object.entries(e))r[o]=n;let s=t??it;return new Proxy(process.env,{get(o,n){if(typeof n=="string"){if(Object.hasOwn(r,n))return r[n];if(!s.has(n))return process.env[n]}},set(o,n,c){return r[n]=c,!0},has(o,n){return typeof n!="string"?!1:Object.hasOwn(r,n)?r[n]!==void 0:s.has(n)?!1:n in process.env},ownKeys(o){let n=new Set(Object.keys(process.env));for(let c of s)n.delete(c);for(let c of Object.keys(r))r[c]!==void 0?n.add(c):n.delete(c);return[...n]},getOwnPropertyDescriptor(o,n){if(typeof n!="string")return;let c;if(Object.hasOwn(r,n))c=r[n];else{if(s.has(n))return;c=process.env[n]}if(c!==void 0)return{value:c,writable:!0,enumerable:!0,configurable:!0}},deleteProperty(o,n){return r[n]=void 0,!0}})}import{existsSync as ct}from"node:fs";import{basename as at,resolve as ut}from"node:path";var X="extension_bootstrap.mjs";function Z(e,t,r=ct){let s=e.find(c=>at(c)===X);if(!s)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${t}, argv-bootstrap=${s}
var Ze=Object.create;var K=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var tt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var z=(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 R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ot=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tt(t))!nt.call(e,o)&&o!==r&&K(e,o,{get:()=>t[o],enumerable:!(s=et(t,o))||s.enumerable});return e};var st=(e,t,r)=>(r=e!=null?Ze(rt(e)):{},ot(t||!e||!e.__esModule?K(r,"default",{value:e,enumerable:!0}):r,e));var de=R((Er,le)=>{"use strict";var ue=()=>process.platform==="linux",N=null,St=()=>{if(!N)if(ue()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,N=process.report.getReport(),process.report.excludeNetwork=e}else N={};return N};le.exports={isLinux:ue,getReport:St}});var pe=R((Or,fe)=>{"use strict";var I=z("fs"),Pt="/usr/bin/ldd",Et="/proc/self/exe",A=2048,Ot=e=>{let t=I.openSync(e,"r"),r=Buffer.alloc(A),s=I.readSync(t,r,0,A,0);return I.close(t,()=>{}),r.subarray(0,s)},wt=e=>new Promise((t,r)=>{I.open(e,"r",(s,o)=>{if(s)r(s);else{let n=Buffer.alloc(A);I.read(o,n,0,A,0,(c,d)=>{t(n.subarray(0,d)),I.close(o,()=>{})})}})});fe.exports={LDD_PATH:Pt,SELF_PATH:Et,readFileSync:Ot,readFile:wt}});var ge=R((wr,me)=>{"use strict";var xt=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),s=e.readUInt16LE(56);for(let o=0;o<s;o++){let n=t+o*r;if(e.readUInt32LE(n)===3){let d=e.readUInt32LE(n+8),E=e.readUInt32LE(n+32);return e.subarray(d,d+E).toString().replace(/\0.*$/g,"")}}return null};me.exports={interpreterPath:xt}});var Ae=R((xr,Ne)=>{"use strict";var ye=z("child_process"),{isLinux:_,getReport:ve}=de(),{LDD_PATH:k,SELF_PATH:be,readFile:W,readFileSync:V}=pe(),{interpreterPath:Se}=ge(),h,y,v,Pe="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",x="",Ee=()=>x||new Promise(e=>{ye.exec(Pe,(t,r)=>{x=t?" ":r,e(x)})}),Oe=()=>{if(!x)try{x=ye.execSync(Pe,{encoding:"utf8"})}catch{x=" "}return x},P="glibc",we=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,T="musl",Tt=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),xe=()=>{let e=ve();return e.header&&e.header.glibcVersionRuntime?P:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(Tt)?T:null},Te=e=>{let[t,r]=e.split(/[\r\n]+/);return t&&t.includes(P)?P:r&&r.includes(T)?T:null},Ie=e=>{if(e){if(e.includes("/ld-musl-"))return T;if(e.includes("/ld-linux-"))return P}return null},_e=e=>(e=e.toString(),e.includes("musl")?T:e.includes("GNU C Library")?P:null),It=async()=>{if(y!==void 0)return y;y=null;try{let e=await W(k);y=_e(e)}catch{}return y},_t=()=>{if(y!==void 0)return y;y=null;try{let e=V(k);y=_e(e)}catch{}return y},Lt=async()=>{if(h!==void 0)return h;h=null;try{let e=await W(be),t=Se(e);h=Ie(t)}catch{}return h},Ft=()=>{if(h!==void 0)return h;h=null;try{let e=V(be),t=Se(e);h=Ie(t)}catch{}return h},Le=async()=>{let e=null;if(_()&&(e=await Lt(),!e&&(e=await It(),e||(e=xe()),!e))){let t=await Ee();e=Te(t)}return e},Fe=()=>{let e=null;if(_()&&(e=Ft(),!e&&(e=_t(),e||(e=xe()),!e))){let t=Oe();e=Te(t)}return e},Rt=async()=>_()&&await Le()!==P,Ct=()=>_()&&Fe()!==P,Nt=async()=>{if(v!==void 0)return v;v=null;try{let t=(await W(k)).match(we);t&&(v=t[1])}catch{}return v},At=()=>{if(v!==void 0)return v;v=null;try{let t=V(k).match(we);t&&(v=t[1])}catch{}return v},Re=()=>{let e=ve();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},he=e=>e.trim().split(/\s+/)[1],Ce=e=>{let[t,r,s]=e.split(/[\r\n]+/);return t&&t.includes(P)?he(t):r&&s&&r.includes(T)?he(s):null},kt=async()=>{let e=null;if(_()&&(e=await Nt(),e||(e=Re()),!e)){let t=await Ee();e=Ce(t)}return e},$t=()=>{let e=null;if(_()&&(e=At(),e||(e=Re()),!e)){let t=Oe();e=Ce(t)}return e};Ne.exports={GLIBC:P,MUSL:T,family:Le,familySync:Fe,isNonGlibcLinux:Rt,isNonGlibcLinuxSync:Ct,version:kt,versionSync:$t}});import Jt from"node:module";import{spawn as Yt}from"node:child_process";import{chmodSync as Ge,copyFileSync as Be,mkdirSync as Kt,readFileSync as We,realpathSync as zt,rmSync as q,statSync as Qt,writeFileSync as Ve,writeSync as Xt}from"node:fs";import{basename as ze,dirname as Zt,join as u,sep as qe}from"node:path";import{createInterface as er}from"node:readline";import*as Qe from"node:sea";import{fileURLToPath as Xe,pathToFileURL as M}from"node:url";var it=new Set;function Q(e,t){let r=Object.create(null);if(e)for(let[o,n]of Object.entries(e))r[o]=n;let s=t??it;return new Proxy(process.env,{get(o,n){if(typeof n=="string"){if(Object.hasOwn(r,n))return r[n];if(!s.has(n))return process.env[n]}},set(o,n,c){return r[n]=c,!0},has(o,n){return typeof n!="string"?!1:Object.hasOwn(r,n)?r[n]!==void 0:s.has(n)?!1:n in process.env},ownKeys(o){let n=new Set(Object.keys(process.env));for(let c of s)n.delete(c);for(let c of Object.keys(r))r[c]!==void 0?n.add(c):n.delete(c);return[...n]},getOwnPropertyDescriptor(o,n){if(typeof n!="string")return;let c;if(Object.hasOwn(r,n))c=r[n];else{if(s.has(n))return;c=process.env[n]}if(c!==void 0)return{value:c,writable:!0,enumerable:!0,configurable:!0}},deleteProperty(o,n){return r[n]=void 0,!0}})}import{existsSync as ct}from"node:fs";import{basename as at,resolve as ut}from"node:path";var X="extension_bootstrap.mjs";function Z(e,t,r=ct){let s=e.find(c=>at(c)===X);if(!s)return;process.stderr.write(`[extension-fork] resolveBootstrapPath: __dir=${t}, argv-bootstrap=${s}
`);let o=ut(t,"preloads",X),n=r(o);if(process.stderr.write(`[extension-fork] resolveBootstrapPath: localBootstrap=${o}, localExists=${n}
`),n)return o}var lt=new Set(["--server","--headless","--acp"]),dt=new Set(["completion","help","init","login","mcp","plugin","update","version"]);function ft(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function pt(e){if(e.some(r=>lt.has(r)||ft(r)))return!0;let t=e.find(r=>!r.startsWith("-"));return t!==void 0&&dt.has(t)}function ee(e){return pt(e)}import{readdir as mt,access as gt,constants as ht}from"node:fs/promises";import{join as f,basename as te}from"node:path";import{homedir as C}from"node:os";function ne(){return process.env.XDG_CACHE_HOME||f(C(),".cache")}function oe(){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 se(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function yt(){if(process.platform==="darwin")return f(C(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||f(C(),".cache");return f(e,"copilot")}return f(ne(),"copilot")}function ie(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(f(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(f(yt(),"pkg")),e.push(f(ne(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(f(process.env.COPILOT_HOME,"pkg")),e.push(f(C(),".copilot","pkg")),[...new Set(e)]}function re(e){let t=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(t)return[Number(t[1]),Number(t[2]),Number(t[3])]}function vt(e,t){let r=re(e),s=re(t);if(!r&&!s)return 0;if(!r)return-1;if(!s)return 1;for(let c=0;c<3;c++)if(r[c]!==s[c])return r[c]-s[c];let o=e.includes("-"),n=t.includes("-");return o!==n?o?-1:1:e.localeCompare(t)}async function ce(e,...t){let r=[];for(let s of t){let o;try{o=await mt(s)}catch{continue}for(let n of o){let c=f(s,n);try{await gt(f(c,e),ht.R_OK),r.push(c)}catch{continue}}}return r.sort((s,o)=>{let n=vt(te(o),te(s));return n!==0?n:s.localeCompare(o)}),r}import je from"node:path";import{fileURLToPath as Vt}from"node:url";function bt(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 ae(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 bt(t)}import{createRequire as Ht}from"node:module";import{platform as Ut}from"node:os";import{join as $e,resolve as Mt}from"node:path";import{fileURLToPath as jt}from"node:url";var $=st(Ae(),1);function H(e={}){return(e.platform??process.platform)!=="linux"?"gnu":(e.detectLibcFamily??$.familySync)()===$.MUSL?"musl":"gnu"}function ke(e=process.platform,t){let r=t??(e==="linux"?H():"gnu");return e==="linux"&&r==="musl"?"linuxmusl":e}function Dt(){let e=Ue(),t=e==="linux"?H({platform:e}):"gnu";return`${ke(e,t)}-${process.arch}`}function Gt(){let e=Ue(),{arch:t}=process;switch(e){case"win32":return`win32-${t}-msvc`;case"darwin":return`darwin-${t}`;case"linux":return`linux-${t}-${H({platform:e})}`;default:throw new Error(`Unsupported platform: ${e}/${t}`)}}var U;function Ue(){return U!==void 0||(U=process.report?.getReport()?.header?.platform??Ut()),U}function Me(e,t){let r=Dt(),s=`${e}.node`,o=`${e}.${Gt()}.node`,n=[];for(let d of t){let E=Mt(d),F=$e(E,"prebuilds",r,s),O=He(F);if(O.ok)return O.value;n.push({path:F,err:O.err});let i=$e(E,o),a=He(i);if(a.ok)return a.value;n.push({path:i,err:a.err})}let c=n.map(d=>` ${d.path}: ${Bt(d.err)}`).join(`
`);throw new Error(`Native addon "${e}" not found for ${r}. Tried:
${c}`)}function Bt(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 He(e){try{return{ok:!0,value:Wt(e)}}catch(t){return{ok:!1,err:t}}}function Wt(e){return Ht(jt(import.meta.url))(e)}var _;function De(){if(process.platform==="win32"){if(_){if(_.kind==="ok")return _.addon;throw _.error}try{let e=qt();return _={kind:"ok",addon:e},e}catch(e){let t=e instanceof Error?e:new Error(`Failed to load Win32 native addon: ${ae(e)}`);throw _={kind:"error",error:t},t}}}function qt(){let e=je.dirname(Vt(import.meta.url));return Me("cli-native",[e,je.resolve(e,"..","native","cli")])}try{Jt.enableCompileCache?.()}catch{}var tr=75;function Je(){if(process.stdin.isTTY&&typeof process.stdin.setRawMode=="function")try{process.stdin.setRawMode(!1)}catch{}if(process.stdout.isTTY)try{Xt(1,"\x1B[<u\x1B[?1049h\x1B[?1049l\x1B[?1006l\x1B[?1003l\x1B[?1002l\x1B[?2004l\x1B[?1004l\x1B[?25h\x1B[?2026l"+(process.env.TERM!=="dumb"?"\x1B[23;2t":""))}catch{}}var J=Zt(Xe(import.meta.url)),Ye=Qe.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=De();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var j=process.argv.find(e=>ze(e).startsWith("conpty_console_list_agent")),Ke=Z(process.argv,J);if(j){let e=j.endsWith(".js")?j:j+".js";await import(M(e).href)}else if(Ke)await import(M(Ke).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=u(J,"voice-server.js");try{let{runVoiceServer:t}=await import(M(e).href);await t()}catch(t){process.stderr.write(`voice server: fatal at ${e}: ${t.stack??String(t)}
${c}`)}function Bt(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 He(e){try{return{ok:!0,value:Wt(e)}}catch(t){return{ok:!1,err:t}}}function Wt(e){return Ht(jt(import.meta.url))(e)}var L;function De(){if(process.platform==="win32"){if(L){if(L.kind==="ok")return L.addon;throw L.error}try{let e=qt();return L={kind:"ok",addon:e},e}catch(e){let t=e instanceof Error?e:new Error(`Failed to load Win32 native addon: ${ae(e)}`);throw L={kind:"error",error:t},t}}}function qt(){let e=je.dirname(Vt(import.meta.url));return Me("cli-native",[e,je.resolve(e,"..","native","cli")])}try{Jt.enableCompileCache?.()}catch{}var tr=75;function Je(){if(process.stdin.isTTY&&typeof process.stdin.setRawMode=="function")try{process.stdin.setRawMode(!1)}catch{}if(process.stdout.isTTY)try{Xt(1,"\x1B[<u\x1B[?1049h\x1B[?1049l\x1B[?1006l\x1B[?1003l\x1B[?1002l\x1B[?2004l\x1B[?1004l\x1B[?25h\x1B[?2026l"+(process.env.TERM!=="dumb"?"\x1B[23;2t":""))}catch{}}var J=Zt(Xe(import.meta.url)),Ye=Qe.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=De();if(!e)throw new Error("loadWin32NativeAddon returned undefined on win32");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var j=process.argv.find(e=>ze(e).startsWith("conpty_console_list_agent")),Ke=Z(process.argv,J);if(j){let e=j.endsWith(".js")?j:j+".js";await import(M(e).href)}else if(Ke)await import(M(Ke).href);else if(process.env.COPILOT_VOICE_SERVER_MODE==="1"){let e=u(J,"voice-server.js");try{let{runVoiceServer:t}=await import(M(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 if(process.env.COPILOT_RUN_APP==="1"||ee(process.argv.slice(2))){let e=u(J,"app.js"),t=se();if(Ye&&(oe()||t)){let r=ie().flatMap(o=>[u(o,"universal"),u(o,`${process.platform}-${process.arch}`)]),s=await ce("app.js",...r);if(t){let o=s.find(n=>ze(n)===t);o?e=u(o,"app.js"):process.stderr.write(`Warning: preferred version ${t} not found in package cache, using built-in version

@@ -16,0 +16,0 @@ `)}else s.length>0&&(e=u(s[0],"app.js"))}await import(M(e).href)}else{let t=function(){let i=process.env.COPILOT_HOME||u(process.env.HOME||process.env.USERPROFILE||"",".copilot");return u(i,"restart",`${e}.json`)},r=function(){let i=t();try{let a=We(i,"utf-8");return q(i,{force:!0}),JSON.parse(a)}catch{return}},s=function(){try{q(t(),{force:!0})}catch{}},o=function(){let i=process.env.COPILOT_HOME||u(process.env.HOME||process.env.USERPROFILE||"",".copilot");return u(i,"crash-context",`${e}.json`)},n=function(){try{let i=We(o(),"utf-8");return JSON.parse(i)}catch{return}},c=function(){try{q(o(),{force:!0})}catch{}},d=function(i,a){return new Promise(g=>{let p=er({input:process.stdin,output:process.stdout}),l=i.toString(16).toUpperCase();if(process.stdout.write(`

{
"name": "@github/copilot",
"description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.",
"version": "1.0.63",
"version": "1.0.64-0",
"license": "SEE LICENSE IN LICENSE.md",

@@ -75,14 +75,14 @@ "type": "module",

"buildMetadata": {
"gitCommit": "c440c72e8c"
"gitCommit": "c157fc5c2a"
},
"optionalDependencies": {
"@github/copilot-linux-x64": "1.0.63",
"@github/copilot-linux-arm64": "1.0.63",
"@github/copilot-linuxmusl-x64": "1.0.63",
"@github/copilot-linuxmusl-arm64": "1.0.63",
"@github/copilot-darwin-x64": "1.0.63",
"@github/copilot-darwin-arm64": "1.0.63",
"@github/copilot-win32-x64": "1.0.63",
"@github/copilot-win32-arm64": "1.0.63"
"@github/copilot-linux-x64": "1.0.64-0",
"@github/copilot-linux-arm64": "1.0.64-0",
"@github/copilot-linuxmusl-x64": "1.0.64-0",
"@github/copilot-linuxmusl-arm64": "1.0.64-0",
"@github/copilot-darwin-x64": "1.0.64-0",
"@github/copilot-darwin-arm64": "1.0.64-0",
"@github/copilot-win32-x64": "1.0.64-0",
"@github/copilot-win32-arm64": "1.0.64-0"
}
}

@@ -1,2 +0,2 @@

(()=>{const stack=new Error().stack;stack&&(globalThis._sentryDebugIds=globalThis._sentryDebugIds||{},globalThis._sentryDebugIds[stack]="681c6034-2175-5090-ad51-7696c19c74f3",globalThis._sentryDebugIdIdentifier="sentry-dbid-681c6034-2175-5090-ad51-7696c19c74f3");})();
(()=>{const stack=new Error().stack;stack&&(globalThis._sentryDebugIds=globalThis._sentryDebugIds||{},globalThis._sentryDebugIds[stack]="b9574cfd-c34f-573a-bb44-bcc9523e9ce0",globalThis._sentryDebugIdIdentifier="sentry-dbid-b9574cfd-c34f-573a-bb44-bcc9523e9ce0");})();

@@ -53,3 +53,3 @@ /*---------------------------------------------------------------------------------------------

const __dirname = __path.dirname(__filename);
import{parentPort as T,workerData as B}from"node:worker_threads";var m=class{initialQueue=[];initialQueueResolvers=Promise.withResolvers();logWriter=null;writePromise=this.initialQueueResolvers.promise;setLogWriter(r){this.logWriter=r;for(let t of this.initialQueue)this.writePromise=this.logWriter.writeLog(t.method,t.message);this.initialQueue=[],this.initialQueueResolvers.resolve()}async flush(){await this.writePromise}async dispose(){await this.flush()}outputPath(){return this.logWriter?.outputPath()}logToLevel(r,t){this.logWriter?this.writePromise=this.logWriter.writeLog(r,t):this.initialQueue.push({method:r,message:t})}info(r){this.logToLevel("info",r)}debug(r){this.logToLevel("debug",r)}warning(r){this.logToLevel("warning",r)}error(r){this.logToLevel("error",r instanceof Error?r.message:r)}log(r){this.error(r)}isDebug(){return!1}shouldLog(r){return!0}notice(r){this.info(r instanceof Error?r.message:r)}startGroup(r,t){this.info(`--- Start of group: ${r} ---`)}endGroup(r){this.info("--- End of group ---")}},u=new m;import{createRequire as j}from"node:module";import*as n from"node:fs/promises";import*as a from"node:path";import{createHash as W}from"node:crypto";import{join as l,basename as oe}from"node:path";import{homedir as h}from"node:os";function A(){return process.env.XDG_CACHE_HOME||l(h(),".cache")}function b(){if(process.platform==="darwin")return l(h(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||l(h(),".cache");return l(e,"copilot")}return l(A(),"copilot")}function D(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 y(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 D(r)}var H=1,I=".complete";var w={"win32-x64":"win-x64","win32-arm64":"win-arm64","linux-x64":"linux-x64","darwin-arm64":"osx-arm64"};function O(){return typeof __foundryRequire<"u"&&__foundryRequire||j(import.meta.url)}var f;function J(){if(f)return f;try{let e=O()("foundry-local-sdk/script/install-utils.cjs");if(typeof e.runInstall!="function")throw new Error(`Expected exports {runInstall: function}, got: ${JSON.stringify(Object.fromEntries(Object.entries(e).map(([r,t])=>[r,typeof t])))}`);return f=e,f}catch(e){throw new Error(`Failed to load foundry-local-sdk/script/install-utils.cjs: ${y(e)}. 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 U(){if(g)return g;try{let e=O()("foundry-local-sdk/deps_versions.json");if(typeof e["foundry-local-core"]?.nuget!="string"||typeof e.onnxruntime?.version!="string"||typeof e["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=e,g}catch(e){throw new Error(`Failed to load foundry-local-sdk/deps_versions.json: ${y(e)}. 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(e=process.platform){let r=U();return[{name:"Microsoft.AI.Foundry.Local.Core",version:r["foundry-local-core"].nuget},{name:e==="linux"?"Microsoft.ML.OnnxRuntime.Gpu.Linux":"Microsoft.ML.OnnxRuntime.Foundry",version:r.onnxruntime.version},{name:"Microsoft.ML.OnnxRuntimeGenAI.Foundry",version:r["onnxruntime-genai"].version}]}function C(e){return e==="win32"?".dll":e==="darwin"?".dylib":".so"}function V(e,r){return a.join(e,`Microsoft.AI.Foundry.Local.Core${C(r)}`)}function q(e){let r=C(e),t=e==="win32"?"":"lib";return[`Microsoft.AI.Foundry.Local.Core${r}`,`${t}onnxruntime${r}`,`${t}onnxruntime-genai${r}`]}function G(e,r=process.platform,t=process.arch){let o=w[`${r}-${t}`];if(!o)throw new Error(`Voice mode not supported on ${r}-${t}`);let i=e??process.env.COPILOT_CACHE_HOME??b(),s=S(r),c=W("sha256").update(JSON.stringify({schema:H,artifacts:s})).digest("hex").slice(0,12);return a.join(i,"foundry",c,o)}async function M(e={}){let r=e.platform??process.platform,t=e.arch??process.arch,o=`${r}-${t}`;if(!w[o])throw new Error(`Voice mode is not supported on ${o}. Supported platforms: ${Object.keys(w).join(", ")}.`);let s=G(e.cacheRoot,r,t),c=V(s,r),d=q(r);return await _(s,d)?{corePath:c}:(e.onDownloadStart?.(),await K(s,r,d,e.runInstall),{corePath:c})}async function _(e,r){return await v(a.join(e,I))?(await Promise.all(r.map(o=>v(a.join(e,o))))).every(Boolean):!1}async function v(e){try{return await n.access(e),!0}catch{return!1}}async function K(e,r,t,o){let i=a.dirname(e);await n.mkdir(i,{recursive:!0});let s=a.join(i,`.tmp-${a.basename(e)}-${process.pid}-${Date.now()}`);await n.mkdir(s,{recursive:!0});try{let c=o??J().runInstall,d=S(r);await z(()=>c(d,{binDir:s}));for(let P of t)if(!await v(a.join(s,P)))throw new Error(`Foundry runtime download finished but required file is missing: ${P}. RID for ${r} may not be supported by the published packages.`);await n.writeFile(a.join(s,I),""),await Y(s,e,t)}catch(c){throw await n.rm(s,{recursive:!0,force:!0}).catch(()=>{}),c}}async function Y(e,r,t){try{await n.rename(e,r)}catch(o){let i=o.code;if(i==="ENOTEMPTY"||i==="EEXIST"||i==="EPERM"){if(await _(r,t)){await n.rm(e,{recursive:!0,force:!0}).catch(()=>{});return}await n.rm(r,{recursive:!0,force:!0}),await n.rename(e,r);return}throw o}}async function z(e){let r=process.stdout.write.bind(process.stdout),t=process.stderr.write.bind(process.stderr);process.stdout.write=(()=>!0),process.stderr.write=(()=>!0);try{return await e()}finally{process.stdout.write=r,process.stderr.write=t}}var E=class extends Error{constructor(t,o,i){super(t,i);this.code=o;this.name="VoiceBackendError"}};function N(e){return e instanceof E?{message:e.message,code:e.code}:e instanceof Error?{message:e.message}:{message:String(e)}}function $(e){return e instanceof Error?e:new Error(String(e))}var Q=16;function x(e){return R(e,new WeakSet,0)}function R(e,r,t){if(t>=Q)return"<cause chain truncated>";if(typeof e=="object"&&e!==null){if(r.has(e))return"<cyclic cause>";r.add(e)}if(!(e instanceof Error))return String(e);let o=e.stack??`${e.name}: ${e.message}`;if(e.cause===void 0)return o;let i=R(e.cause,r,t+1);return`${o}
Caused by: ${i}`}var k=16*1024,L=class{constructor(r){this.port=r}writeLog(r,t){let o={kind:"log",level:r,message:X(t)};try{this.port.postMessage(o)}catch{}return Promise.resolve()}outputPath(){return"<voice-worker>"}};function F(e,r=u){r.setLogWriter(new L(e))}function X(e){return e.length<=k?e:`${e.slice(0,k)}\u2026 [truncated, ${e.length-k} more chars]`}if(!T)throw new Error("voice-installer.worker.js must be loaded as a worker thread.");var p=T;F(p);var Z=B??{};async function ee(){try{let r={kind:"ok",location:await M({cacheRoot:Z.cacheRoot,onDownloadStart:()=>{let t={kind:"download-started"};p.postMessage(t)}})};p.postMessage(r)}catch(e){let r=$(e);u.error(`[voice-installer worker] install failed: ${x(r)}`);let t={kind:"error",error:N(r)};p.postMessage(t)}finally{setImmediate(()=>process.exit(0))}}ee().catch(e=>{u.error(`[voice-installer worker] fatal: ${x(e)}`),process.exit(1)});
import{parentPort as T,workerData as B}from"node:worker_threads";var m=class{initialQueue=[];initialQueueResolvers=Promise.withResolvers();logWriter=null;writePromise=this.initialQueueResolvers.promise;setLogWriter(r){this.logWriter=r;for(let t of this.initialQueue)this.writePromise=this.logWriter.writeLog(t.method,t.message);this.initialQueue=[],this.initialQueueResolvers.resolve()}async flush(){await this.writePromise}async dispose(){await this.flush()}outputPath(){return this.logWriter?.outputPath()}logToLevel(r,t){this.logWriter?this.writePromise=this.logWriter.writeLog(r,t):this.initialQueue.push({method:r,message:t})}info(r){this.logToLevel("info",r)}debug(r){this.logToLevel("debug",r)}warning(r){this.logToLevel("warning",r)}error(r){this.logToLevel("error",r instanceof Error?r.message:r)}log(r){this.error(r)}isDebug(){return!1}shouldLog(r){return!0}notice(r){this.info(r instanceof Error?r.message:r)}startGroup(r,t){this.info(`--- Start of group: ${r} ---`)}endGroup(r){this.info("--- End of group ---")}},u=new m;import{createRequire as j}from"node:module";import*as n from"node:fs/promises";import*as a from"node:path";import{createHash as W}from"node:crypto";import{join as l,basename as oe}from"node:path";import{homedir as h}from"node:os";function A(){return process.env.XDG_CACHE_HOME||l(h(),".cache")}function b(){if(process.platform==="darwin")return l(h(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||l(h(),".cache");return l(e,"copilot")}return l(A(),"copilot")}function D(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 y(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 D(r)}var H=1,I=".complete";var w={"win32-x64":"win-x64","win32-arm64":"win-arm64","linux-x64":"linux-x64","darwin-arm64":"osx-arm64"};function S(){return typeof __foundryRequire<"u"&&__foundryRequire||j(import.meta.url)}var f;function U(){if(f)return f;try{let e=S()("foundry-local-sdk/script/install-utils.cjs");if(typeof e.runInstall!="function")throw new Error(`Expected exports {runInstall: function}, got: ${JSON.stringify(Object.fromEntries(Object.entries(e).map(([r,t])=>[r,typeof t])))}`);return f=e,f}catch(e){throw new Error(`Failed to load foundry-local-sdk/script/install-utils.cjs: ${y(e)}. 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 p;function J(){if(p)return p;try{let e=S()("foundry-local-sdk/deps_versions.json");if(typeof e["foundry-local-core"]?.nuget!="string"||typeof e.onnxruntime?.version!="string"||typeof e["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 p=e,p}catch(e){throw new Error(`Failed to load foundry-local-sdk/deps_versions.json: ${y(e)}. 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 O(e=process.platform){let r=J();return[{name:"Microsoft.AI.Foundry.Local.Core",version:r["foundry-local-core"].nuget},{name:e==="linux"?"Microsoft.ML.OnnxRuntime.Gpu.Linux":"Microsoft.ML.OnnxRuntime.Foundry",version:r.onnxruntime.version},{name:"Microsoft.ML.OnnxRuntimeGenAI.Foundry",version:r["onnxruntime-genai"].version}]}function C(e){return e==="win32"?".dll":e==="darwin"?".dylib":".so"}function V(e,r){return a.join(e,`Microsoft.AI.Foundry.Local.Core${C(r)}`)}function q(e){let r=C(e),t=e==="win32"?"":"lib";return[`Microsoft.AI.Foundry.Local.Core${r}`,`${t}onnxruntime${r}`,`${t}onnxruntime-genai${r}`]}function G(e,r=process.platform,t=process.arch){let o=w[`${r}-${t}`];if(!o)throw new Error(`Voice mode not supported on ${r}-${t}`);let i=e??process.env.COPILOT_CACHE_HOME??b(),s=O(r),c=W("sha256").update(JSON.stringify({schema:H,artifacts:s})).digest("hex").slice(0,12);return a.join(i,"foundry",c,o)}async function _(e={}){let r=e.platform??process.platform,t=e.arch??process.arch,o=`${r}-${t}`;if(!w[o])throw new Error(`Voice mode is not supported on ${o}. Supported platforms: ${Object.keys(w).join(", ")}.`);let s=G(e.cacheRoot,r,t),c=V(s,r),d=q(r);return await M(s,d)?{corePath:c}:(e.onDownloadStart?.(),await Y(s,r,d,e.runInstall),{corePath:c})}async function M(e,r){return await v(a.join(e,I))?(await Promise.all(r.map(o=>v(a.join(e,o))))).every(Boolean):!1}async function v(e){try{return await n.access(e),!0}catch{return!1}}async function Y(e,r,t,o){let i=a.dirname(e);await n.mkdir(i,{recursive:!0});let s=a.join(i,`.tmp-${a.basename(e)}-${process.pid}-${Date.now()}`);await n.mkdir(s,{recursive:!0});try{let c=o??U().runInstall,d=O(r);await z(()=>c(d,{binDir:s}));for(let P of t)if(!await v(a.join(s,P)))throw new Error(`Foundry runtime download finished but required file is missing: ${P}. RID for ${r} may not be supported by the published packages.`);await n.writeFile(a.join(s,I),""),await K(s,e,t)}catch(c){throw await n.rm(s,{recursive:!0,force:!0}).catch(()=>{}),c}}async function K(e,r,t){try{await n.rename(e,r)}catch(o){let i=o.code;if(i==="ENOTEMPTY"||i==="EEXIST"||i==="EPERM"){if(await M(r,t)){await n.rm(e,{recursive:!0,force:!0}).catch(()=>{});return}await n.rm(r,{recursive:!0,force:!0}),await n.rename(e,r);return}throw o}}async function z(e){let r=process.stdout.write.bind(process.stdout),t=process.stderr.write.bind(process.stderr);process.stdout.write=(()=>!0),process.stderr.write=(()=>!0);try{return await e()}finally{process.stdout.write=r,process.stderr.write=t}}var E=class extends Error{constructor(t,o,i){super(t,i);this.code=o;this.name="VoiceBackendError"}};function N(e){return e instanceof E?{message:e.message,code:e.code}:e instanceof Error?{message:e.message}:{message:String(e)}}function R(e){return e instanceof Error?e:new Error(String(e))}var Q=16;function x(e){return $(e,new WeakSet,0)}function $(e,r,t){if(t>=Q)return"<cause chain truncated>";if(typeof e=="object"&&e!==null){if(r.has(e))return"<cyclic cause>";r.add(e)}if(!(e instanceof Error))return String(e);let o=e.stack??`${e.name}: ${e.message}`;if(e.cause===void 0)return o;let i=$(e.cause,r,t+1);return`${o}
Caused by: ${i}`}var k=16*1024,L=class{constructor(r){this.port=r}writeLog(r,t){let o={kind:"log",level:r,message:X(t)};try{this.port.postMessage(o)}catch{}return Promise.resolve()}outputPath(){return"<voice-worker>"}};function F(e,r=u){r.setLogWriter(new L(e))}function X(e){return e.length<=k?e:`${e.slice(0,k)}\u2026 [truncated, ${e.length-k} more chars]`}if(!T)throw new Error("voice-installer.worker.js must be loaded as a worker thread.");var g=T;F(g);var Z=B??{};async function ee(){try{let r={kind:"ok",location:await _({cacheRoot:Z.cacheRoot,onDownloadStart:()=>{let t={kind:"download-started"};g.postMessage(t)}})};g.postMessage(r)}catch(e){let r=R(e);u.error(`[voice-installer worker] install failed: ${x(r)}`);let t={kind:"error",error:N(r)};g.postMessage(t)}finally{setImmediate(()=>process.exit(0))}}ee().catch(e=>{u.error(`[voice-installer worker] fatal: ${x(e)}`),process.exit(1)});

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 not supported yet

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 not supported yet

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 not supported yet

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 not supported yet

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 not supported yet

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 not supported yet

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 not supported yet

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 not supported yet

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 not supported yet

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 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

Sorry, the diff of this file is too big to display