@github/copilot 1.0.40-1 → 1.0.40-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "$schema": "./changelog-schema.json",
3
3
  "unpublished": [],
4
+ "1.0.40-2": [
5
+ {
6
+ "type": "fixed",
7
+ "description": "/update no longer re-submits the original -i prompt after restarting",
8
+ "related_pull_requests": ["https://github.com/github/copilot-agent-runtime/pull/7215"]
9
+ }
10
+ ],
4
11
  "1.0.40-1": [
5
12
  {
6
13
  "type": "added",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@github/copilot",
3
3
  "description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.",
4
- "version": "1.0.40-1",
4
+ "version": "1.0.40-2",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
7
7
  "repository": {
@@ -62,14 +62,14 @@
62
62
  "conpty_console_list_agent.js"
63
63
  ],
64
64
  "buildMetadata": {
65
- "gitCommit": "b609af1"
65
+ "gitCommit": "5eb74bf"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@github/copilot-linux-x64": "1.0.40-1",
69
- "@github/copilot-linux-arm64": "1.0.40-1",
70
- "@github/copilot-darwin-x64": "1.0.40-1",
71
- "@github/copilot-darwin-arm64": "1.0.40-1",
72
- "@github/copilot-win32-x64": "1.0.40-1",
73
- "@github/copilot-win32-arm64": "1.0.40-1"
68
+ "@github/copilot-linux-x64": "1.0.40-2",
69
+ "@github/copilot-linux-arm64": "1.0.40-2",
70
+ "@github/copilot-darwin-x64": "1.0.40-2",
71
+ "@github/copilot-darwin-arm64": "1.0.40-2",
72
+ "@github/copilot-win32-x64": "1.0.40-2",
73
+ "@github/copilot-win32-arm64": "1.0.40-2"
74
74
  }
75
75
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/sdk/index.js CHANGED
@@ -2016,7 +2016,7 @@ ${"ci_failures_hint"}
2016
2016
 
2017
2017
  ${E.content}`,newMessages:[{content:E.context,source:`${BFo}${G.name}`}],skillInvocation:E.invocation,toolTelemetry:{properties:{skillNameHash:wn(G.name),skillSource:G.source,found:"true"},restrictedProperties:{skillName:G.name,pluginName:G.pluginName,pluginVersion:G.pluginVersion},metrics:{skillContentLength:E.content.length}}}})}}var mGt,BFo,KVr,hGt=b(()=>{"use strict";Mt();wb();ku();Jyt();Jo();mGt="skill",BFo="skill-",KVr=O.object({skill:O.string().describe('The skill name to invoke. E.g., "pdf" or "code-reviewer"')})});function zVr(){return{name:EP,title:"Task complete",description:["Mark the current task as complete.","Use this tool ONLY when you are confident the task is fully done.","","Guidelines:","- Call this tool only after verifying your changes work correctly","- If you're unsure whether the task is complete, continue working instead of calling this tool","- Err on the side of caution - it's better to do extra verification than to mark incomplete work as done"].join(`
2018
2018
  `),input_schema:cr(pGt),callback:fn(pGt,async t=>{let e=t.summary,r=`\u2713 Task completed: ${t.summary}`;return{textResultForLlm:e,resultType:"success",sessionLog:r,toolTelemetry:{}}}),isTerminal:!0,safeForTelemetry:!0,summariseIntention:um(pGt,t=>t.summary.length>60?t.summary.slice(0,57)+"...":t.summary,"Marking task complete"),instructions:[`Use the ${EP} tool to explicitly mark when you have finished the user's task.`,"","IMPORTANT: Only call this tool when you are confident the task is fully complete.","","When to call:","- After you have completed ALL requested changes","- After tests pass (if applicable)","- After you have verified the solution works correctly","- When you are confident no further work is needed","","When NOT to call:","- If you encountered errors you haven't resolved","- If there are remaining steps to complete","- If you haven't verified your changes work","- If you're unsure whether the task is fully done","","Summary guidelines:","- The summary will be rendered as markdown to the user, and it should include information the user requested or details about what you accomplished","- Think of this summary as the final message you want to send to the user about the results of your work. Include details like you would for any other response to the user.","- Your turn ends as soon as you call this tool, so it is your only chance to communicate the results of your work to the user","- If in the same request you already provided a detailed response to the user, you can keep the summary short (just a few words). Avoid restating details you've already shared.","","CRITICAL: Do NOT mark the task complete prematurely. If in doubt, keep working. Only call this tool when you have high confidence the task is truly finished and verified."].join(`
2019
- `)}}var EP,pGt,Xhe=b(()=>{"use strict";Mt();Jo();EP="task_complete",pGt=O.object({summary:O.string().describe("A summary of what was accomplished.")})});function fGt(t,e,r){let n=e.findIndex(a=>a.name===IGt),o=n!==-1?e.splice(n,1).at(0):void 0,s=o?{...o,name:gGt,safeForTelemetry:!0}:void 0;r&&!iYe(r)||t?.webSearch!==!0&&s&&e.push(s)}var IGt,gGt,yZe=b(()=>{"use strict";aYe();IGt="github-mcp-server-web_search",gGt="web_search"});function UFo(t,e,r){return{kind:"telemetry",telemetry:{event:"timing",properties:{name:t,...r!==void 0?{success:r?"true":"false"}:{}},restrictedProperties:{},metrics:{durationMs:e}}}}async function bGt(t,e,r,n,o){try{await t.progress(UFo(r,n,o))}catch(s){e.warning(`Failed to emit timing telemetry (${r}): ${V(s)}`)}}var XFo,iIa,jVr=b(()=>{"use strict";pt();XFo=["launch.firewall_mkcert_install","launch.firewall_prepare"],iIa=new Set(XFo)});var JFo,GZe,$Vr=b(()=>{"use strict";ZK();sa();JFo="Quota is insufficient to finish this session. Do not call any tools. Provide a brief final response that quota is insufficient to finish, then end the session.",GZe=class{callback;logger;settings;constructor(e,r,n){this.callback=e,this.logger=r,this.settings=n}createTelemetryEvent(e,r,n){return{kind:"telemetry",telemetry:{event:"check_quota_processor",properties:{outcome:e,callId:r.callId},restrictedProperties:{},metrics:{turn:r.turn,retry:r.retry,hasCallback:this.callback?.checkQuota?1:0,hasEnoughQuota:n===void 0?void 0:n?1:0}}}}async*preRequest(e){if(!vr(this.settings,"copilot_coding_agent_token_based_billing")){yield this.createTelemetryEvent("feature_flag_disabled",e);return}if(!this.callback?.checkQuota){yield this.createTelemetryEvent("callback_unavailable",e);return}if(e.retry>0){yield this.createTelemetryEvent("retry_skipped",e);return}let r=await this.callback.checkQuota({});if(!r){yield this.createTelemetryEvent("quota_response_missing",e);return}if(r.has_enough_quota){yield this.createTelemetryEvent("quota_sufficient",e,!0);return}this.logger.info("CheckQuotaProcessor: Quota is insufficient to finish, requesting model to wrap up session");let n={role:"user",content:Bct(JFo)};e.messages.push(n),yield{kind:"message",turn:e.turn,callId:e.callId,message:n,source:"runtime-quota-check"},yield this.createTelemetryEvent("quota_insufficient_injected",e,!1)}toJSON(){return JSON.stringify({type:"CheckQuotaProcessor"})}}});var EZe,AGt,Xz,Uz=b(()=>{"use strict";pt();Mct();sa();EZe=class{settings;logger;gitHandler;location;commitPriorToCompletionWithTools;jitInstructions;emittedJitInstructions;constructor(e,r,n,o,s,a){this.settings=e,this.logger=r,this.gitHandler=n,this.location=o,this.commitPriorToCompletionWithTools=s,this.jitInstructions=a||{},this.emittedJitInstructions=new Set}toJSON(){return"JitInstructionsProcessor"}async*preRequest(e){if(!(!this.settings.timeoutMs||!this.settings.startTimeMs)&&this.jitInstructions&&Object.keys(this.jitInstructions).length>0){let r,n=async()=>{if(r===void 0)try{r=(await this.gitHandler.getChangedPaths(this.location,"HEAD",this.commitPriorToCompletionWithTools)).length}catch(l){this.logger.error(`Failed to get changed paths, err: ${V(l)}`),r=1}return r},o=[];for(let[l,c]of Object.entries(this.jitInstructions)){let u=LFt(this.settings,c.percentRemainingOfTimeout);u.isWithin&&o.push({config:c,withinMs:u.withinMs})}let s=o.map(({config:l,withinMs:c})=>{let u=typeof l.instruction=="function"?l.instruction(this.location):l.instruction;return{config:l,withinMs:c,instruction:u}}).filter(({instruction:l})=>!this.emittedJitInstructions.has(l)),a;for(let{config:l,withinMs:c,instruction:u}of s)(l.whenNoPathsChanged?await n()===0:!0)&&(!a||c<a.withinMs)&&(a={withinMs:c,instruction:u});if(a){this.logger.debug(`Adding JIT instructions to the history: ${a.instruction}`),this.emittedJitInstructions.add(a.instruction);let l={role:"user",content:a.instruction};e.messages.push(l),yield{kind:"message",turn:e.turn,callId:e.callId,message:l,source:"jit-instruction"}}}}},AGt={remindWhereToDoWork:{instruction:eGr,percentRemainingOfTimeout:1/2,whenNoPathsChanged:!0},completeAsSoonAsPossible:{instruction:y2e.completeAsSoonAsPossible,percentRemainingOfTimeout:1/6},commitNow:{instruction:y2e.commitNow,percentRemainingOfTimeout:2/15},finalAnswerNeeded:{instruction:y2e.finalAnswerNeeded,percentRemainingOfTimeout:1/10}},Xz={wrapUpSoon:{instruction:G2e.wrapUpSoon,percentRemainingOfTimeout:1/4},finishNow:{instruction:G2e.finishNow,percentRemainingOfTimeout:1/5},finalAnswer:{instruction:G2e.finalAnswer,percentRemainingOfTimeout:1/6}}});var eHr=b(()=>{"use strict";eo();Ea()});import*as tHr from"fs";import*as rHr from"path";async function nHr(t){if(!tHr.existsSync(t))throw new Error(`Directory ${t} does not exist.`);return new Promise((e,r)=>{let n=[],o=jot({gzip:!0,cwd:t,filter:s=>{let a=rHr.basename(s);return![".git",".svn",".hg",".bzr"].includes(a)}},["."]);o.on("error",s=>r(s)),o.on("data",s=>n.push(s)),o.on("end",()=>{let a=Buffer.concat(n).toString("base64");e(a)}),o.end()})}function oHr(t,e=!1){function r(n){let o=n.input_schema,s=o&&typeof o=="object"&&"properties"in o?o.properties:void 0,a=o&&typeof o=="object"&&"required"in o&&Array.isArray(o.required)?o.required.filter(l=>typeof l=="string"):void 0;return s?Object.entries(s).map(([l,c])=>{let d=a?.includes(l)??!1?"(required)":"(optional)",m=typeof c.type=="string"?c.type:c.type!==void 0?JSON.stringify(c.type):"",h=c.description??"",p=c.enum?`[${c.enum.map(I=>String(I)).join("|")}]`:"";return`
2019
+ `)}}var EP,pGt,Xhe=b(()=>{"use strict";Mt();Jo();EP="task_complete",pGt=O.object({summary:O.string().describe("A summary of what was accomplished.")})});function fGt(t,e,r){let n=e.findIndex(a=>a.name===IGt),o=n!==-1?e.splice(n,1).at(0):void 0,s=o?{...o,name:gGt,safeForTelemetry:!0}:void 0;r&&!iYe(r)||t?.webSearch!==!0&&s&&e.push(s)}var IGt,gGt,yZe=b(()=>{"use strict";aYe();IGt="github-mcp-server-web_search",gGt="web_search"});function UFo(t,e,r){return{kind:"telemetry",telemetry:{event:"timing",properties:{name:t,...r!==void 0?{success:r?"true":"false"}:{}},restrictedProperties:{},metrics:{durationMs:e}}}}async function bGt(t,e,r,n,o){try{await t.progress(UFo(r,n,o))}catch(s){e.warning(`Failed to emit timing telemetry (${r}): ${V(s)}`)}}var XFo,iIa,jVr=b(()=>{"use strict";pt();XFo=["launch.firewall_mkcert_install","launch.firewall_prepare"],iIa=new Set(XFo)});var JFo,GZe,$Vr=b(()=>{"use strict";ZK();sa();JFo="Quota is insufficient to finish this session. Do not call any tools. Provide a brief final response that quota is insufficient to finish, then end the session.",GZe=class{callback;logger;settings;constructor(e,r,n){this.callback=e,this.logger=r,this.settings=n}createTelemetryEvent(e,r,n){return{kind:"telemetry",telemetry:{event:"check_quota_processor",properties:{outcome:e,callId:r.callId},restrictedProperties:{},metrics:{turn:r.turn,retry:r.retry,hasCallback:this.callback?.checkQuota?1:0,hasEnoughQuota:n===void 0?void 0:n?1:0}}}}async*preRequest(e){let r=`callId=${e.callId} turn=${e.turn} retry=${e.retry}`;if(this.logger.info(`in-session runtime checkQuota callback: preRequest invoked (${r})`),!vr(this.settings,"copilot_coding_agent_token_based_billing")){this.logger.info(`in-session runtime checkQuota callback: skipped, feature flag copilot_coding_agent_token_based_billing is disabled (${r})`),yield this.createTelemetryEvent("feature_flag_disabled",e);return}if(!this.callback?.checkQuota){this.logger.info(`in-session runtime checkQuota callback: skipped, callback.checkQuota is not available (${r})`),yield this.createTelemetryEvent("callback_unavailable",e);return}if(e.retry>0){this.logger.info(`in-session runtime checkQuota callback: skipped on retry, only runs on initial request (${r})`),yield this.createTelemetryEvent("retry_skipped",e);return}let n=await this.callback.checkQuota({});if(!n){this.logger.warning(`in-session runtime checkQuota callback: quota response missing, allowing session to continue (${r})`),yield this.createTelemetryEvent("quota_response_missing",e);return}if(n.has_enough_quota){this.logger.info(`in-session runtime checkQuota callback: quota is sufficient, continuing session (${r})`),yield this.createTelemetryEvent("quota_sufficient",e,!0);return}this.logger.info(`in-session runtime checkQuota callback: quota is insufficient (${r}), requesting model to wrap up session`);let o={role:"user",content:Bct(JFo)};e.messages.push(o),this.logger.info(`in-session runtime checkQuota callback: injected wrap-up user message into request (${r})`),yield{kind:"message",turn:e.turn,callId:e.callId,message:o,source:"runtime-quota-check"},yield this.createTelemetryEvent("quota_insufficient_injected",e,!1)}toJSON(){return JSON.stringify({type:"CheckQuotaProcessor"})}}});var EZe,AGt,Xz,Uz=b(()=>{"use strict";pt();Mct();sa();EZe=class{settings;logger;gitHandler;location;commitPriorToCompletionWithTools;jitInstructions;emittedJitInstructions;constructor(e,r,n,o,s,a){this.settings=e,this.logger=r,this.gitHandler=n,this.location=o,this.commitPriorToCompletionWithTools=s,this.jitInstructions=a||{},this.emittedJitInstructions=new Set}toJSON(){return"JitInstructionsProcessor"}async*preRequest(e){if(!(!this.settings.timeoutMs||!this.settings.startTimeMs)&&this.jitInstructions&&Object.keys(this.jitInstructions).length>0){let r,n=async()=>{if(r===void 0)try{r=(await this.gitHandler.getChangedPaths(this.location,"HEAD",this.commitPriorToCompletionWithTools)).length}catch(l){this.logger.error(`Failed to get changed paths, err: ${V(l)}`),r=1}return r},o=[];for(let[l,c]of Object.entries(this.jitInstructions)){let u=LFt(this.settings,c.percentRemainingOfTimeout);u.isWithin&&o.push({config:c,withinMs:u.withinMs})}let s=o.map(({config:l,withinMs:c})=>{let u=typeof l.instruction=="function"?l.instruction(this.location):l.instruction;return{config:l,withinMs:c,instruction:u}}).filter(({instruction:l})=>!this.emittedJitInstructions.has(l)),a;for(let{config:l,withinMs:c,instruction:u}of s)(l.whenNoPathsChanged?await n()===0:!0)&&(!a||c<a.withinMs)&&(a={withinMs:c,instruction:u});if(a){this.logger.debug(`Adding JIT instructions to the history: ${a.instruction}`),this.emittedJitInstructions.add(a.instruction);let l={role:"user",content:a.instruction};e.messages.push(l),yield{kind:"message",turn:e.turn,callId:e.callId,message:l,source:"jit-instruction"}}}}},AGt={remindWhereToDoWork:{instruction:eGr,percentRemainingOfTimeout:1/2,whenNoPathsChanged:!0},completeAsSoonAsPossible:{instruction:y2e.completeAsSoonAsPossible,percentRemainingOfTimeout:1/6},commitNow:{instruction:y2e.commitNow,percentRemainingOfTimeout:2/15},finalAnswerNeeded:{instruction:y2e.finalAnswerNeeded,percentRemainingOfTimeout:1/10}},Xz={wrapUpSoon:{instruction:G2e.wrapUpSoon,percentRemainingOfTimeout:1/4},finishNow:{instruction:G2e.finishNow,percentRemainingOfTimeout:1/5},finalAnswer:{instruction:G2e.finalAnswer,percentRemainingOfTimeout:1/6}}});var eHr=b(()=>{"use strict";eo();Ea()});import*as tHr from"fs";import*as rHr from"path";async function nHr(t){if(!tHr.existsSync(t))throw new Error(`Directory ${t} does not exist.`);return new Promise((e,r)=>{let n=[],o=jot({gzip:!0,cwd:t,filter:s=>{let a=rHr.basename(s);return![".git",".svn",".hg",".bzr"].includes(a)}},["."]);o.on("error",s=>r(s)),o.on("data",s=>n.push(s)),o.on("end",()=>{let a=Buffer.concat(n).toString("base64");e(a)}),o.end()})}function oHr(t,e=!1){function r(n){let o=n.input_schema,s=o&&typeof o=="object"&&"properties"in o?o.properties:void 0,a=o&&typeof o=="object"&&"required"in o&&Array.isArray(o.required)?o.required.filter(l=>typeof l=="string"):void 0;return s?Object.entries(s).map(([l,c])=>{let d=a?.includes(l)??!1?"(required)":"(optional)",m=typeof c.type=="string"?c.type:c.type!==void 0?JSON.stringify(c.type):"",h=c.description??"",p=c.enum?`[${c.enum.map(I=>String(I)).join("|")}]`:"";return`
2020
2020
  - ${l} ${d}: ${m} ${p}
2021
2021
  ${h}`}).join(""):"No Input Schema available. Use your own judgement to provide the correct input"}return`**${t.name}**: ${t.description}`+(e?`
2022
2022
  Input Schema: ${r(t)}`:"")}var CGt=b(()=>{"use strict";Eae()});import sHr from"path";var KFo,yGt,qFo,zFo,jFo,$Fo,NZe,iHr=b(()=>{"use strict";qOe();Iu();fu();CGt();pt();KFo="swe-mini2-genai-v2",yGt="",qFo=600,zFo=1e3,jFo=["swe-mini2-genai-v2"],$Fo=5,NZe=class{constructor(e,r,n,o,s){this.settings=e;this.logger=r;this.runLocal=o;this.retryPolicy=s;if(n?.trim()&&!jFo.includes(n))throw new Error(`Model '${n}' is not supported`);this.model=n?.trim()||KFo,this._sessionId=cf(this.settings)}_sessionId;_projectLocation;model;async*run(e,r,n=[],o){let s={session_id:this._sessionId,model:this.model,messages:e,preset_instruction:"no_question",additional_instruction:r,cot_juice:512,search_folder_path:this._projectLocation,tools:n,tool_execution_mode:this.runLocal?"local":void 0,max_episode_steps:zFo},a=this.stream("/roll","POST",s,o),l=new Set;for await(let c of a){let u=c;l.has(u.id)||(l.add(u.id),yield u)}}async newSession(e){if(!this.runLocal){let n=await this.request("/new_session","POST",{idle_ttl:qFo},e);if(!n.session_id)throw new Error("Failed to create a new session");this._sessionId=n.session_id,this.logger.info(`Initialized session with ID: ${this._sessionId}`)}return{sessionId:this._sessionId}}async initializeProject(e,r){if(this._projectLocation=e,!this.runLocal){let n=await nHr(e),o={session_id:this._sessionId,zip_base64:n,folder_name:sHr.basename(e)},a=(await this.request("/upload","POST",o,r)).unzipped_folder_path;this._projectLocation=a||`/root/${sHr.basename(e)}`}return this._projectLocation}async request(e,r="GET",n,o){return await(await this.fetch(e,r,n,o)).json()}async*stream(e,r="GET",n,o){let a=(await this.fetch(e,r,n,o)).body?.getReader();if(!a)throw new Error("No reader available");for await(let l of this.readLines(a,o))if(l.trim())try{yield JSON.parse(l)}catch(c){this.logger.warning(`Failed to parse JSON: '${l}': ${V(c)}`)}}async*readLines(e,r){let n=new TextDecoder,o="";for(;;){let{value:s,done:a}=await e.read();if(a||r?.aborted)break;o+=n.decode(s,{stream:!0});let l=o.split(`
@@ -2444,7 +2444,7 @@ Please conduct thorough research and produce a comprehensive, well-cited answer.
2444
2444
  ${a}`}var xDr=b(()=>{"use strict";Qpe();Che()});var Vj,RNt=b(()=>{"use strict";eo();Vj="COPILOT_LOADER_PID"});async function TDr(t){return(await lm.load(t))?.sandbox?.enabled??!1}async function vNt(t,e){let n=(await lm.load(e))?.sandbox||{};await lm.writeKey("sandbox",{...n,enabled:t},"",e)}var ZDr=b(()=>{"use strict";N$()});var _Dr,UPo,JPo,KPo,FDr=b(()=>{"use strict";ZDr();_Dr={name:"/sandbox",args:[{type:"choice",choices:["enable","disable"]}],help:"Configure sandbox modes",execute:async(t,e)=>{let[r,...n]=e;if(!r)return UPo(t,n);switch(r){case"enable":return JPo(t,n);case"disable":return KPo(t,n);default:return{kind:"add-timeline-entry",entry:{type:"info",text:["Sandbox Command Usage:","/sandbox enable - Enable command sandboxing","/sandbox disable - Disable command sandboxing"].join(`
2445
2445
  `)}}}}},UPo=async(t,e)=>({kind:"add-timeline-entry",entry:{type:"info",text:`Current sandbox status: ${await TDr(t.settings)?"enabled":"disabled"}
2446
2446
 
2447
- Use /sandbox enable or /sandbox disable to change the status.`}}),JPo=async(t,e)=>(await vNt(!0,t.settings),await t.reloadConfig(),{kind:"add-timeline-entry",entry:{type:"info",text:"Sandboxing has been enabled. Use /sandbox disable to change the status."}}),KPo=async(t,e)=>(await vNt(!1,t.settings),await t.reloadConfig(),{kind:"add-timeline-entry",entry:{type:"info",text:"Sandboxing has been disabled. Use /sandbox enable to change the status."}})});function SNt(){return!!process.env.CI||!!process.env.BUILD_NUMBER||!!process.env.RUN_ID||!!process.env.SYSTEM_COLLECTIONURI}function VDr(){return!!process.env.GITHUB_ACTIONS}function HDr(){return process.env.GITHUB_AW==="1"||process.env.GITHUB_AW==="true"}function LNt(){let t=process.env.WEB_CLI_MODE?.trim().toLowerCase();return t==="1"||t==="true"}var QNt=b(()=>{"use strict"});var zE,Hj=b(()=>{"use strict";zE=async t=>new Promise(e=>setTimeout(e,t))});function qPo(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function jT(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&qPo(n)?(M.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return M.info("Retrying without auth token"),await t({})}}var YNt=b(()=>{"use strict";Br()});function PDr(){return process.env.COPILOT_GH_HOST||process.env.GH_HOST||void 0}var kNt=b(()=>{"use strict";VM();pt()});var ONt={};Ai(ONt,{MAX_RECENT_RELEASES:()=>eDo,fetchLatestRelease:()=>$T,fetchReleaseByTag:()=>WNt,getUpdateChannel:()=>FP,getVersion:()=>Lv,getVersionWithoutUpdateCheck:()=>zPo,isPrerelease:()=>DDr,showVersionWithUpdateCheck:()=>jPo});function Lv(){return process.env.COPILOT_CLI_VERSION||"1.0.40-1"}function DDr(){try{let t=(0,x4e.parse)("1.0.40-1");return t!==null&&t.prerelease.length>0}catch{return!1}}function FP(t,e){return t||(e||DDr()?"prerelease":"stable")}function zPo(){return`GitHub Copilot CLI ${_b().version}.
2447
+ Use /sandbox enable or /sandbox disable to change the status.`}}),JPo=async(t,e)=>(await vNt(!0,t.settings),await t.reloadConfig(),{kind:"add-timeline-entry",entry:{type:"info",text:"Sandboxing has been enabled. Use /sandbox disable to change the status."}}),KPo=async(t,e)=>(await vNt(!1,t.settings),await t.reloadConfig(),{kind:"add-timeline-entry",entry:{type:"info",text:"Sandboxing has been disabled. Use /sandbox enable to change the status."}})});function SNt(){return!!process.env.CI||!!process.env.BUILD_NUMBER||!!process.env.RUN_ID||!!process.env.SYSTEM_COLLECTIONURI}function VDr(){return!!process.env.GITHUB_ACTIONS}function HDr(){return process.env.GITHUB_AW==="1"||process.env.GITHUB_AW==="true"}function LNt(){let t=process.env.WEB_CLI_MODE?.trim().toLowerCase();return t==="1"||t==="true"}var QNt=b(()=>{"use strict"});var zE,Hj=b(()=>{"use strict";zE=async t=>new Promise(e=>setTimeout(e,t))});function qPo(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function jT(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&qPo(n)?(M.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return M.info("Retrying without auth token"),await t({})}}var YNt=b(()=>{"use strict";Br()});function PDr(){return process.env.COPILOT_GH_HOST||process.env.GH_HOST||void 0}var kNt=b(()=>{"use strict";VM();pt()});var ONt={};Ai(ONt,{MAX_RECENT_RELEASES:()=>eDo,fetchLatestRelease:()=>$T,fetchReleaseByTag:()=>WNt,getUpdateChannel:()=>FP,getVersion:()=>Lv,getVersionWithoutUpdateCheck:()=>zPo,isPrerelease:()=>DDr,showVersionWithUpdateCheck:()=>jPo});function Lv(){return process.env.COPILOT_CLI_VERSION||"1.0.40-2"}function DDr(){try{let t=(0,x4e.parse)("1.0.40-2");return t!==null&&t.prerelease.length>0}catch{return!1}}function FP(t,e){return t||(e||DDr()?"prerelease":"stable")}function zPo(){return`GitHub Copilot CLI ${_b().version}.
2448
2448
  Run 'copilot update' to check for updates.`}async function jPo(t,e,r){let n=_b();if(process.stdout.write(`GitHub Copilot CLI ${n.version}
2449
2449
  `),Tf())return;let o=FP(t.autoUpdatesChannel,e),s=await $T(o,r);if("error"in s){process.stderr.write(`
2450
2450
  Unable to check for updates: ${String(s.error)}