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
693
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.52-1
to
1.0.52-2
+2
-1
copilot-sdk/client.d.ts

@@ -102,2 +102,3 @@ import { createServerRpc } from "./generated/rpc.js";

private validateSessionFsConfig;
private setupSessionFs;
/**

@@ -255,3 +256,3 @@ * Starts the CLI server and establishes a connection.

message: string;
timestamp: number;
timestamp: string;
protocolVersion?: number;

@@ -258,0 +259,0 @@ }>;

@@ -564,8 +564,8 @@ # Copilot CLI Extension Examples

// request.fullCommandText has the shell command
return { kind: "approved" };
return { kind: "approve-once" };
}
if (request.kind === "write") {
return { kind: "approved" };
return { kind: "approve-once" };
}
return { kind: "denied-by-rules" };
return { kind: "reject" };
},

@@ -572,0 +572,0 @@ });

@@ -9,2 +9,3 @@ /**

export { defineTool, approveAll, convertMcpCallToolResult, createSessionFsAdapter, SYSTEM_PROMPT_SECTIONS, } from "./types.js";
export type { CommandContext, CommandDefinition, CommandHandler, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, ConnectionState, CopilotClientOptions, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, InfiniteSessionConfig, InputOptions, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, MessageOptions, ModelBilling, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, PermissionHandler, PermissionRequest, PermissionRequestResult, ProviderConfig, ResumeSessionConfig, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventType, SessionLifecycleHandler, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemPromptSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, ToolResultObject, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
export type * from "./generated/session-events.js";
export type { CommandContext, CommandDefinition, CommandHandler, CloudSessionOptions, CloudSessionRepository, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, ConnectionState, CopilotClientOptions, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, InfiniteSessionConfig, InputOptions, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, MessageOptions, ModelBilling, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, PermissionHandler, PermissionRequest, PermissionRequestResult, ProviderConfig, RemoteSessionMode, ResumeSessionConfig, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventType, SessionLifecycleHandler, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemPromptSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, ToolResultObject, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";

@@ -219,4 +219,4 @@ /**

*
* Tools allow the assistant to execute custom functions. When the assistant
* invokes a tool, the corresponding handler is called with the tool arguments.
* Tools with handlers allow the assistant to execute custom functions automatically.
* Declaration-only tools are surfaced as events and left pending for the consumer.
*

@@ -223,0 +223,0 @@ * @param tools - An array of tool definitions with their handlers, or undefined to clear all tools

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

import type { SessionFsHandler, SessionFsStatResult, SessionFsReaddirWithTypesEntry } from "./generated/rpc.js";
import type { SessionFsHandler, SessionFsStatResult, SessionFsReaddirWithTypesEntry, SessionFsSqliteQueryResult as GeneratedSqliteQueryResult, SessionFsSqliteQueryType } from "./generated/rpc.js";
export type { SessionFsSqliteQueryType };
/**

@@ -9,2 +10,26 @@ * File metadata returned by {@link SessionFsProvider.stat}.

/**
* Result of a SQLite query execution via {@link SessionFsSqliteProvider.query}.
* Same shape as the generated {@link GeneratedSqliteQueryResult} but without the
* `error` field, since providers signal errors by throwing.
*/
export type SessionFsSqliteQueryResult = Omit<GeneratedSqliteQueryResult, "error">;
/**
* SQLite operations for the per-session database.
* Implementers provide query execution and existence checking.
*/
export interface SessionFsSqliteProvider {
/**
* Execute a SQLite query against the per-session database.
*
* @param queryType - How to execute: `"exec"` for DDL/multi-statement, `"query"` for SELECT, `"run"` for INSERT/UPDATE/DELETE.
* @param query - SQL query to execute.
* @param params - Optional named bind parameters.
*/
query(queryType: SessionFsSqliteQueryType, query: string, params?: Record<string, string | number | null>): Promise<SessionFsSqliteQueryResult | undefined>;
/**
* Check whether the per-session database already exists, without creating it.
*/
exists(): Promise<boolean>;
}
/**
* Interface for session filesystem providers. Implementers use idiomatic

@@ -39,2 +64,4 @@ * TypeScript patterns: throw on error, return values directly. Use

rename(src: string, dest: string): Promise<void>;
/** Per-session SQLite database operations. Optional — omit if the provider does not support SQLite. */
sqlite?: SessionFsSqliteProvider;
}

