Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@github/copilot

Package Overview
Dependencies
Maintainers
22
Versions
697
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.53-0
to
1.0.53-1
+10
-8
index.js

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

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

@@ -19,5 +21,5 @@ `),a){let v=a.length>200?a.slice(0,200)+"\u2026":a;process.stdout.write(`Error: ${v}

`),f.question("Save crash report? [y/N] ",v=>{f.close(),m(v.trim().toLowerCase()==="y")})})},O=function(i,a){try{let m=Bt(i);return m.startsWith(a+V)?Vt(m).isFile():!1}catch{return!1}},I=function(i,a){let m=qe?i:[...process.execArgv,ze(import.meta.url),...i],f=Wt(process.execPath,m,{stdio:"inherit",cwd:a,env:Q({COPILOT_RUN_APP:"1",COPILOT_LOADER_PID:e})});process.env.COPILOT_LOADER_DEBUG&&process.stderr.write(`[loader] spawned app child: pid=${f.pid} (loader pid=${e})
`);let l=p=>{try{f.kill(p)}catch{}},v=()=>l("SIGINT"),S=()=>l("SIGTERM"),U=()=>l("SIGHUP"),M=()=>l("SIGQUIT");process.on("SIGINT",v),process.on("SIGTERM",S),process.on("SIGHUP",U),process.on("SIGQUIT",M),f.on("error",p=>{process.off("SIGINT",v),process.off("SIGTERM",S),process.off("SIGHUP",U),process.off("SIGQUIT",M),o(),process.stderr.write(`Failed to start: ${p.message}
`),process.exit(1)}),f.on("exit",(p,Y)=>{if(process.off("SIGINT",v),process.off("SIGTERM",S),process.off("SIGHUP",U),process.off("SIGQUIT",M),p===zt){let w=r();if(w){let D=[...w.argv,"--session-id",w.sessionId];I(D,w.cwd||a)}else I(i,a);return}if(o(),Y)c(),We(),process.kill(process.pid,Y);else if(p!==0){We();let w=n();w&&process.stdin.isTTY?b(p??1,w.lastError).then(async D=>{D&&await $(w,p??1),c(),process.exit(p??1)}).catch(()=>{c(),process.exit(p??1)}):(c(),process.exit(p??1))}else c(),process.exit(0)})};Qt=t,Xt=r,Zt=o,er=s,tr=n,rr=c,nr=b,sr=O,or=I;let e=String(process.pid);async function $(i,a){try{let m=new Date().toISOString().replace(/[:.]/g,"-"),f=process.env.COPILOT_HOME||u(process.env.HOME||process.env.USERPROFILE||"",".copilot"),l=u(f,"crash-reports",`crash-${i.sessionId}-${m}`);qt(l,{recursive:!0,mode:448}),Ge(u(l,"crash-context.json"),JSON.stringify(i,null,2),{mode:384});let v=["# Crash Report","",`**Exit code**: ${a}`,i.errorType?`**Error type**: ${i.errorType}`:"",i.lastError?`**Error**: ${i.lastError}`:"",`**Timestamp**: ${new Date().toISOString()}`,`**Session ID**: ${i.sessionId}`,`**Working directory**: ${i.cwd}`,i.stackTrace?`
`),p.question("Save crash report? [y/N] ",v=>{p.close(),g(v.trim().toLowerCase()==="y")})})},O=function(i,a){try{let g=Bt(i);return g.startsWith(a+V)?Vt(g).isFile():!1}catch{return!1}},w=function(i,a){let g=qe?i:[...process.execArgv,ze(import.meta.url),...i],p=Wt(process.execPath,g,{stdio:"inherit",cwd:a,env:Q({COPILOT_RUN_APP:"1",COPILOT_LOADER_PID:e})});process.env.COPILOT_LOADER_DEBUG&&process.stderr.write(`[loader] spawned app child: pid=${p.pid} (loader pid=${e})
`);let l=m=>{try{p.kill(m)}catch{}},v=()=>l("SIGINT"),S=()=>l("SIGTERM"),U=()=>l("SIGHUP"),M=()=>l("SIGQUIT");process.on("SIGINT",v),process.on("SIGTERM",S),process.on("SIGHUP",U),process.on("SIGQUIT",M),p.on("error",m=>{process.off("SIGINT",v),process.off("SIGTERM",S),process.off("SIGHUP",U),process.off("SIGQUIT",M),o(),process.stderr.write(`Failed to start: ${m.message}
`),process.exit(1)}),p.on("exit",(m,Y)=>{if(process.off("SIGINT",v),process.off("SIGTERM",S),process.off("SIGHUP",U),process.off("SIGQUIT",M),m===zt){let P=r();if(P){let j=[...P.argv,"--session-id",P.sessionId];w(j,P.cwd||a)}else w(i,a);return}if(o(),Y)c(),We(),process.kill(process.pid,Y);else if(m!==0){We();let P=n();P&&process.stdin.isTTY?d(m??1,P.lastError).then(async j=>{j&&await _(P,m??1),c(),process.exit(m??1)}).catch(()=>{c(),process.exit(m??1)}):(c(),process.exit(m??1))}else c(),process.exit(0)})};Qt=t,Xt=r,Zt=o,er=s,tr=n,rr=c,nr=d,sr=O,or=w;let e=String(process.pid);async function _(i,a){try{let g=new Date().toISOString().replace(/[:.]/g,"-"),p=process.env.COPILOT_HOME||u(process.env.HOME||process.env.USERPROFILE||"",".copilot"),l=u(p,"crash-reports",`crash-${i.sessionId}-${g}`);qt(l,{recursive:!0,mode:448}),Ge(u(l,"crash-context.json"),JSON.stringify(i,null,2),{mode:384});let v=["# Crash Report","",`**Exit code**: ${a}`,i.errorType?`**Error type**: ${i.errorType}`:"",i.lastError?`**Error**: ${i.lastError}`:"",`**Timestamp**: ${new Date().toISOString()}`,`**Session ID**: ${i.sessionId}`,`**Working directory**: ${i.cwd}`,i.stackTrace?`
## Stack Trace

