@github/copilot 1.0.35-0 → 1.0.35-1
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/app.js +2 -2
- package/package.json +8 -8
- package/prebuilds/darwin-arm64/computer.node +0 -0
- package/prebuilds/darwin-arm64/keytar.node +0 -0
- package/prebuilds/darwin-arm64/pty.node +0 -0
- package/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/prebuilds/darwin-x64/computer.node +0 -0
- package/prebuilds/darwin-x64/keytar.node +0 -0
- package/prebuilds/darwin-x64/pty.node +0 -0
- package/prebuilds/darwin-x64/spawn-helper +0 -0
- package/prebuilds/win32-arm64/computer.node +0 -0
- package/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/prebuilds/win32-arm64/conpty.node +0 -0
- package/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/prebuilds/win32-arm64/keytar.node +0 -0
- package/prebuilds/win32-arm64/win32.node +0 -0
- package/prebuilds/win32-x64/computer.node +0 -0
- package/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/prebuilds/win32-x64/conpty.node +0 -0
- package/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/prebuilds/win32-x64/keytar.node +0 -0
- package/prebuilds/win32-x64/win32.node +0 -0
- package/ripgrep/bin/darwin-arm64/rg +0 -0
- package/ripgrep/bin/darwin-x64/rg +0 -0
- package/ripgrep/bin/win32-arm64/rg.exe +0 -0
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/sdk/index.js +2 -2
package/app.js
CHANGED
|
@@ -4174,7 +4174,7 @@ ${l}`}}}let n=await t.workspace.listCheckpoints();if(n.length===0)return{kind:"a
|
|
|
4174
4174
|
${"\u2500".repeat(40)}
|
|
4175
4175
|
${n}`}}:{kind:"add-timeline-entry",entry:{type:"info",text:"No plan exists for this session."}}}if(r==="rename"){if(!t.workspace)return{kind:"add-timeline-entry",entry:{type:"info",text:"Workspace features are not enabled for this session."}};let n=e.slice(1).join(" ").trim();if(n)return n.length>100?{kind:"add-timeline-entry",entry:{type:"error",text:"Session name must be 100 characters or less."}}:(await t.workspace.renameSession(n),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${n}`}});let o=t.session.instance,s=o.getAuthInfo(),a=t.models;if(!s||!a?.length)return{kind:"add-timeline-entry",entry:{type:"error",text:"Unable to generate a session name (auth or models unavailable). Provide a name with /rename <name>"}};let l=o.getEvents(),c=[];for(let m of l)m.type==="user.message"&&!("source"in m.data&&m.data.source)&&m.data.content&&c.push(m.data.content);if(c.length===0)return{kind:"add-timeline-entry",entry:{type:"error",text:"No conversation history to generate a name from. Provide a name with /rename <name>"}};let u=c.slice(-20).join(`
|
|
4176
4176
|
|
|
4177
|
-
`),d;try{d=await tAt({userMessage:u,availableModels:a,authInfo:s,sessionId:t.session.getSessionId(),featureFlagService:t.featureFlagService})}catch{return{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return d?(await t.workspace.renameSession(d),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${d}`}}):{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return r==="prune"?t.featureFlags.SESSION_CLEANUP?JGs(t,e.slice(1)):jhr(e[0],t.featureFlags.SESSION_CLEANUP):r==="cleanup"&&t.featureFlags.SESSION_CLEANUP?qGs(t,e.slice(1)):jhr(e[0],t.featureFlags.SESSION_CLEANUP)};VXn={name:Fbt,aliases:[eXn],args:"[info|checkpoints [n]|files|plan|rename [name]]",help:"View and manage sessions. Use subcommands for details.",allowDuringAgentExecution:!0,execute:async(t,e)=>HXn(t,e)},UXn={name:Qbt,args:"[name]",help:"Rename the current session, or auto-generate a name from conversation",allowDuringAgentExecution:!0,execute:async(t,e)=>HXn(t,["rename",...e])}});function jGs(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function W$(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&jGs(n)?(P.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return P.info("Retrying without auth token"),await t({})}}var $hr=v(()=>{"use strict";Hn()});var JXn={};$u(JXn,{MAX_RECENT_RELEASES:()=>eRs,fetchLatestRelease:()=>Q6,fetchReleaseByTag:()=>tRs,getUpdateChannel:()=>WH,getVersion:()=>X4,getVersionWithoutUpdateCheck:()=>egr,isPrerelease:()=>zXn,showVersionWithUpdateCheck:()=>tgr});function X4(){return process.env.COPILOT_CLI_VERSION||"1.0.35-
|
|
4177
|
+
`),d;try{d=await tAt({userMessage:u,availableModels:a,authInfo:s,sessionId:t.session.getSessionId(),featureFlagService:t.featureFlagService})}catch{return{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return d?(await t.workspace.renameSession(d),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${d}`}}):{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return r==="prune"?t.featureFlags.SESSION_CLEANUP?JGs(t,e.slice(1)):jhr(e[0],t.featureFlags.SESSION_CLEANUP):r==="cleanup"&&t.featureFlags.SESSION_CLEANUP?qGs(t,e.slice(1)):jhr(e[0],t.featureFlags.SESSION_CLEANUP)};VXn={name:Fbt,aliases:[eXn],args:"[info|checkpoints [n]|files|plan|rename [name]]",help:"View and manage sessions. Use subcommands for details.",allowDuringAgentExecution:!0,execute:async(t,e)=>HXn(t,e)},UXn={name:Qbt,args:"[name]",help:"Rename the current session, or auto-generate a name from conversation",allowDuringAgentExecution:!0,execute:async(t,e)=>HXn(t,["rename",...e])}});function jGs(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function W$(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&jGs(n)?(P.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return P.info("Retrying without auth token"),await t({})}}var $hr=v(()=>{"use strict";Hn()});var JXn={};$u(JXn,{MAX_RECENT_RELEASES:()=>eRs,fetchLatestRelease:()=>Q6,fetchReleaseByTag:()=>tRs,getUpdateChannel:()=>WH,getVersion:()=>X4,getVersionWithoutUpdateCheck:()=>egr,isPrerelease:()=>zXn,showVersionWithUpdateCheck:()=>tgr});function X4(){return process.env.COPILOT_CLI_VERSION||"1.0.35-1"}function zXn(){try{let t=(0,rAt.parse)("1.0.35-1");return t!==null&&t.prerelease.length>0}catch{return!1}}function WH(t,e){return t||(e||zXn()?"prerelease":"stable")}function egr(){return`GitHub Copilot CLI ${Dh().version}.
|
|
4178
4178
|
Run 'copilot update' to check for updates.`}async function tgr(t,e){let r=Dh();if(process.stdout.write(`GitHub Copilot CLI ${r.version}
|
|
4179
4179
|
`),hh())return;let n=WH(t.autoUpdatesChannel,t.staff),o=await Q6(n,e);if("error"in o){process.stderr.write(`
|
|
4180
4180
|
Unable to check for updates: ${String(o.error)}
|
|
@@ -4947,7 +4947,7 @@ Cancelled (${p.length}):`);for(let I of p)h.push(v5e(I))}let g=h.join(`
|
|
|
4947
4947
|
${d}`,resultType:"failure",toolTelemetry:{}}}return{textResultForLlm:`MCP config is valid. ${Object.keys(c.data.mcpServers).length} server(s) configured.`,resultType:"success",toolTelemetry:{}}}catch(n){return{textResultForLlm:`Failed to validate MCP config: ${te(n)}`,resultType:"failure",toolTelemetry:{}}}}),safeForTelemetry:!0}}var rxs,b8n,y8n=v(()=>{"use strict";Xn();n_();mr();Bs();Lu();rxs="mcp_validate",b8n=re.object({path:re.string().describe("Absolute path to the MCP config file to validate.")})});function sxs(t){return t.length>0}function zyt(t){return axs[t]??t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase())}function HSe(t){let e={};for(let r of t)e[`validation.${zyt(r.name)}Enabled`]="true";return e}function lxs(t){let e=Object.values(t).filter(r=>!r.hasDisagreement&&r.potentialSavingsMs!==void 0).reduce((r,n)=>r+n.potentialSavingsMs,0);return e>0?{"trivialChange.potentialSavingsMs":String(e)}:{}}function uxs(t){return re.object({...cxs,trivialChangeDeclaration:t?LMr:TMr})}async function C8n(t,e,r,n,o,s){let a=Uq(n),l=fW.isEnabled(n)&&t.includeCodeQLTool;if(!a&&!l)return;let c=a?await Y8e(t,e,r,n,o,s):void 0,u=l?await new fW(t,s,o,n,e).getCodeQLCheckerTool():void 0,d=[c,u].filter(N=>N!==void 0);if(!sxs(d))return;if(d.length===1)return d[0];let m=d.map(N=>N.title).join(" and "),p=d.map(N=>`- **${N.title}**: ${N.description}`).join(`
|
|
4948
4948
|
`),h=iT(n),g=d.map(N=>N.name),I=h?["<trivial_change_definition>",kMr(g),"</trivial_change_definition>"]:[],b=[`${Iue} runs automated validation checks on your code changes.`,"","Included tools:",p,"","Pay attention to the following when using it:","",`* Before finalizing your session and completing the task, use the ${Iue} tool to validate your changes.`,...I,`* This tool runs ${m} in parallel.`,`* Review all feedback from ${m}.`,"* Address issues that are valid and require changes.","* NOTE: These tools are imperfect. They may produce false positives. Use your judgment when addressing feedback.",`* If you make significant changes after validation, run ${Iue} again.`,"* Add a summary of any unresolved issues as part of finalizing your task."].join(`
|
|
4949
4949
|
`),C=uxs(h),y=NJ.createBudgeter(Iue,n?.tools?.validation?.timeout),w=0;return{name:Iue,instructions:b,description:`Run parallel code validation (${m}) on the current PR changes. This tool analyzes the proposed changes and provides ${m} feedback concurrently.
|
|
4950
|
-
Call this tool before finalizing your session and completing the task. If issues are found, address them and call this tool again if significant changes were made.`,input_schema:Vi(C),callback:async N=>{if(w>=Vbr)return{textResultForLlm:`\u26A0\uFE0F Validation has timed out ${Vbr} consecutive times. The circuit breaker has tripped \u2014 do NOT call \`parallel_validation\` again. Present your current results to the user.`,resultType:"timeout",sessionLog:`Validation skipped: circuit breaker tripped after ${Vbr} consecutive timeouts.`,toolTelemetry:{event:"tool_call_executed",properties:{...HSe(d),"validation.skipped":"true","validation.skipReason":"circuit_breaker","validation.consecutiveTimeouts":String(w)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{}}};let _=Lf(C,N);if(!_.success)return{..._.errorResult};let R=_.data,T=R.trivialChangeDeclaration,x={prTitle:R.prTitle,prDescription:R.prDescription,trivialChangeDeclaration:T?.codeReview},D=Date.now(),Z=T?.codeReview?.isTrivial===!0&&T?.codeql?.isTrivial===!0;if(TU(n)&&Z)return w=0,{textResultForLlm:"Skipped: all changes are trivial.",resultType:"success",sessionLog:"Skipped: all changes are trivial.",toolTelemetry:{event:"tool_call_executed",properties:{...HSe(d)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{...NJe(T)}}};let Q=y.remainingBudget;if(Q<nxs){let H=`\u26A0\uFE0F Validation budget exhausted. The remaining time budget is too low to run validation tools. Do NOT call \`${Iue}\` again \u2014 present your current results to the user.`;e.info(`Budget exhausted (${Q}ms remaining). Skipping validation.`)
|
|
4950
|
+
Call this tool before finalizing your session and completing the task. If issues are found, address them and call this tool again if significant changes were made.`,input_schema:Vi(C),callback:async N=>{if(w>=Vbr)return{textResultForLlm:`\u26A0\uFE0F Validation has timed out ${Vbr} consecutive times. The circuit breaker has tripped \u2014 do NOT call \`parallel_validation\` again. Present your current results to the user.`,resultType:"timeout",sessionLog:`Validation skipped: circuit breaker tripped after ${Vbr} consecutive timeouts.`,toolTelemetry:{event:"tool_call_executed",properties:{...HSe(d),"validation.skipped":"true","validation.skipReason":"circuit_breaker","validation.consecutiveTimeouts":String(w)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{}}};let _=Lf(C,N);if(!_.success)return{..._.errorResult};let R=_.data,T=R.trivialChangeDeclaration,x={prTitle:R.prTitle,prDescription:R.prDescription,trivialChangeDeclaration:T?.codeReview},D=Date.now(),Z=T?.codeReview?.isTrivial===!0&&T?.codeql?.isTrivial===!0;if(TU(n)&&Z)return w=0,{textResultForLlm:"Skipped: all changes are trivial.",resultType:"success",sessionLog:"Skipped: all changes are trivial.",toolTelemetry:{event:"tool_call_executed",properties:{...HSe(d)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{...NJe(T)}}};let Q=y.remainingBudget;if(Q<nxs){let H=`\u26A0\uFE0F Validation budget exhausted. The remaining time budget is too low to run validation tools. Do NOT call \`${Iue}\` again \u2014 present your current results to the user.`;e.info(`Budget exhausted (${Q}ms remaining). Skipping validation.`),w++;let F={...HSe(d),"validation.skipped":"true","validation.skipReason":"budget_exhausted"};return{textResultForLlm:H,sessionLog:H,resultType:"timeout",toolTelemetry:{event:"tool_call_executed",properties:F,metrics:{"validation.totalDurationMs":0,"validation.remainingBudgetMs":Q},restrictedProperties:{}}}}let M=y.startJob();try{let H=await SJ.create(s,t.location,o,M);if(H.getChangedFiles().size===0){w=0;let le="No changes detected. Skipping validation.";e.info(le);let ce={...HSe(d),"validation.skipped":"true","validation.skipReason":"no_changes"};return{resultType:"success",textResultForLlm:le,sessionLog:le,toolTelemetry:{event:"tool_call_executed",properties:ce,metrics:{"validation.totalDurationMs":Date.now()-D},restrictedProperties:{}}}}let{results:F}=await dxs(d,e,M,n,H,x,T),K=Date.now()-D,me=pxs(F),ae=Object.values(F).every(le=>le.success),he=HSe(d),ie={"validation.totalDurationMs":K};for(let le of d){let ce=F[le.name],ve=zyt(le.name);he[`validation.${ve}Success`]=ce.success.toString(),ie[`validation.${ve}DurationMs`]=ce.durationMs}let fe={};for(let le of d){let ce=F[le.name],ve=zyt(le.name);ce?.hasDisagreement&&(fe[`trivialChange.${ve}.disagreement`]="true"),ce?.alertCount!==void 0&&ce.alertCount>0&&(fe[`trivialChange.${ve}.alertCount`]=String(ce.alertCount))}let se={event:"tool_call_executed",properties:he,metrics:ie,restrictedProperties:{...NJe(T),...fe,...Object.fromEntries(d.flatMap(le=>{let ce=F[le.name],ve=zyt(le.name),He=[];return ce?.potentialSavingsMs!==void 0&&He.push([`trivialChange.${ve}.potentialSavingsMs`,String(ce.potentialSavingsMs)]),ce&&He.push([`trivialChange.${ve}.durationMs`,String(ce.durationMs)]),He})),...iT(n)&&!TU(n)&&Z&&ae?lxs(F):{}}},ee=Object.values(F).some(le=>le.timedOut);return ae?w=0:ee?w++:w=0,{resultType:ae?"success":ee?"timeout":"failure",textResultForLlm:me,sessionLog:me,toolTelemetry:se}}catch(H){let F=dT(H);F?w++:w=0;let K=F?"Parallel validation cancelled due to timeout. Consider addressing any partial results, but do not rerun the tools (neither in sequence nor parallel).":`Error in parallel validation: '${te(H)}'`;e.error(K);let me=HSe(d);return{resultType:F?"timeout":"failure",textResultForLlm:K,sessionLog:K,toolTelemetry:{event:"tool_call_executed",properties:me,metrics:{"validation.totalDurationMs":Date.now()-D},restrictedProperties:{"validation.error":te(H),...NJe(T)}}}}finally{y.endJob()}},safeForTelemetry:!0}}async function dxs(t,e,r,n,o,s,a){let l=t.map(d=>{let m;return d.name===cR?m=s:d.name===fW.TOOL_NAME?m={trivialChangeDeclaration:a?.codeql}:m={},mxs(d,e,r,n,o,m)}),c=await Promise.allSettled(l);e.debug(`Parallel validation settled: ${c.map(d=>d.status==="fulfilled"?`${d.value.name}: ${d.value.result.textResult}`:`rejected: ${d.reason}`).join("; ")}`);let u={};for(let d of c)if(d.status==="fulfilled"){let{name:m,result:p}=d.value;u[m]=p}else e.error(`Validation tool task rejected: ${d.reason}`);return{results:u}}async function mxs(t,e,r,n,o,s={}){let{name:a,title:l}=t,c=Date.now();try{e.info(`Starting ${a}...`);let u={toolCallId:`${Iue}:${a}`,abortSignal:r,settings:n,repoChangeSet:o},d=await t.callback(s,u),m=Date.now()-c,p=d.resultType==="success",h=d.resultType==="timeout"||!p&&r.aborted,g=d.toolTelemetry,I=g?.restrictedProperties?.["trivialChange.disagreement"]==="true",b=g?.restrictedProperties?.["trivialChange.alertCount"],C=b!==void 0?Number(b):void 0,y=g?.restrictedProperties?.["trivialChange.potentialSavingsMs"],w=y!==void 0?Number(y):void 0;return e.info(`${a} completed in ${m}ms (${p?"success":h?"timeout":"failure"})`),{name:a,result:{title:l,success:p,textResult:d.textResultForLlm??"",durationMs:m,error:p?void 0:d.textResultForLlm??"Unknown error",timedOut:h,hasDisagreement:I,alertCount:C,potentialSavingsMs:w}}}catch(u){let d=Date.now()-c,m=dT(u),p=m?`${a} timed out after ${d}ms`:`${a} failed: ${te(u)}`;return e.error(p),{name:a,result:{title:l,success:!1,textResult:p,durationMs:d,error:p,timedOut:m}}}}function pxs(t){let e=[];e.push(`## Validation Results
|
|
4951
4951
|
`);let r=Object.values(t);for(let s of r){let a=s.success?"\u2705 Success":s.timedOut?"\u23F1\uFE0F Timed out":"\u274C Failed";e.push(`### ${s.title} (${a})
|
|
4952
4952
|
`),e.push(s.textResult),e.push("")}let n=r.some(s=>s.timedOut),o=r.some(s=>!s.success);return n?(e.push("---"),e.push(ixs)):o&&(e.push("---"),e.push(oxs)),e.join(`
|
|
4953
4953
|
`)}var Iue,nxs,Vbr,oxs,ixs,axs,cxs,E8n=v(()=>{"use strict";Xn();mr();STe();Em();Ahe();D8e();rtt();vJe();Lu();Iue="parallel_validation",nxs=3e4,Vbr=2,oxs="Please address the issues above and run `parallel_validation` again after making changes.",ixs="**Warning:** Validation timed out. The time budget for validation has been exhausted. Do NOT call `parallel_validation` again -- it will not complete successfully. Please present your current results to the user without re-running validation.";axs={code_review:"codeReview",codeql_checker:"codeQL"};cxs={prTitle:re.string().min(1).describe("Title for the pull request, specifying the task addressed by this PR"),prDescription:re.string().min(1).describe("Description for the pull request, explaining the task and the high-level code changes made relative to the base branch")}});function Kyt(t,e,r){let n=Math.floor((Date.now()-t.startedAt)/1e3),o=[];if(o.push(`agent_id: ${t.id}`),o.push(`agent_type: ${t.agentType}`),o.push(`status: ${t.status}`),o.push(`description: ${t.description}`),o.push(`elapsed: ${n}s`),o.push(`total_turns: ${t.turnHistory.length}`),t.modelOverride&&o.push(`model: ${t.modelOverride}`),r&&(r.latestIntent&&o.push(`current_intent: "${r.latestIntent}"`),r.toolCallsCompleted>0&&o.push(`tool_calls_completed: ${r.toolCallsCompleted}`)),t.status==="completed"&&t.completedAt){let s=Math.floor((t.completedAt-t.startedAt)/1e3);o.push(`duration: ${s}s`)}return e&&o.push("(timed out waiting for completion)"),o.join(", ")}function Xbr(t,e){let r=e!==void 0?t.filter(n=>n.turnIndex>e):t;return r.length===0?e!==void 0?"No new turns since turn "+e+".":"No responses yet.":r.map(n=>{let o=[`[Turn ${n.turnIndex}]`];if(n.inboundMessage){let s=n.inboundMessage.fromAgentId?`[Message from ${n.inboundMessage.fromAgentId}]`:"[Message]";o.push(`${s}
|
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.35-
|
|
4
|
+
"version": "1.0.35-1",
|
|
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": "
|
|
65
|
+
"gitCommit": "f09039d"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@github/copilot-linux-x64": "1.0.35-
|
|
69
|
-
"@github/copilot-linux-arm64": "1.0.35-
|
|
70
|
-
"@github/copilot-darwin-x64": "1.0.35-
|
|
71
|
-
"@github/copilot-darwin-arm64": "1.0.35-
|
|
72
|
-
"@github/copilot-win32-x64": "1.0.35-
|
|
73
|
-
"@github/copilot-win32-arm64": "1.0.35-
|
|
68
|
+
"@github/copilot-linux-x64": "1.0.35-1",
|
|
69
|
+
"@github/copilot-linux-arm64": "1.0.35-1",
|
|
70
|
+
"@github/copilot-darwin-x64": "1.0.35-1",
|
|
71
|
+
"@github/copilot-darwin-arm64": "1.0.35-1",
|
|
72
|
+
"@github/copilot-win32-x64": "1.0.35-1",
|
|
73
|
+
"@github/copilot-win32-arm64": "1.0.35-1"
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/sdk/index.js
CHANGED
|
@@ -4112,7 +4112,7 @@ ${l}`}}}let n=await t.workspace.listCheckpoints();if(n.length===0)return{kind:"a
|
|
|
4112
4112
|
${"\u2500".repeat(40)}
|
|
4113
4113
|
${n}`}}:{kind:"add-timeline-entry",entry:{type:"info",text:"No plan exists for this session."}}}if(r==="rename"){if(!t.workspace)return{kind:"add-timeline-entry",entry:{type:"info",text:"Workspace features are not enabled for this session."}};let n=e.slice(1).join(" ").trim();if(n)return n.length>100?{kind:"add-timeline-entry",entry:{type:"error",text:"Session name must be 100 characters or less."}}:(await t.workspace.renameSession(n),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${n}`}});let o=t.session.instance,s=o.getAuthInfo(),a=t.models;if(!s||!a?.length)return{kind:"add-timeline-entry",entry:{type:"error",text:"Unable to generate a session name (auth or models unavailable). Provide a name with /rename <name>"}};let l=o.getEvents(),c=[];for(let m of l)m.type==="user.message"&&!("source"in m.data&&m.data.source)&&m.data.content&&c.push(m.data.content);if(c.length===0)return{kind:"add-timeline-entry",entry:{type:"error",text:"No conversation history to generate a name from. Provide a name with /rename <name>"}};let u=c.slice(-20).join(`
|
|
4114
4114
|
|
|
4115
|
-
`),d;try{d=await Sqr({userMessage:u,availableModels:a,authInfo:s,sessionId:t.session.getSessionId(),featureFlagService:t.featureFlagService})}catch{return{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return d?(await t.workspace.renameSession(d),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${d}`}}):{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return r==="prune"?t.featureFlags.SESSION_CLEANUP?j7o(t,e.slice(1)):kLt(e[0],t.featureFlags.SESSION_CLEANUP):r==="cleanup"&&t.featureFlags.SESSION_CLEANUP?$7o(t,e.slice(1)):kLt(e[0],t.featureFlags.SESSION_CLEANUP)};Wqr={name:RFe,aliases:[Z9r],args:"[info|checkpoints [n]|files|plan|rename [name]]",help:"View and manage sessions. Use subcommands for details.",allowDuringAgentExecution:!0,execute:async(t,e)=>Yqr(t,e)},kqr={name:GFe,args:"[name]",help:"Rename the current session, or auto-generate a name from conversation",allowDuringAgentExecution:!0,execute:async(t,e)=>Yqr(t,["rename",...e])}});function OLt(){return!!process.env.CI||!!process.env.BUILD_NUMBER||!!process.env.RUN_ID||!!process.env.SYSTEM_COLLECTIONURI}function xqr(){return!!process.env.GITHUB_ACTIONS}function Zqr(){return process.env.GITHUB_AW==="1"||process.env.GITHUB_AW==="true"}function xLt(){let t=process.env.WEB_CLI_MODE?.trim().toLowerCase();return t==="1"||t==="true"}var ZLt=A(()=>{"use strict"});function e$o(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function GT(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&e$o(n)?(z.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return z.info("Retrying without auth token"),await t({})}}var TLt=A(()=>{"use strict";wn()});var Fqr={};ia(Fqr,{MAX_RECENT_RELEASES:()=>o$o,fetchLatestRelease:()=>ET,fetchReleaseByTag:()=>s$o,getUpdateChannel:()=>ZB,getVersion:()=>_v,getVersionWithoutUpdateCheck:()=>t$o,isPrerelease:()=>Tqr,showVersionWithUpdateCheck:()=>r$o});function _v(){return process.env.COPILOT_CLI_VERSION||"1.0.35-
|
|
4115
|
+
`),d;try{d=await Sqr({userMessage:u,availableModels:a,authInfo:s,sessionId:t.session.getSessionId(),featureFlagService:t.featureFlagService})}catch{return{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return d?(await t.workspace.renameSession(d),{kind:"add-timeline-entry",entry:{type:"info",text:`Session renamed to: ${d}`}}):{kind:"add-timeline-entry",entry:{type:"error",text:"Failed to generate a session name. Provide a name with /rename <name>"}}}return r==="prune"?t.featureFlags.SESSION_CLEANUP?j7o(t,e.slice(1)):kLt(e[0],t.featureFlags.SESSION_CLEANUP):r==="cleanup"&&t.featureFlags.SESSION_CLEANUP?$7o(t,e.slice(1)):kLt(e[0],t.featureFlags.SESSION_CLEANUP)};Wqr={name:RFe,aliases:[Z9r],args:"[info|checkpoints [n]|files|plan|rename [name]]",help:"View and manage sessions. Use subcommands for details.",allowDuringAgentExecution:!0,execute:async(t,e)=>Yqr(t,e)},kqr={name:GFe,args:"[name]",help:"Rename the current session, or auto-generate a name from conversation",allowDuringAgentExecution:!0,execute:async(t,e)=>Yqr(t,["rename",...e])}});function OLt(){return!!process.env.CI||!!process.env.BUILD_NUMBER||!!process.env.RUN_ID||!!process.env.SYSTEM_COLLECTIONURI}function xqr(){return!!process.env.GITHUB_ACTIONS}function Zqr(){return process.env.GITHUB_AW==="1"||process.env.GITHUB_AW==="true"}function xLt(){let t=process.env.WEB_CLI_MODE?.trim().toLowerCase();return t==="1"||t==="true"}var ZLt=A(()=>{"use strict"});function e$o(t){return typeof t=="object"&&t!==null&&"ok"in t&&t.ok===!1}async function GT(t,e){let r=e?{authorization:`token ${e}`}:{};try{let n=await t(r);return e&&e$o(n)?(z.info("Retrying without auth token"),await t({})):n}catch(n){if(!e)throw n;return z.info("Retrying without auth token"),await t({})}}var TLt=A(()=>{"use strict";wn()});var Fqr={};ia(Fqr,{MAX_RECENT_RELEASES:()=>o$o,fetchLatestRelease:()=>ET,fetchReleaseByTag:()=>s$o,getUpdateChannel:()=>ZB,getVersion:()=>_v,getVersionWithoutUpdateCheck:()=>t$o,isPrerelease:()=>Tqr,showVersionWithUpdateCheck:()=>r$o});function _v(){return process.env.COPILOT_CLI_VERSION||"1.0.35-1"}function Tqr(){try{let t=(0,PFe.parse)("1.0.35-1");return t!==null&&t.prerelease.length>0}catch{return!1}}function ZB(t,e){return t||(e||Tqr()?"prerelease":"stable")}function t$o(){return`GitHub Copilot CLI ${DA().version}.
|
|
4116
4116
|
Run 'copilot update' to check for updates.`}async function r$o(t,e){let r=DA();if(process.stdout.write(`GitHub Copilot CLI ${r.version}
|
|
4117
4117
|
`),kf())return;let n=ZB(t.autoUpdatesChannel,t.staff),o=await ET(n,e);if("error"in o){process.stderr.write(`
|
|
4118
4118
|
Unable to check for updates: ${String(o.error)}
|
|
@@ -4885,7 +4885,7 @@ Cancelled (${h.length}):`);for(let g of h)p.push(ige(g))}let I=p.join(`
|
|
|
4885
4885
|
${d}`,resultType:"failure",toolTelemetry:{}}}return{textResultForLlm:`MCP config is valid. ${Object.keys(c.data.mcpServers).length} server(s) configured.`,resultType:"success",toolTelemetry:{}}}catch(n){return{textResultForLlm:`Failed to validate MCP config: ${M(n)}`,resultType:"failure",toolTelemetry:{}}}}),safeForTelemetry:!0}}var cos,brn,yrn=A(()=>{"use strict";er();DOe();Nt();Wo();Gs();cos="mcp_validate",brn=O.object({path:O.string().describe("Absolute path to the MCP config file to validate.")})});function hos(t){return t.length>0}function EHe(t){return pos[t]??t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase())}function F8(t){let e={};for(let r of t)e[`validation.${EHe(r.name)}Enabled`]="true";return e}function Ios(t){let e=Object.values(t).filter(r=>!r.hasDisagreement&&r.potentialSavingsMs!==void 0).reduce((r,n)=>r+n.potentialSavingsMs,0);return e>0?{"trivialChange.potentialSavingsMs":String(e)}:{}}function fos(t){return O.object({...gos,trivialChangeDeclaration:t?kUt:WUt})}async function Grn(t,e,r,n,o,s){let a=rO(n),l=TG.isEnabled(n)&&t.includeCodeQLTool;if(!a&&!l)return;let c=a?await jEe(t,e,r,n,o,s):void 0,u=l?await new TG(t,s,o,n,e).getCodeQLCheckerTool():void 0,d=[c,u].filter(G=>G!==void 0);if(!hos(d))return;if(d.length===1)return d[0];let m=d.map(G=>G.title).join(" and "),h=d.map(G=>`- **${G.title}**: ${G.description}`).join(`
|
|
4886
4886
|
`),p=qg(n),I=d.map(G=>G.name),g=p?["<trivial_change_definition>",OUt(I),"</trivial_change_definition>"]:[],f=[`${tD} runs automated validation checks on your code changes.`,"","Included tools:",h,"","Pay attention to the following when using it:","",`* Before finalizing your session and completing the task, use the ${tD} tool to validate your changes.`,...g,`* This tool runs ${m} in parallel.`,`* Review all feedback from ${m}.`,"* Address issues that are valid and require changes.","* NOTE: These tools are imperfect. They may produce false positives. Use your judgment when addressing feedback.",`* If you make significant changes after validation, run ${tD} again.`,"* Add a summary of any unresolved issues as part of finalizing your task."].join(`
|
|
4887
4887
|
`),b=fos(p),C=kW.createBudgeter(tD,n?.tools?.validation?.timeout),y=0;return{name:tD,instructions:f,description:`Run parallel code validation (${m}) on the current PR changes. This tool analyzes the proposed changes and provides ${m} feedback concurrently.
|
|
4888
|
-
Call this tool before finalizing your session and completing the task. If issues are found, address them and call this tool again if significant changes were made.`,input_schema:vr(b),callback:async G=>{if(y>=SYt)return{textResultForLlm:`\u26A0\uFE0F Validation has timed out ${SYt} consecutive times. The circuit breaker has tripped \u2014 do NOT call \`parallel_validation\` again. Present your current results to the user.`,resultType:"timeout",sessionLog:`Validation skipped: circuit breaker tripped after ${SYt} consecutive timeouts.`,toolTelemetry:{event:"tool_call_executed",properties:{...F8(d),"validation.skipped":"true","validation.skipReason":"circuit_breaker","validation.consecutiveTimeouts":String(y)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{}}};let E=Yl(b,G);if(!E.success)return{...E.errorResult};let R=E.data,w=R.trivialChangeDeclaration,v={prTitle:R.prTitle,prDescription:R.prDescription,trivialChangeDeclaration:w?.codeReview},Y=Date.now(),W=w?.codeReview?.isTrivial===!0&&w?.codeql?.isTrivial===!0;if(IL(n)&&W)return y=0,{textResultForLlm:"Skipped: all changes are trivial.",resultType:"success",sessionLog:"Skipped: all changes are trivial.",toolTelemetry:{event:"tool_call_executed",properties:{...F8(d)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{...Bye(w)}}};let L=C.remainingBudget;if(L<uos){let T=`\u26A0\uFE0F Validation budget exhausted. The remaining time budget is too low to run validation tools. Do NOT call \`${tD}\` again \u2014 present your current results to the user.`;e.info(`Budget exhausted (${L}ms remaining). Skipping validation.`)
|
|
4888
|
+
Call this tool before finalizing your session and completing the task. If issues are found, address them and call this tool again if significant changes were made.`,input_schema:vr(b),callback:async G=>{if(y>=SYt)return{textResultForLlm:`\u26A0\uFE0F Validation has timed out ${SYt} consecutive times. The circuit breaker has tripped \u2014 do NOT call \`parallel_validation\` again. Present your current results to the user.`,resultType:"timeout",sessionLog:`Validation skipped: circuit breaker tripped after ${SYt} consecutive timeouts.`,toolTelemetry:{event:"tool_call_executed",properties:{...F8(d),"validation.skipped":"true","validation.skipReason":"circuit_breaker","validation.consecutiveTimeouts":String(y)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{}}};let E=Yl(b,G);if(!E.success)return{...E.errorResult};let R=E.data,w=R.trivialChangeDeclaration,v={prTitle:R.prTitle,prDescription:R.prDescription,trivialChangeDeclaration:w?.codeReview},Y=Date.now(),W=w?.codeReview?.isTrivial===!0&&w?.codeql?.isTrivial===!0;if(IL(n)&&W)return y=0,{textResultForLlm:"Skipped: all changes are trivial.",resultType:"success",sessionLog:"Skipped: all changes are trivial.",toolTelemetry:{event:"tool_call_executed",properties:{...F8(d)},metrics:{"validation.totalDurationMs":0},restrictedProperties:{...Bye(w)}}};let L=C.remainingBudget;if(L<uos){let T=`\u26A0\uFE0F Validation budget exhausted. The remaining time budget is too low to run validation tools. Do NOT call \`${tD}\` again \u2014 present your current results to the user.`;e.info(`Budget exhausted (${L}ms remaining). Skipping validation.`),y++;let x={...F8(d),"validation.skipped":"true","validation.skipReason":"budget_exhausted"};return{textResultForLlm:T,sessionLog:T,resultType:"timeout",toolTelemetry:{event:"tool_call_executed",properties:x,metrics:{"validation.totalDurationMs":0,"validation.remainingBudgetMs":L},restrictedProperties:{}}}}let Z=C.startJob();try{let T=await OW.create(s,t.location,o,Z);if(T.getChangedFiles().size===0){y=0;let ae="No changes detected. Skipping validation.";e.info(ae);let ie={...F8(d),"validation.skipped":"true","validation.skipReason":"no_changes"};return{resultType:"success",textResultForLlm:ae,sessionLog:ae,toolTelemetry:{event:"tool_call_executed",properties:ie,metrics:{"validation.totalDurationMs":Date.now()-Y},restrictedProperties:{}}}}let{results:x}=await Aos(d,e,Z,n,T,v,w),j=Date.now()-Y,Ge=Cos(x),be=Object.values(x).every(ae=>ae.success),he=F8(d),D={"validation.totalDurationMs":j};for(let ae of d){let ie=x[ae.name],Le=EHe(ae.name);he[`validation.${Le}Success`]=ie.success.toString(),D[`validation.${Le}DurationMs`]=ie.durationMs}let $={};for(let ae of d){let ie=x[ae.name],Le=EHe(ae.name);ie?.hasDisagreement&&($[`trivialChange.${Le}.disagreement`]="true"),ie?.alertCount!==void 0&&ie.alertCount>0&&($[`trivialChange.${Le}.alertCount`]=String(ie.alertCount))}let K={event:"tool_call_executed",properties:he,metrics:D,restrictedProperties:{...Bye(w),...$,...Object.fromEntries(d.flatMap(ae=>{let ie=x[ae.name],Le=EHe(ae.name),je=[];return ie?.potentialSavingsMs!==void 0&&je.push([`trivialChange.${Le}.potentialSavingsMs`,String(ie.potentialSavingsMs)]),ie&&je.push([`trivialChange.${Le}.durationMs`,String(ie.durationMs)]),je})),...qg(n)&&!IL(n)&&W&&be?Ios(x):{}}},U=Object.values(x).some(ae=>ae.timedOut);return be?y=0:U?y++:y=0,{resultType:be?"success":U?"timeout":"failure",textResultForLlm:Ge,sessionLog:Ge,toolTelemetry:K}}catch(T){let x=kC(T);x?y++:y=0;let j=x?"Parallel validation cancelled due to timeout. Consider addressing any partial results, but do not rerun the tools (neither in sequence nor parallel).":`Error in parallel validation: '${M(T)}'`;e.error(j);let Ge=F8(d);return{resultType:x?"timeout":"failure",textResultForLlm:j,sessionLog:j,toolTelemetry:{event:"tool_call_executed",properties:Ge,metrics:{"validation.totalDurationMs":Date.now()-Y},restrictedProperties:{"validation.error":M(T),...Bye(w)}}}}finally{C.endJob()}},safeForTelemetry:!0}}async function Aos(t,e,r,n,o,s,a){let l=t.map(d=>{let m;return d.name===tg?m=s:d.name===TG.TOOL_NAME?m={trivialChangeDeclaration:a?.codeql}:m={},bos(d,e,r,n,o,m)}),c=await Promise.allSettled(l);e.debug(`Parallel validation settled: ${c.map(d=>d.status==="fulfilled"?`${d.value.name}: ${d.value.result.textResult}`:`rejected: ${d.reason}`).join("; ")}`);let u={};for(let d of c)if(d.status==="fulfilled"){let{name:m,result:h}=d.value;u[m]=h}else e.error(`Validation tool task rejected: ${d.reason}`);return{results:u}}async function bos(t,e,r,n,o,s={}){let{name:a,title:l}=t,c=Date.now();try{e.info(`Starting ${a}...`);let u={toolCallId:`${tD}:${a}`,abortSignal:r,settings:n,repoChangeSet:o},d=await t.callback(s,u),m=Date.now()-c,h=d.resultType==="success",p=d.resultType==="timeout"||!h&&r.aborted,I=d.toolTelemetry,g=I?.restrictedProperties?.["trivialChange.disagreement"]==="true",f=I?.restrictedProperties?.["trivialChange.alertCount"],b=f!==void 0?Number(f):void 0,C=I?.restrictedProperties?.["trivialChange.potentialSavingsMs"],y=C!==void 0?Number(C):void 0;return e.info(`${a} completed in ${m}ms (${h?"success":p?"timeout":"failure"})`),{name:a,result:{title:l,success:h,textResult:d.textResultForLlm??"",durationMs:m,error:h?void 0:d.textResultForLlm??"Unknown error",timedOut:p,hasDisagreement:g,alertCount:b,potentialSavingsMs:y}}}catch(u){let d=Date.now()-c,m=kC(u),h=m?`${a} timed out after ${d}ms`:`${a} failed: ${M(u)}`;return e.error(h),{name:a,result:{title:l,success:!1,textResult:h,durationMs:d,error:h,timedOut:m}}}}function Cos(t){let e=[];e.push(`## Validation Results
|
|
4889
4889
|
`);let r=Object.values(t);for(let s of r){let a=s.success?"\u2705 Success":s.timedOut?"\u23F1\uFE0F Timed out":"\u274C Failed";e.push(`### ${s.title} (${a})
|
|
4890
4890
|
`),e.push(s.textResult),e.push("")}let n=r.some(s=>s.timedOut),o=r.some(s=>!s.success);return n?(e.push("---"),e.push(mos)):o&&(e.push("---"),e.push(dos)),e.join(`
|
|
4891
4891
|
`)}var tD,uos,SYt,dos,mos,pos,gos,Ern=A(()=>{"use strict";er();Nt();Hee();Zi();Dee();$Ee();fve();Xye();Gs();tD="parallel_validation",uos=3e4,SYt=2,dos="Please address the issues above and run `parallel_validation` again after making changes.",mos="**Warning:** Validation timed out. The time budget for validation has been exhausted. Do NOT call `parallel_validation` again -- it will not complete successfully. Please present your current results to the user without re-running validation.";pos={code_review:"codeReview",codeql_checker:"codeQL"};gos={prTitle:O.string().min(1).describe("Title for the pull request, specifying the task addressed by this PR"),prDescription:O.string().min(1).describe("Description for the pull request, explaining the task and the high-level code changes made relative to the base branch")}});function NHe(t,e,r){let n=Math.floor((Date.now()-t.startedAt)/1e3),o=[];if(o.push(`agent_id: ${t.id}`),o.push(`agent_type: ${t.agentType}`),o.push(`status: ${t.status}`),o.push(`description: ${t.description}`),o.push(`elapsed: ${n}s`),o.push(`total_turns: ${t.turnHistory.length}`),t.modelOverride&&o.push(`model: ${t.modelOverride}`),r&&(r.latestIntent&&o.push(`current_intent: "${r.latestIntent}"`),r.toolCallsCompleted>0&&o.push(`tool_calls_completed: ${r.toolCallsCompleted}`)),t.status==="completed"&&t.completedAt){let s=Math.floor((t.completedAt-t.startedAt)/1e3);o.push(`duration: ${s}s`)}return e&&o.push("(timed out waiting for completion)"),o.join(", ")}function YYt(t,e){let r=e!==void 0?t.filter(n=>n.turnIndex>e):t;return r.length===0?e!==void 0?"No new turns since turn "+e+".":"No responses yet.":r.map(n=>{let o=[`[Turn ${n.turnIndex}]`];if(n.inboundMessage){let s=n.inboundMessage.fromAgentId?`[Message from ${n.inboundMessage.fromAgentId}]`:"[Message]";o.push(`${s}
|