Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* The pull request lifecycle actions this handler can execute. Each maps 1:1
* onto a changeset operation advertised by
* `AgentHostPullRequestOperationContribution`.
*/
export
type
PullRequestLifecycleAction
=
'mark-ready'
|
'merge'
|
'enable-auto-merge'
|
'disable-auto-merge'
;
/**
* Server-side handler for the pull request lifecycle operations advertised once
* a session's branch has a pull request: marking a draft ready, merging,
* and toggling GitHub's native auto-merge.
*
* Unlike `AgentHostPullRequestOperationHandler` — which drives the local git
* repository before creating a pull request — every action here is a pure
* GitHub mutation issued through {@link IGitHubService}, so it inherits that
* service's credential handling, request queueing, and merge-safety gates.
*/
export
class
AgentHostPullRequestLifecycleOperationHandler
implements
IChangesetOperationHandler
{
public
static
readonly
OPERATION_MARK_READY
=
.
;
public
static
readonly
OPERATION_MERGE
=
.
;
public
static
readonly
OPERATION_ENABLE_AUTO_MERGE
=
.
;
public
static
readonly
OPERATION_DISABLE_AUTO_MERGE
=
.
;
constructor
(
private
readonly
:
,
@IAgentConfigurationService
private
readonly
:
,
@IAgentHostPullRequestStatusService
private
readonly
:
,
@IGitHubService
private
readonly
:
,
@ILogService
private
readonly
:
,
)
{
}
async
invoke
(
:
,
:
)
:
Promise
<
>
{
const
=
new
AbortController
(
)
;
if
(
.
)
{
.
abort
(
)
;
}
const
=
.
onCancellationRequested
(
(
)
=>
.
abort
(
)
)
;
try
{
return
await
this
.
_invoke
(
,
.
)
;
}
finally
{
.
dispose
(
)
;
}
}
private
async
_invoke
(
:
,
:
)
:
Promise
<
>
{
const
=
parseChangesetUri
(
.
)
;
if
(
!
)
{
throw
new
ProtocolError
(
.
,
`Not a changeset URI: ${params.channel}`
)
;
}
const
=
.
;
const
=
this
.
.
getPullRequestStatus
(
)
;
if
(
!
)
{
this
.
.
warn
(
`[AgentHostPullRequestLifecycleOperationHandler] Rejected '${this._action}': session=${sessionUri}, reason=pull request state is not available`
/**
* Merges through the gated preparation flow: `prepareMerge` captures an
* authoritative snapshot that the mutation service validates the merge
* against, so a pull request that stopped being mergeable between the button
* being rendered and clicked is rejected rather than force-merged.
*/
private
async
_merge
(
:
string
,
:
,
:
,
:
)
:
Promise
<
string
>
{
if
(
!
.
)
{
throw
new
ProtocolError
(
.
,
localize
(
'agentHost.changeset.pr.headShaMissing'
,
"Could not determine the pull request head commit."
)
,
)
;
}
const
=
await
this
.
.
.
prepareMerge
(
,
.
,
)
;
// The user clicking the button is the authorization; the id only has to
// be stable for the lifetime of this single merge.