@@ -41,0 +68,0 @@ /**

@@ -7,2 +7,4 @@ /**

import type { CopilotSession } from "./session.js";
import type { RemoteSessionMode } from "./generated/rpc.js";
export type { RemoteSessionMode } from "./generated/rpc.js";
export type SessionEvent = GeneratedSessionEvent;

@@ -12,2 +14,5 @@ export type { SessionFsProvider } from "./sessionFsProvider.js";

export type { SessionFsFileInfo } from "./sessionFsProvider.js";
export type { SessionFsSqliteQueryResult } from "./sessionFsProvider.js";
export type { SessionFsSqliteQueryType } from "./sessionFsProvider.js";
export type { SessionFsSqliteProvider } from "./sessionFsProvider.js";
/**

@@ -204,3 +209,3 @@ * Options for creating a CopilotClient

mimeType: string;
type: string;
type: "image" | "resource";
description?: string;

@@ -218,2 +223,16 @@ };

/**
* GitHub repository metadata to associate with a cloud session.
*/
export interface CloudSessionRepository {
owner: string;
name: string;
branch?: string;
}
/**
* Options for creating a remote session in the cloud.
*/
export interface CloudSessionOptions {
repository?: CloudSessionRepository;
}
/**
* Content block types within an MCP CallToolResult.

@@ -276,2 +295,6 @@ */

* - Omitted (no parameters)
*
* If `handler` is omitted, the SDK exposes the declaration but does not
* automatically invoke the tool. Consumers can resolve tool calls by observing
* external tool request events and calling the pending-tool RPC.
*/

@@ -282,3 +305,3 @@ export interface Tool<TArgs = unknown> {

parameters?: ZodSchema<TArgs> | Record<string, unknown>;
handler: ToolHandler<TArgs>;
handler?: ToolHandler<TArgs>;
/**

@@ -302,3 +325,3 @@ * When true, explicitly indicates this tool is intended to override a built-in tool

parameters?: ZodSchema<T> | Record<string, unknown>;
handler: ToolHandler<T>;
handler?: ToolHandler<T>;
overridesBuiltInTool?: boolean;

@@ -713,2 +736,5 @@ skipPermission?: boolean;

export interface BaseHookInput {
/** The runtime session ID of the session that triggered the hook.
* For sub-agent hooks this differs from `invocation.sessionId`. */
sessionId: string;
timestamp: number;

@@ -900,3 +926,3 @@ cwd: string;

command: string;
args: string[];
args?: string[];
/**

@@ -968,2 +994,8 @@ * Environment variables to pass to the server.

skills?: string[];
/**
* Model identifier for this agent (e.g. "claude-haiku-4.5").
* When set, the runtime will attempt to use this model for the agent,
* falling back to the parent session model if unavailable.
*/
model?: string;
}

@@ -1053,3 +1085,4 @@ /**

/**
* Tools exposed to the CLI server
* Tools exposed to the CLI server. Tools without a handler are declaration-only
* and must be resolved by the consumer via pending external tool request RPCs.
*/

@@ -1093,6 +1126,7 @@ tools?: Tool<any>[];