@@ -28,5 +30,5 @@

\`\`\``:"",""].filter(Boolean).join(`
`);if(Ge(u(l,"feedback.md"),v,{mode:384}),i.sessionFilePath&&O(i.sessionFilePath,f))try{let S=u(l,"events.jsonl");De(i.sessionFilePath,S),Me(S,384)}catch{}if(i.logFilePath&&O(i.logFilePath,f))try{let S=u(l,"process.log");De(i.logFilePath,S),Me(S,384)}catch{}process.stdout.write(`
`);if(Ge(u(l,"feedback.md"),v,{mode:384}),i.sessionFilePath&&O(i.sessionFilePath,p))try{let S=u(l,"events.jsonl");je(i.sessionFilePath,S),Me(S,384)}catch{}if(i.logFilePath&&O(i.logFilePath,p))try{let S=u(l,"process.log");je(i.logFilePath,S),Me(S,384)}catch{}process.stdout.write(`
Crash report saved to: ${l}${V}
`)}catch(m){process.stderr.write(`Failed to create crash report: ${String(m)}
`)}}I(process.argv.slice(2),process.cwd())}var Qt,Xt,Zt,er,tr,rr,nr,sr,or;
`)}catch(g){process.stderr.write(`Failed to create crash report: ${String(g)}
`)}}w(process.argv.slice(2),process.cwd())}var Qt,Xt,Zt,er,tr,rr,nr,sr,or;
{
"name": "@github/copilot",
"description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.",
"version": "1.0.53-0",
"version": "1.0.53-1",
"license": "SEE LICENSE IN LICENSE.md",

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

"buildMetadata": {
"gitCommit": "26a103b"
"gitCommit": "b40e588"
},
"optionalDependencies": {
"@github/copilot-linux-x64": "1.0.53-0",
"@github/copilot-linux-arm64": "1.0.53-0",
"@github/copilot-linuxmusl-x64": "1.0.53-0",
"@github/copilot-linuxmusl-arm64": "1.0.53-0",
"@github/copilot-darwin-x64": "1.0.53-0",
"@github/copilot-darwin-arm64": "1.0.53-0",
"@github/copilot-win32-x64": "1.0.53-0",
"@github/copilot-win32-arm64": "1.0.53-0"
"@github/copilot-linux-x64": "1.0.53-1",
"@github/copilot-linux-arm64": "1.0.53-1",
"@github/copilot-linuxmusl-x64": "1.0.53-1",
"@github/copilot-linuxmusl-arm64": "1.0.53-1",
"@github/copilot-darwin-x64": "1.0.53-1",
"@github/copilot-darwin-arm64": "1.0.53-1",
"@github/copilot-win32-x64": "1.0.53-1",
"@github/copilot-win32-arm64": "1.0.53-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 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