Commit Graph
144 Commits
Author SHA1 Message Date
6cfacefa02 agentHost: Refresh OSS SSH CLI and improve connection errors (#329459)
* 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>
2026-08-07 03:40:50 +00:00
Connor PeetandCopilot e8b8eee876 agentHost: use lock-free endpoint registry
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-05 09:21:10 -07:00
Connor PeetandCopilot 796a908a42 agentHost: address remote discovery review feedback
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-04 16:24:02 -07:00
Connor Peet ae58969765 add foreground option 2026-07-31 14:18:38 -07:00
Connor PeetandCopilot 3478999c6a agentHost: handle remote editor host failover
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>
2026-07-30 18:21:01 -07:00
Connor PeetandCopilot f5b3eba94e agentHost: select remote endpoints from shared registry
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>
2026-07-30 15:18:48 -07:00
Connor PeetandCopilot ab22c19a1f agentHost: unify local endpoint discovery
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>
2026-07-30 14:37:59 -07:00
179db2cbb5 fix(server): propagate --enable-proposed-api in serve-web (#310207)
* 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>
2026-07-29 05:29:41 +00:00
75d61a59ae Update CLI agent commands for AHP 0.4 (#322173)
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>
2026-06-20 01:30:32 +02:00
959a2d1d00 Fixed typo in cli update (#245751)
fixed typo in cli update

Co-authored-by: Lucas Parzianello <lucaspar@users.noreply.github.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-06-10 10:02:42 +00:00
Connor PeetandGitHub 608255bcd0 cli: bump ahp and ahp-types to 0.3.0 (#320322) 2026-06-08 13:22:02 +09:00
Connor PeetandGitHub d2f6870a95 cli: drop ahp-ws dependency in favor of direct tungstenite (#319451)
* 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)
2026-06-01 21:30:05 +00:00
Connor PeetandGitHub 2acbbb8026 cli: do not block control server startup on agent host supervisor (#317874)
- 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)
2026-05-21 23:06:18 +00:00
Connor Peet 83cac60ab6 actually work 2026-05-13 20:26:23 -07:00
Connor Peet 34d208175f wip 2026-05-13 18:45:19 -07:00
Connor Peet 979d3176a2 fix CI: stable Duration ctor + drop stale doc block 2026-05-13 15:39:05 -07:00
Connor Peet 1c3ba6a284 Merge remote-tracking branch 'origin/main' into connor4312/ah-matrix 2026-05-13 15:20:44 -07:00
Connor Peet 5794a86f60 make it work 2026-05-13 15:11:50 -07:00
Connor Peet 0f960d26f1 wip: connection unification 2026-05-12 14:22:21 -07:00
Connor PeetandGitHub cd73d8b686 cli: enable upgrades on proxied websocket client connection (#315802)
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)
2026-05-11 11:40:41 -07:00
Connor Peet 23fcb67582 agentHost: small cli polishes
- 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)
2026-04-30 08:48:43 -07:00
Connor Peet ed85ff7a6c comments and more deps 2026-04-28 08:56:30 -07:00
Connor Peet 3317944fde Merge remote-tracking branch 'origin/main' into connor4312/cli-ahp-management 2026-04-28 08:35:16 -07:00
Connor Peet 2c36ddb55e cli: implement client AHP control functionality 2026-04-28 08:10:51 -07:00
Connor Peet 06db90587c cli: clean up and update dependencies 2026-04-26 19:53:35 -07:00
Connor Peet 62a503dc25 Revert "Revert build breakages (#308162)"
This reverts commit 8aa4cf8a0f.
2026-04-07 07:48:16 -07:00
João MorenoandGitHub 8aa4cf8a0f Revert build breakages (#308162)
* Revert "agentHost: Hook up isRead/isDone (#308107)"

This reverts commit a3d69b7767.

* Revert "agentHost: support connections over tunnels (#307948)"

This reverts commit 75f21d0a8d.
2026-04-07 08:43:56 +00:00
Connor PeetandGitHub 75f21d0a8d agentHost: support connections over tunnels (#307948)
* wip

* clean up unused bits and make auth work correctly

* comments and fixes
2026-04-06 16:14:01 +00:00
Raymond ZhaoandGitHub 167b3b89a2 Merge branch 'main' into main 2026-03-26 14:07:44 -07:00
Rob LourensandGitHub c82bc515c2 More specific log string for cli agent host proxy (#304339) 2026-03-24 14:14:44 +11:00
Connor PeetandGitHub b7462b4a00 Merge pull request #303597 from microsoft/connor4312/agent-host-server-fixups
agentHost: fixup build for server
2026-03-20 13:54:33 -07:00
Connor Peet 5d5d0763fb fix build 2026-03-16 19:05:09 -07:00
Rob Lourens 4393d06a0f Skip quality check when VSCODE_CLI_OVERRIDE_SERVER_PATH is set and log agent host startup error 2026-03-13 15:36:45 -07:00
Connor Peet 60c18f38f6 auto updating agent host in the cli 2026-03-13 14:07:24 -07:00
Connor Peet 2da8aa0354 better command detection 2026-03-12 23:31:48 -07:00
Connor Peet 222bbd480e add agent-host command for cli 2026-03-12 23:31:40 -07:00
Dan Plischke b141217200 feat: add support for --default-folder, --default-workspace and --disable-telemetry in rust cli 2026-03-05 16:14:04 +01:00
6cc2564bf9 remote: configurable 'reconnection grace time' (#274910)
* reconnection grace period prototype

* plumb through CLI

* polish

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 18:51:28 -08:00
b0271fa725 Fix --commit-id flag for code serve-web (#258904)
* 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>
2025-07-31 16:52:39 +00:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>connor4312
90072b47cf Fix serve-web port randomization when --port 0 is specified (#254676)
* Initial plan

* Fix serve-web port randomization when --port 0 is specified

Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>

* Fix serve-web to display actual bound port instead of 0

When --port 0 is specified, the OS assigns a random port but the
logging was showing port 0 instead of the actual assigned port.
Fixed by reading the local_addr() from the server builder after binding.

Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
2025-07-22 13:35:24 -07:00
Justin WangandGitHub b4d1fec915 Add commit_id option to ServeWebArgs for specific client version (#255494)
* Add commit_id option to ServeWebArgs for specific client version

* Don't start serve-web update checker if given commit-id
2025-07-14 06:12:36 +00:00
M Hickford c515f75608 Log provider in "tunnel user show" 2025-02-11 19:53:57 +00:00
Connor PeetandGitHub 90e4da155a cli: remove unsupported arguments from serve-web (#239731)
Fixes #238303
2025-02-05 13:20:23 -08:00
Connor PeetandGitHub eee5e7643a cli: propagate server-data-dir and extensions-dir when installing service (#236734)
Fixes #236195
2024-12-20 10:29:40 -08:00
Connor PeetandGitHub 3e86f1e6cd cli: fix serve-web needs to wait a certain amount of time after machine startup (#236427)
Fixes #233155
2024-12-18 01:38:47 +01:00
Sandeep SomavarapuandGitHub 4920694ece fix #234843 (#235955)
* fix #234843

* fix lint error
2024-12-12 16:48:37 +01:00
benshiandGitHub 4e2855ff7f Cli serve_web sets the path prefix to /<quality>-<commit>/, commit value parsing error (#233986)
fix #233984
2024-11-17 04:34:54 +00:00
Sandeep SomavarapuandGitHub 653fd419de #232043 revert cli command and support downloading VSIX in UI (#233843)
* Revert "fix #232043 (#233596)"

This reverts commit e9d6c6afc0.

* #232043 revert cli command and support downloading VSIX in UI
2024-11-14 15:41:28 +01:00
Sandeep SomavarapuandGitHub e9d6c6afc0 fix #232043 (#233596)
* fix #232043

* fix compilation error

* fix compilation

* fix compilation

* fix compilation

* fix compilation

* fix compilation
2024-11-12 14:09:05 +01:00
Hamir MahalandGitHub a744313eb7 style: simplify string formatting for readability (#231763)
* style: simplify string formatting for readability

* fix: formatting in `.rs` files in `src/`
2024-10-22 16:30:46 +00:00