* Add SSH remote agent host bootstrap
Adds a new ISSHRemoteAgentHostService that automates connecting to a
remote machine via SSH, installing the VS Code CLI, starting
'code agent-host', and forwarding the agent host port back through
the SSH tunnel.
- New service interface and types in common/sshRemoteAgentHost.ts
- Full implementation using ssh2 in electron-browser/ with dynamic
imports to respect layering rules
- Multi-step quick input flow for SSH connection details integrated
into the remote agent host picker
- 'Connect via SSH' command registered in contributions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR review feedback
- Strip password/privateKeyPath from ISSHAgentHostConnection.config
so secrets are not exposed to consumers after connect
- Redact connection tokens (?tkn=...) in all log output and error
messages to prevent credential leakage
- Parse user@host:port format in SSH host input with proper validation
for port range and missing components
- Guard onDidClose with a closed flag to prevent double-fire when
dispose and SSH close/error events overlap
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* SSH working through main process
Co-authored-by: Copilot <copilot@github.com>
* Resolve ssh configs
Co-authored-by: Copilot <copilot@github.com>
* progress
* Granular connect progress, test fix
Co-authored-by: Copilot <copilot@github.com>
* Test, refactor
Co-authored-by: Copilot <copilot@github.com>
* Resolve comments
Co-authored-by: Copilot <copilot@github.com>
* Get rid of cpu-features
* Move to shared process
Co-authored-by: Copilot <copilot@github.com>
* fixes
Co-authored-by: Copilot <copilot@github.com>
* add ssh2 to remote/package.json
* Cleanup and fixes
Co-authored-by: Copilot <copilot@github.com>
* fix
Co-authored-by: Copilot <copilot@github.com>
* fix
Co-authored-by: Copilot <copilot@github.com>
* resolve comments
Co-authored-by: Copilot <copilot@github.com>
* comments
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
* Update conpty to 1.25
* see if changes fix 1.2.0-beta11 defering conptyNative.connect()
* Revert "see if changes fix 1.2.0-beta11 defering conptyNative.connect()"
This reverts commit c5d9064efa.
* Reapply "see if changes fix 1.2.0-beta11 defering conptyNative.connect()"
This reverts commit ded49adb14.
Exposes --agent-host-port/--agent-host-path to specify an additional
port for them to listen on. This runs as a separate process mirroring
the architecture from main.
Does a 'hello world', I need to keep testing it some more. I honestly
don't know a lot about the import changes Opus is doing here. Without
them, there is an error:
```
import { CopilotClient } from "@github/copilot-sdk";
^^^^^^^^^^^^^
SyntaxError: The requested module '@github/copilot-sdk' does not provide an export named 'CopilotClient'
```
This was Copilot's explanation for why they're needed here but not in Electron:
>The agent host process itself didn't change — the issue is the **module resolution environment** differs between Electron and the server.
>
>**Electron (desktop):** `ElectronAgentHostStarter` spawns a utility process that inherits the main process's module resolution. It resolves packages from the **root** node_modules, where `@github/copilot-sdk`, `ws`, etc. are all installed. Everything just works.
>
>**Server:** `NodeAgentHostStarter` spawns a child via `bootstrap-fork.js`, which registers a custom ESM resolver hook (bootstrap-import.ts) that **redirects** all module lookups to node_modules instead of root node_modules. That's the `[bootstrap-import] Initialized node_modules redirector for: ...\remote\node_modules` log line. The remote folder has its own package.json with a curated set of server-specific dependencies.
>
>The problems were:
>1. **Missing deps** — `@github/copilot-sdk`, `@github/copilot`, and `ws` weren't in package.json because the agent host had never run in the server context before
>2. **Resolver bugs** — bootstrap-import.ts was written when all remote deps were CJS. It hardcoded `format: 'commonjs'`, didn't handle `exports` maps, didn't handle `.mjs` files, and didn't resolve subpath imports like `vscode-jsonrpc/node`. These are pre-existing limitations that never mattered until now because no server component previously depended on ESM-only npm packages.
>
>So in short: the agent host code is identical — it's the server's module resolution plumbing that needed updating to support the ESM packages the agent host depends on.
cc @bpasero as the expert in this area
Used Windows registry to retrieve Windows release and build numbers.
Added passing User-Agent header to update service.
Updated installer launch env to ignore compat mode.
* Bump node-pty to 1.2.0-beta.7
* Deprecate TerminalSettingId.WindowsEnableConpty setting
* Remove windowsEnableConpty instead of deprecating
* Remove WINPTY from ps.ts
* Remove winpty from appropriate comments
* Remove winpty from IProcessReadyWindowsPty
* Remove from classifier.json. TODO on resize for node-pty
* Try adding option to test
* Add reference to issue
* using relative values instead of absolute values for the font size and the line height
* renaming to multiplier
* setting back to font size and line height
* Revert "renaming to multiplier"
This reverts commit 5588855659.
* doing some polishing work
* changing the api
* updating to higher version of vscode-textmate
* also changing the vscode textmate package version for the remote extension
* increasing the vscode textmate version in remote/web
* updating package lock json
* using css variables instead of fetching font size from config service
* removing the second multiplier event
* adding ? after dom element style
* Ensure dots from floating fontSize are stripped from class names
---------
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>