* agentHost: refresh OSS SSH CLI and improve errors
Refresh non-pinned remote CLIs before reuse, preserve machine-readable endpoint output, tolerate legacy CLI log noise, and persist SSH setup failures to the shared log.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* cli: distinguish current version from update errors
Treat an already-current CLI as a successful update result so SSH refresh failures can be identified and logged reliably.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route directly hosted tunnels through the protocol-v6 endpoint gateway with the correct registry. Notify users after automatic editor-to-dedicated recovery over SSH or tunnels.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Discover and select editor or dedicated agent hosts over SSH and dev tunnels. Add structured CLI discovery and relay commands, tunnel protocol-v6 selection, and idle shutdown for remotely spawned standalone hosts.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Publish editor and standalone agent hosts through a shared user-data registry with cross-process locking. Update CLI discovery and management commands to work across all registered hosts without the legacy lockfile.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(server): propagate --enable-proposed-api in serve-web
The `code serve-web` CLI accepts `--enable-proposed-api EXTENSION_ID`
but never propagated the allowlist to the workbench environment service
or the server-side extension scanner. As a result, extensions declaring
`enabledApiProposals` in their package.json had their proposals wiped
at runtime by ExtensionsProposedApi and failed to activate.
This wires the flag through two paths so it matches desktop behavior:
1. Server scanner: extend IProductService.extensionsEnabledWithApiProposalVersion
in setupServerServices so the node extension scanner keeps the manifest's
enabledApiProposals when --enable-proposed-api is passed.
2. Workbench env service: add a new `enabledExtensionProposedApi` field to
IWorkbenchConstructionOptions, populate it from the CLI args in
webClientServer, and surface it via BrowserWorkbenchEnvironmentService
.extensionEnabledProposedApi so the runtime allowlist in
ExtensionsProposedApi matches the requested IDs.
Fixes#228781
* cli: forward --enable-proposed-api to serve-web subprocess
The Rust CLI parses --enable-proposed-api as a global EditorOptions flag
but was not forwarding it to the node server subprocess spawned by
serve-web. As a result, the flag never reached the server's argv parser
and the server-side plumbing in serverServices.ts and webClientServer.ts
had no input to act on.
Capture the flag in ConnectionManager from CommandContext and pass it
through StartArgs, then append --enable-proposed-api=<id> for each
requested extension ID when spawning the server process.
* fix(server): update proposed API propagation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AHP 0.4 moves turns/active_turn off SessionState onto per-chat ChatState
(SessionState now carries a `chats` catalog), and SessionStatus is now a
newtype bitset instead of a repr enum.
- agent_ps: use SessionStatus::bits()/from_bits().contains() instead of
`as u32` casts
- agent_stop: resolve in-progress chats from the session catalog, subscribe
to each chat to find its active turn, and dispatch the renamed
StateAction::ChatTurnCancelled to the chat URI
- agent_logs: print the session's chats catalog instead of the removed
turns/active_turn
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* cli: drop ahp-ws dependency in favor of direct tungstenite
- Removes the external ahp-ws crate so the CLI owns its WebSocket
transport directly, avoiding a thin wrapper dependency and keeping the
transport logic alongside the existing tunnel transport.
- Updates the agent commands to the ahp 0.2 API (channel-based params,
optional snapshots, and the two-argument dispatch signature) so the
CLI compiles against the pinned crate versions again.
(Commit message generated by Copilot)
* cli: deduplicate WebSocket transport adapter
- Replaces the separate WsTransport and TunnelWsTransport implementations
with a single generic WsTransport over the stream type plus an optional
keep-alive guard, so the direct and tunnel connections share one
send/recv/close adapter and cannot drift apart.
(Commit message generated by Copilot)
- ensure_supervisor_running now runs as a background task driven by
tokio::spawn, so the tunnel control server and command-shell can
start accepting connections immediately instead of waiting for the
supervisor to come up.
- handle_serve (and the agent-host port forwarder) await the shared
future on demand and mix the bridge endpoint into the per-request
code_server_args. Supervisor failure is logged as a warning so editing
and the extension host keep working; the renderer just misses
agentHostProxy.
- This eliminates the startup stall that was sporadically tripping
remote SSH's 450ms command-shell ready timeout.
Fixes#317714
(Commit message generated by Copilot)
The serve-web command's websocket proxy spawned the client-side hyper connection without `.with_upgrades()`, so `hyper::upgrade::on(&mut res)` rejected the upgrade with "upgrade expected but low level API in use" and the websocket failed to establish.
- Spawn `connection.with_upgrades()` in `forward_ws_req_to_server` to mirror the server side and the equivalent agent-host proxy.
Fixes https://github.com/microsoft/vscode/issues/315448
(Commit message generated by Copilot)
- Mark agent-host > agent as a native cli command
- Update to final tunnel URI format
- Lock to Github auth for agent host tunnels (matching agents app logic)
* Revert "agentHost: Hook up isRead/isDone (#308107)"
This reverts commit a3d69b7767.
* Revert "agentHost: support connections over tunnels (#307948)"
This reverts commit 75f21d0a8d.
* Fix --commit-id flag for code serve-web
Fixes a bug where passing --commit-id during `code serve-web` would
prevent serve-web from downloading a new version of the client at all.
* Update cli/src/commands/serve_web.rs
---------
Co-authored-by: Connor Peet <connor@peet.io>