Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* Installs process-level diagnostic handlers so that, when this script runs detached
* via `deemon`, an abnormal termination still leaves a trace in the captured output.
* Without these, a crash or a received signal can surface only as an opaque daemon
* exit code (e.g. `0xDEAD`) with no indication of the cause.
*/
function
installDiagnostics
(
)
:
void
{
.
on
(
'uncaughtException'
,
=>
{
console
.
error
(
'[downloadCopilotVsix] Uncaught exception:'
,
)
;
.
exit
(
1
)
;
}
)
;
.
on
(
'unhandledRejection'
,
=>
{
console
.
error
(
'[downloadCopilotVsix] Unhandled rejection:'
,
)
;
.
exit
(
1
)
;
}
)
;
for
(
const
of
[
'SIGINT'
,
'SIGTERM'
,
'SIGHUP'
,
'SIGBREAK'
]
as
const
)
{
.
on
(
,
(
)
=>
{
console
.
error
(
`[downloadCopilotVsix] Received ${signal}, exiting.`
)
;
.
exit
(
1
)
;
}
)
;
}
.
on
(
'exit'
,
=>
log
(
`Process exiting with code ${code}.`
)
)
;
}
function
getAzdoFetchOptions
(
)
{
return
{
:
{
'Accept'
:
'application/json;api-version=5.0-preview.1'
,
'Accept-Encoding'
:
'gzip, deflate, br'
,
'Accept-Language'
:
'en-US,en;q=0.9'
,
'Referer'
:
'https://dev.azure.com'
,
:
`Bearer ${e('SYSTEM_ACCESSTOKEN')}`
}
}
;
}
async
function
getPipelineArtifacts
(
)
:
Promise
<
[
]
>
{
const
=
await
requestAZDOAPI<{readonly value: Artifact[]}>
(
'artifacts'
)
;
return
.
.
filter
(
=>
!
/sbom$/
.
test
(
.
)
)
;
}
async
function
getPipelineTimeline
(
)
:
Promise
<
>
{
return
await
requestAZDOAPI<Timeline>
(
'timeline'
)
;
}
async
function
getCopilotJob
(
)
:
Promise
<
|
undefined
>
{
const
=
await
retry
(
(
)
=>
getPipelineTimeline
(
)
)
;
return
.
.
find
(
=>
.
===
'Job'
&&
.
===
COPILOT_JOB_NAME
)
;
}
async
function
downloadArtifact
(
:
,
:
string
)
:
Promise
<
void
>
{
const
=
new
AbortController
(
)
;
const
=
setTimeout
(
(
)
=>
.
abort
(
)
,
4
*
60
*
1000
)
;
try
{
const
=
await
fetch
(
.
.
,
{
...
getAzdoFetchOptions
(
)
,
:
.
}
)
;
if
(
!
.
)
{
throw
new
Error
(
`Unexpected status code: ${res.status}`
)
;
}
await
pipeline
(
.
fromWeb
(
.
as
)
,
.
createWriteStream
(
)
)
;
}
finally
{
clearTimeout
(
)
;
}
}
async
function
unzip
(
:
string
,
:
string
)
:
Promise
<
string
[
]
>
{
return
new
Promise
(
(
,
)
=>
{
.
open
(
,
{
:
true
,
:
true
}
,
(
,
)
=>
{
if
(
)
{
return
reject
(
)
;
}
const
:
string
[
]
=
[
]
;
!
.
on
(
'entry'
,
=>
{
if
(
/\/$/
.
test
(
.
)
)
{
!
.
readEntry
(
)
;
}
else
{
!
.
openReadStream
(
,
(
,
)
=>
{
if
(
)
{
return
reject
(
)
;
}
const
=
.
join
(
,
.
)
;
.
mkdirSync
(
.
dirname
(
)
,
{
:
true
}
)
;
// Unix file mode is stored in the upper 16 bits of externalFileAttributes.
// Preserve it so executables like node-pty's spawn-helper stay executable.
const
=
(
.
>>>
16
)
&
0o777
;
const
=
.
createWriteStream
(
,
?
{
}
:
undefined
)
;
.
on
(
'finish'
,
(
)
=>
{
.
push
(
)
;
!
.
readEntry
(
)
;
}
)
;
?.
on
(
'error'
,
=>
reject
(
)
)
;
!
.
pipe
(
)
;
}
)
;
}
}
)
;
!
.
on
(
'close'
,
(
)
=>
resolve
(
)
)
;
!
.
readEntry
(
)
;
}
)
;
}
)
;
}
async
function
waitForArtifact
(
)
:
Promise
<
>
{
const
=
.
now
(
)
;
for
(
let
=
0
;
<
60
;
++
)
{
const
=
.
round
(
(
.
now
(
)
-
)
/
1000
)
;
try
{
log
(
`Waiting for Copilot VSIX artifact to be uploaded (attempt ${index +1}/60, ${elapsed}s elapsed)...`
)
;
// Check the Copilot job status so we can abort early if it failed