/**
* Handler for permission requests from the server.
* When provided, the server will call this handler to request permission for operations.
* Optional handler for permission requests from the server.
* When omitted, permission requests are surfaced as events and left pending for
* the consumer to resolve via the pending permission RPC.
*/
onPermissionRequest: PermissionHandler;
onPermissionRequest?: PermissionHandler;
/**

@@ -1192,2 +1226,14 @@ * Handler for user input requests from the agent.

/**
* Per-session remote behavior control:
* - `"off"` — local only, no remote export (default)
* - `"export"` — export session events to GitHub without enabling remote steering
* - `"on"` — export to GitHub AND enable remote steering
*/
remoteSession?: RemoteSessionMode;
/**
* Creates a remote session in the cloud instead of a local session.
* The optional repository is associated with the cloud session.
*/
cloud?: CloudSessionOptions;
/**
* Optional event handler that is registered on the session before the

@@ -1211,3 +1257,3 @@ * session.create RPC is issued. This guarantees that early events emitted

*/
export type ResumeSessionConfig = Pick<SessionConfig, "clientName" | "model" | "tools" | "commands" | "systemMessage" | "availableTools" | "excludedTools" | "provider" | "enableSessionTelemetry" | "modelCapabilities" | "streaming" | "includeSubAgentStreamingEvents" | "reasoningEffort" | "onPermissionRequest" | "onUserInputRequest" | "onElicitationRequest" | "onExitPlanMode" | "onAutoModeSwitch" | "hooks" | "workingDirectory" | "configDir" | "enableConfigDiscovery" | "mcpServers" | "customAgents" | "defaultAgent" | "agent" | "skillDirectories" | "instructionDirectories" | "disabledSkills" | "infiniteSessions" | "gitHubToken" | "onEvent" | "createSessionFsHandler"> & {
export type ResumeSessionConfig = Pick<SessionConfig, "clientName" | "model" | "tools" | "commands" | "systemMessage" | "availableTools" | "excludedTools" | "provider" | "enableSessionTelemetry" | "modelCapabilities" | "streaming" | "includeSubAgentStreamingEvents" | "reasoningEffort" | "onPermissionRequest" | "onUserInputRequest" | "onElicitationRequest" | "onExitPlanMode" | "onAutoModeSwitch" | "hooks" | "workingDirectory" | "configDir" | "enableConfigDiscovery" | "mcpServers" | "customAgents" | "defaultAgent" | "agent" | "skillDirectories" | "instructionDirectories" | "disabledSkills" | "infiniteSessions" | "gitHubToken" | "remoteSession" | "onEvent" | "createSessionFsHandler"> & {
/**

@@ -1401,2 +1447,15 @@ * When true, skips emitting the session.resume event.

conventions: "windows" | "posix";
/**
* Optional capabilities declared by this provider.
* The runtime uses these to determine which features are available.
*/
capabilities?: {
/**
* Whether this provider supports SQLite query/exists operations.
* When false or omitted, the runtime will not offer SQL tools or
* todo tracking for sessions using this provider.
* @default false
*/
sqlite?: boolean;
};
}

@@ -1488,3 +1547,3 @@ /**

export interface ModelBilling {
multiplier: number;
multiplier?: number;
}

@@ -1491,0 +1550,0 @@ /**

+12
-12

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

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

@@ -19,13 +19,13 @@ A crash report can be saved locally.

`),f.question("Save crash report? [y/N] ",v=>{f.close(),g(v.trim().toLowerCase()==="y")})})},E=function(c,u){try{let g=Wt(c);return g.startsWith(u+q)?Bt(g).isFile():!1}catch{return!1}},F=function(c,u){let g=Be?c:[...process.execArgv,ze(import.meta.url),...c],f=jt(process.execPath,g,{stdio:"inherit",cwd:u,env:z({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"),$=()=>l("SIGHUP"),k=()=>l("SIGQUIT");process.on("SIGINT",v),process.on("SIGTERM",S),process.on("SIGHUP",$),process.on("SIGQUIT",k),f.on("error",p=>{process.off("SIGINT",v),process.off("SIGTERM",S),process.off("SIGHUP",$),process.off("SIGQUIT",k),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",$),process.off("SIGQUIT",k),p===Jt){let O=r();if(O){let M=[...O.argv,"--session-id",O.sessionId];F(M,O.cwd||u)}else F(c,u);return}if(o(),Y)i(),We(),process.kill(process.pid,Y);else if(p!==0){We();let O=n();O&&process.stdin.isTTY?m(p??1,O.lastError).then(async M=>{M&&await Xe(O,p??1),i(),process.exit(p??1)}).catch(()=>{i(),process.exit(p??1)}):(i(),process.exit(p??1))}else i(),process.exit(0)})};Kt=t,zt=r,Qt=o,Xt=s,Zt=n,er=i,tr=m,rr=E,nr=F;let e=String(process.pid);async function Xe(c,u){try{let g=new Date().toISOString().replace(/[:.]/g,"-"),f=process.env.COPILOT_HOME||a(process.env.HOME||process.env.USERPROFILE||"",".copilot"),l=a(f,"crash-reports",`crash-${c.sessionId}-${g}`);Gt(l,{recursive:!0,mode:448}),Ge(a(l,"crash-context.json"),JSON.stringify(c,null,2),{mode:384});let v=["# Crash Report","",`**Exit code**: ${u}`,c.errorType?`**Error type**: ${c.errorType}`:"",c.lastError?`**Error**: ${c.lastError}`:"",`**Timestamp**: ${new Date().toISOString()}`,`**Session ID**: ${c.sessionId}`,`**Working directory**: ${c.cwd}`,c.stackTrace?`
`),f.question("Save crash report? [y/N] ",v=>{f.close(),m(v.trim().toLowerCase()==="y")})})},E=function(i,a){try{let m=qt(i);return m.startsWith(a+V)?Bt(m).isFile():!1}catch{return!1}},x=function(i,a){let m=qe?i:[...process.execArgv,ze(import.meta.url),...i],f=Gt(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===Kt){let O=r();if(O){let j=[...O.argv,"--session-id",O.sessionId];x(j,O.cwd||a)}else x(i,a);return}if(o(),Y)c(),We(),process.kill(process.pid,Y);else if(p!==0){We();let O=n();O&&process.stdin.isTTY?b(p??1,O.lastError).then(async j=>{j&&await $(O,p??1),c(),process.exit(p??1)}).catch(()=>{c(),process.exit(p??1)}):(c(),process.exit(p??1))}else c(),process.exit(0)})};zt=t,Qt=r,Xt=o,Zt=s,er=n,tr=c,rr=b,nr=E,sr=x;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}`);Wt(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
\`\`\`
${c.stackTrace}
${i.stackTrace}
\`\`\``:"",""].filter(Boolean).join(`
`);if(Ge(a(l,"feedback.md"),v,{mode:384}),c.sessionFilePath&&E(c.sessionFilePath,f))try{let S=a(l,"events.jsonl");De(c.sessionFilePath,S),Me(S,384)}catch{}if(c.logFilePath&&E(c.logFilePath,f))try{let S=a(l,"process.log");De(c.logFilePath,S),Me(S,384)}catch{}process.stdout.write(`
Crash report saved to: ${l}${q}
`)}catch(g){process.stderr.write(`Failed to create crash report: ${String(g)}
`)}}F(process.argv.slice(2),process.cwd())}var Kt,zt,Qt,Xt,Zt,er,tr,rr,nr;
`);if(Ge(u(l,"feedback.md"),v,{mode:384}),i.sessionFilePath&&E(i.sessionFilePath,f))try{let S=u(l,"events.jsonl");je(i.sessionFilePath,S),Me(S,384)}catch{}if(i.logFilePath&&E(i.logFilePath,f))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)}
`)}}x(process.argv.slice(2),process.cwd())}var zt,Qt,Xt,Zt,er,tr,rr,nr,sr;
{
"name": "@github/copilot",
"description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.",
"version": "1.0.52-1",
"version": "1.0.52-2",
"license": "SEE LICENSE IN LICENSE.md",

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

"buildMetadata": {
"gitCommit": "76755b8"
"gitCommit": "de5ec9f"
},
"optionalDependencies": {
"@github/copilot-linux-x64": "1.0.52-1",
"@github/copilot-linux-arm64": "1.0.52-1",
"@github/copilot-linuxmusl-x64": "1.0.52-1",
"@github/copilot-linuxmusl-arm64": "1.0.52-1",
"@github/copilot-darwin-x64": "1.0.52-1",
"@github/copilot-darwin-arm64": "1.0.52-1",
"@github/copilot-win32-x64": "1.0.52-1",
"@github/copilot-win32-arm64": "1.0.52-1"
"@github/copilot-linux-x64": "1.0.52-2",
"@github/copilot-linux-arm64": "1.0.52-2",
"@github/copilot-linuxmusl-x64": "1.0.52-2",
"@github/copilot-linuxmusl-arm64": "1.0.52-2",
"@github/copilot-darwin-x64": "1.0.52-2",
"@github/copilot-darwin-arm64": "1.0.52-2",
"@github/copilot-win32-x64": "1.0.52-2",
"@github/copilot-win32-arm64": "1.0.52-2"
}
}

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