🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@github/copilot-win32-x64

Package Overview
Dependencies
Maintainers
23
Versions
281
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/copilot-win32-x64 - npm Package Compare versions

Comparing version
1.0.66-1
to
1.0.66-2
+21
definitions/sidekick/test-sidekick-trigger-once.yaml
name: test-sidekick-trigger-once
displayName: Test Sidekick (Trigger Once)
description: Test-only sidekick agent used by the E2E and integration test suites to exercise triggerOnce sidekick behavior. Not for production use.
model:
- claude-haiku-4.5
- gpt-5.4-mini
tools:
- send_inbox
promptParts:
includeOutputChannelInstructions: inbox
prompt: |
You are a test-only sidekick agent. Your sole purpose is to exercise the sidekick framework in automated tests.
Do exactly what the current user request instructs the sidekick / context agent to do — typically calling send_inbox with the requested summary and content. Follow the instructions literally and do not add extra commentary.
sidekick:
triggers:
- user.message
behavior: restart
triggerOnce: true
maxSendsPerTurn: 1
+1
-0

@@ -37,2 +37,3 @@ name: github-context

- session.context_changed
triggerOnce: true
cancelOnNewTurn: true

@@ -39,0 +40,0 @@ maxSendsPerTurn: 1

+1
-1

@@ -9,3 +9,3 @@ #!/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",L=null,Ze=()=>{if(!L)if(Y()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,L=process.report.getReport(),process.report.excludeNetwork=e}else L={};return L};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",S=2048,tr=e=>{let r=y.openSync(e,"r"),t=Buffer.alloc(S),n=y.readSync(r,t,0,S,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(S);y.read(o,i,0,S,0,(s,c)=>{r(i.subarray(0,c)),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 c=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(c,c+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:C,SELF_PATH:ie,readFile:w,readFileSync:I}=Z(),{interpreterPath:se}=re(),u,f,d,ce="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",ae=()=>m||new Promise(e=>{ne.exec(ce,(r,t)=>{m=r?" ":t,e(m)})}),le=()=>{if(!m)try{m=ne.execSync(ce,{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(C);f=me(e)}catch{}return f},cr=()=>{if(f!==void 0)return f;f=null;try{let e=I(C);f=me(e)}catch{}return f},ar=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 ar(),!e&&(e=await sr(),e||(e=fe()),!e))){let r=await ae();e=de(r)}return e},he=()=>{let e=null;if(b()&&(e=lr(),!e&&(e=cr(),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(C)).match(ue);r&&(d=r[1])}catch{}return d},pr=()=>{if(d!==void 0)return d;d=null;try{let r=I(C).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 ae();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 k}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 a,basename as U}from"node:path";import{homedir as E}from"node:os";function W(){return process.env.XDG_CACHE_HOME||a(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 a(E(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||a(E(),".cache");return a(e,"copilot")}return a(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(a(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(a(Xe(),"pkg")),e.push(a(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(a(process.env.COPILOT_HOME,"pkg")),e.push(a(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=a(n,i);try{await Ye(a(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 Le}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 Se(){let e=Ee();return K().flatMap(r=>[Le(r,"universal"),Le(r,e)])}function yr(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.66-1"}async function Ce(e,r){let t=A(e,"app.js"),n=yr()===V,o=G();if(r&&(o||q()&&!n)){let i=Se(),s=await J("app.js",...i);if(o){let c=s.find(h=>hr(h)===o);c?t=A(c,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version
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",L=null,Ze=()=>{if(!L)if(Y()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,L=process.report.getReport(),process.report.excludeNetwork=e}else L={};return L};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",S=2048,tr=e=>{let r=y.openSync(e,"r"),t=Buffer.alloc(S),n=y.readSync(r,t,0,S,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(S);y.read(o,i,0,S,0,(s,c)=>{r(i.subarray(0,c)),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 c=e.readUInt32LE(i+8),h=e.readUInt32LE(i+32);return e.subarray(c,c+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:C,SELF_PATH:ie,readFile:w,readFileSync:I}=Z(),{interpreterPath:se}=re(),u,f,d,ce="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",m="",ae=()=>m||new Promise(e=>{ne.exec(ce,(r,t)=>{m=r?" ":t,e(m)})}),le=()=>{if(!m)try{m=ne.execSync(ce,{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(C);f=me(e)}catch{}return f},cr=()=>{if(f!==void 0)return f;f=null;try{let e=I(C);f=me(e)}catch{}return f},ar=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 ar(),!e&&(e=await sr(),e||(e=fe()),!e))){let r=await ae();e=de(r)}return e},he=()=>{let e=null;if(b()&&(e=lr(),!e&&(e=cr(),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(C)).match(ue);r&&(d=r[1])}catch{}return d},pr=()=>{if(d!==void 0)return d;d=null;try{let r=I(C).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 ae();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 k}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 a,basename as U}from"node:path";import{homedir as E}from"node:os";function W(){return process.env.XDG_CACHE_HOME||a(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 a(E(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||a(E(),".cache");return a(e,"copilot")}return a(W(),"copilot")}function K(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(a(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(a(Xe(),"pkg")),e.push(a(W(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(a(process.env.COPILOT_HOME,"pkg")),e.push(a(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=a(n,i);try{await Ye(a(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 Le}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 Se(){let e=Ee();return K().flatMap(r=>[Le(r,"universal"),Le(r,e)])}function yr(){return process.env.COPILOT_CLI_VERSION?process.env.COPILOT_CLI_VERSION:"1.0.66-2"}async function Ce(e,r){let t=A(e,"app.js"),n=yr()===V,o=G();if(r&&(o||q()&&!n)){let i=Se(),s=await J("app.js",...i);if(o){let c=s.find(h=>hr(h)===o);c?t=A(c,"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}

@@ -12,0 +12,0 @@ `);let o=xr(r,"preloads",Pe),i=t(o);if(process.stderr.write(`[extension-fork] resolveBootstrapPath: localBootstrap=${o}, localExists=${i}

{
"name": "@github/copilot-win32-x64",
"version": "1.0.66-1",
"version": "1.0.66-2",
"description": "GitHub Copilot CLI for win32-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]="00f609fa-844c-5bdd-93cb-1b05da8f7826",globalThis._sentryDebugIdIdentifier="sentry-dbid-00f609fa-844c-5bdd-93cb-1b05da8f7826");})();
(()=>{const stack=new Error().stack;stack&&(globalThis._sentryDebugIds=globalThis._sentryDebugIds||{},globalThis._sentryDebugIds[stack]="934f798d-cde5-55d5-949b-ad7c1a1e7a45",globalThis._sentryDebugIdIdentifier="sentry-dbid-934f798d-cde5-55d5-949b-ad7c1a1e7a45");})();

@@ -53,4 +53,4 @@ /*---------------------------------------------------------------------------------------------

const __esmShimDirname = __path.dirname(__esmShimFilename);
import{parentPort as F,workerData as B}from"node:worker_threads";var m=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(){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 m;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 or}from"node:path";import{homedir as h}from"node:os";function D(){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(D(),"copilot")}function W(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 W(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 f;function U(){if(f)return f;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 f=r,f}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 p;function J(){if(p)return p;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 p=r,p}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),d=q(e);return await N(s,d)?{corePath:c}:(r.onDownloadStart?.(),await G(s,e,d,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,d=S(e);await z(()=>c(d,{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 R(r){return r instanceof Error?r:new Error(String(r))}var X=16;function L(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,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 g=F;T(g);var Z=B??{};async function rr(){try{let e={kind:"ok",location:await $({cacheRoot:Z.cacheRoot,onDownloadStart:()=>{let t={kind:"download-started"};g.postMessage(t)}})};g.postMessage(e)}catch(r){let e=R(r);u.error(`[voice-installer worker] install failed: ${L(e)}`);let t={kind:"error",error:_(e)};g.postMessage(t)}finally{setImmediate(()=>process.exit(0))}}rr().catch(r=>{u.error(`[voice-installer worker] fatal: ${L(r)}`),process.exit(1)});
import{parentPort as F,workerData as B}from"node:worker_threads";var f=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(){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 f;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 D(){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(D(),"copilot")}function W(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 W(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),d=q(e);return await N(s,d)?{corePath:c}:(r.onDownloadStart?.(),await G(s,e,d,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,d=S(e);await z(()=>c(d,{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)});
//# 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 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

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