Commit Graph

4874 Commits

Author SHA1 Message Date
dileepyavan 0fd3a3d234 [WindowsSandboxing]: Updated env and commandline for executing commands using pwsh.exe (#318466)
* Exclude MXC SDK catalog manifests from Authenticode checks

* Exclude MXC executables from VersionInfo sanity check

* Exclude MXC bin from VersionInfo sanity check

* investigation

* fixing issue for pwsh execution

* fixing issue for pwsh execution
2026-05-27 11:46:57 -07:00
Robo 8748be1f1a feat: update to Electron v42 (#316661)
* feat: update to Electron v42

* chore: drop support for arm 32-bit server

* chore: update types/node to v24.x

* chore: temporarily lock the target version for build/

* chore: update v8-source-location.patch

* chore: fix clippy

* chore: cleanup armhf server ci config

* fix: broken lock file

* fix: c++ version requirement for sysroot builds

* fix: msvc compilation of native modules

* fix: handle rejections for fire-and-forget loadurl

* fix: windows build

* ci: fix teardown of daemon process on windows

```
2026-05-15T20:55:09.7717127Z Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
```

* chore: update deb and rpm dependencies

* chore: update version info

* spec: improve reliablity of offscreencanvas tests

* spec: retry EPERM failures on teardown

* chore: update x86_64 rpm deps

* ci: exclude server binskim for armhf

* temp: bump distro

* test: ignore deprecation warnings treated as errors

* chore: update lockfile

* fix: externalize electron from auth extension bundles

 Error: Cannot find module 'c:\Users\cloudtest\AppData\Local\Temp\vscode-sanityQvCaze\vscode-server-win32-x64-web\extensions\github-authentication\dist\install.js'
     at Module._resolveFilename (node:internal/modules/cjs/loader:1476:15)
     at wrapResolveFilename (node:internal/modules/cjs/loader:1049:27)
     at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1073:10)
     at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1094:12)
     at Module._load (node:internal/modules/cjs/loader:1262:25)
     at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
     at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
     at node:internal/main/run_main_module:33:47 {
   code: 'MODULE_NOT_FOUND',
   requireStack: []
 }

 Node.js v24.15.0

* test: make wsl sanity tests reliable

* chore: bump electron@42.1.0

* temp: bump distro

* chore: bump electron@42.2.0

* chore: bump distro

* chore: update debian dependencies

* Revert "test: make wsl sanity tests reliable"

This reverts commit b3f2b63e83.

* test: do not fail for deprecation warnings

* chore: patch node24 server binary for wsl1

* chore: address review feedback

* chore: revert global navigation error handler in browserview

* chore: bump distro
2026-05-27 14:57:41 +02:00
Osvaldo Ortega 72c29a534a CAPI package update (#318481) 2026-05-27 05:35:29 +00:00
Anthony Kim 103a85ad83 Update xterm.js to 6.1.0-beta.220 (#317936)
* Update xterm.js to 6.1.0-beta.220

* Stop the weirdness with cpu-features on package-lock.json
2026-05-26 16:51:36 -07:00
Lee Murray c8aac76c9b Add 'developer-tools' icon and update codicons version (#318330)
* Update @vscode/codicons to version 0.0.46-13 in package.json and package-lock.json

* Add 'developer-tools' icon to codicons library

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-05-26 13:39:38 +00:00
Rob Lourens dfbbbdf022 launch: build copilot in compile; wait for CDP in launch.sh (#318272)
* launch: build copilot in compile; wait for CDP in launch.sh

Two related improvements to the agent dev-loop workflow:

- npm run compile now builds the Copilot extension in parallel with the
  rest of the client, mirroring the structure of npm run watch. Previously
  only the watch path included extensions/copilot, so a one-shot build
  left the Copilot extension stale.

- .agents/skills/launch/scripts/launch.sh now runs preLaunch.ts in the
  foreground (surfacing any failure synchronously with a log tail), then
  launches Code OSS with VSCODE_SKIP_PRELAUNCH=1 and blocks until the
  renderer's CDP endpoint responds (90s timeout) before printing the JSON.
  Previously the script returned in ~1s while Electron was still mid-
  bootstrap, which made it racy for agents driving the workbench via
  @playwright/cli and could let an early-dying child go unnoticed.

SKILL.md updated to drop the now-unnecessary attach retry loop and to
document the new error-surfacing behavior.

(Written by Copilot)

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

* launch: clarify launcher's actual external deps in SKILL.md

Per code review, `launch.sh` does not invoke `lsof` or `jq` itself
those are used only by the example caller snippets. Reword the
prerequisites bullet so it reflects what the script actually requires
(`rsync`, `curl`, `nohup`, Node) and notes `jq` / `lsof` as optional
for the caller-side examples.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 02:06:53 +00:00
Lee Murray 9845410699 Bump codicons version to 0.0.46-12 and add new compact icons (#318010)
bump codicons version to 0.0.46-12 and add new compact icons

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-05-22 10:00:03 -07:00
Anthony Kim 79ff5c49e7 Bump Agent host Copilot CLI to 1.0.49 (#317241)
* Bump Agent host Copilot CLI to 1.0.48

* Copilot Cli to 1.0.48 sdk to 1.0.0-beta.4

* Exclude pvrecorder, foundry-local-sdk, mxc-bin

* Parity for copilot/sharp

* Add back missing binary

* Update dependencies for public copilot cli sdk

* remove icu-native.node for now

* Remove win32-native.node, icu-native.node

* Bump both internal and public to 1.0.49

* Only copy required Copilot SDK prebuilds

* Fix Copilot SDK native binary handling
2026-05-21 23:43:38 +00:00
Logan Ramos a2d2b10956 Long context pricing (#317820)
* Long context pricing

* Fix
2026-05-21 15:00:31 -07:00
dileepyavan e7137a3065 Integrating MXC for windows sandboxing (#317669)
* draft version

* draft version

* adding mxc for windows sandboxing

* Potential fix for pull request finding

Merging readwritePaths

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

* cleaning up PR

* cleaning up

* Run Windows MXC commands directly

* Pin MXC SDK lockfiles

* fixing tests and cleaning up env variables

* adding a flag for windows sandboxing as its experimental

* adding a flag for windows sandboxing as its experimental

* adding a flag for windows sandboxing as its experimental

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-21 13:17:09 -07:00
Robo 9cd7264dd1 feat(copilot): opt-in HTTP cache for the Node fetch fetcher (#317721)
* feat(copilot): opt-in HTTP cache for the Node fetch fetcher

Adds an opportunistic cache support to the Copilot Node fetch path. The cache
is strictly opt-in per request and composes with the existing VSCode proxy
and CA-injection patch.

- `__vscodeCreateFetchPatch({ interceptors })` lets the extension host
  build a second proxy-aware `fetch` with extra undici interceptors. The
  default `__vscodePatchedFetch` is unchanged.
- `NodeFetchFetcher` builds an undici cache interceptor once at
  construction time and uses the factory to produce a `cachedFetch` that
  routes through both the proxy patch and the cache. Requests are tagged
  with an internal `__copilotCachePatch` marker (stripped before fetch);
  unmarked requests keep going through the regular patched fetch. When
  the host lacks the factory, caching is silently disabled so requests
  never bypass the proxy patch.
- `FetchOptions.cache?: boolean` — opportunistic hint. Fetchers without
  cache support ignore it; fallback to other fetchers is unaffected.
- `Response.cacheStatus` and `FetchTelemetryEvent.cacheStatus`:
  `'hit' | 'stale-hit' | 'revalidated' | 'miss' | 'bypass'`.
- New setting `github.copilot.advanced.debug.nodeFetchCache`:
  `'off' | 'memory' | 'persistent'` (default `'memory'`). `'persistent'`
  uses undici's SQLite store under the extension's global storage
  (`undici-cache.v1.sqlite`) when available, otherwise falls back to
  memory.
- New `taggedCacheInterceptor` wraps `undici.interceptors.cache` and
  stamps a private `VSCODE_CACHE_STATUS_HEADER` on the response so the
  base fetcher can read the outcome without parsing undici internals.
- `BaseFetchFetcher` exposes an overridable `_buildRequestInit` hook and
  reports `cacheStatus` on `Response` and `fetchTelemetry`.

Notes
- No behavior change for callers that don't set `cache: true`.
- The cache interceptor is constructed once per fetcher instance; the
  composed dispatcher chain is reused so connection pooling is preserved.
- Depends on https://github.com/microsoft/vscode-proxy-agent/pull/100

For https://github.com/microsoft/vscode/issues/308310

* fix: undici integration tests

- drop the `age` header gate from classify(): undici's cache interceptor
only adds if-modified-since / if-none-match when revalidating a stored
entry, so `state.conditional` alone is a sufficient signal. The age header
is not guaranteed on a revalidated 200, which caused 'revalidated' to be
misreported as 'miss'.

- the etag integration test used
`cache-control: max-age=0, must-revalidate`, which undici treats as
already-stale on arrival and refuses to store (cache-handler.js bails when
`now >= absoluteStaleAt`), so there was nothing to revalidate on the second
call. Switch the origin to `public, max-age=60` and pass
`cache-control: no-cache` on the second request to drive undici's
needsRevalidation() path, which dispatches with if-none-match and serves
the cached body on 304.

* chore: fix lint

* chore: cleanup cache marker in favor of function arg
2026-05-21 18:07:34 +00:00
Tyler James Leonhardt 54eb46af95 claude: Phase 10 — workbench client tools via in-process MCP server (#317685) 2026-05-21 06:27:09 -07:00
Lee Murray 52e3176688 Update @vscode/codicons to version 0.0.46-11 (#317303)
chore: update @vscode/codicons to version 0.0.46-11 in package.json and package-lock.json

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-05-19 14:24:54 +00:00
Bryan Chen b7ebe9cc27 Merge branch 'main' into automation/bump-version-1.122.0 2026-05-18 11:02:01 -07:00
Henning Dieterichs c4471e24fa Adopt @vscode/ripgrep-universal (inline binaries, no postinstall)
Replace @vscode/ripgrep with @vscode/ripgrep-universal which bundles all platform binaries in a single package. Non-target platform binaries are stripped at packaging time via getRipgrepExcludeFilter.

- Add shared rgDiskPath() helper in src/vs/base/node/ripgrep.ts
- Convert all ripgrep consumers to use the async helper
- Add getRipgrepExcludeFilter for build packaging
- Update prepareBuiltInCopilotRipgrepShim for new bin layout
- Update eslint allowed-modules and require-interceptor aliases
- Fix platform mapping for Alpine + armhf
- Handle arch-specific binaries in macOS universal build / verify-macho
2026-05-18 18:46:04 +02:00
Henning Dieterichs 5fc781f799 Adopts @vscode/diff 2026-05-18 15:10:36 +02:00
github-actions[bot] 121c6fff41 Bump version to 1.122.0 2026-05-18 04:55:14 +00:00
Lee Murray faf455123e Update @vscode/codicons to version 0.0.46-10 (#316592)
chore: update @vscode/codicons version to 0.0.46-10 in package.json and package-lock.json

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-05-15 13:12:03 -07:00
Anthony Kim 97e8bd51eb Update to node-pty 1.2.0-beta.13 (#316325) 2026-05-13 22:44:24 +00:00
Dmitriy Vasyura bddbcf2c25 Bump @vscode/gulp-electron to 1.41.3 (retry transient network errors) (#315558)
* build: bump @vscode/gulp-electron to 1.41.3

Brings in microsoft/vscode-gulp-electron#42 which adds retry-with-backoff
around transient network errors when downloading Electron, fixing build
breaks like getaddrinfo ENOTFOUND release-assets.githubusercontent.com.

NOTE: package-lock.json will be regenerated once 1.41.3 is published.
Do not merge until then.

* Sync package-lock.json with package.json after updating @vscode/gulp-electron to 1.41.3.
2026-05-12 19:33:35 -07:00
vs-code-engineering[bot] fec81a8cff Update distro commit (main) (#315983)
Update distro commit to 9897f32f

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
2026-05-12 10:30:33 +00:00
Robo 7a3be7746d chore: bump distro (#315976) 2026-05-12 09:12:49 +00:00
Lee Murray a72022b9f0 Update @vscode/codicons version to 0.0.46-8 (#315682)
Update @vscode/codicons version to 0.0.46-8 in package.json and package-lock.json

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-05-11 08:11:52 -07:00
vs-code-engineering[bot] 574948fc7b Bump version to 1.121.0 (#315601)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 17:12:46 +09:00
Alexandru Dima 34d83c7ebf update distro (#315555) 2026-05-10 18:23:18 +00:00
vs-code-engineering[bot] 5d7961213e Update distro commit (main) (#315070)
Update distro commit to 447baaa8

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
2026-05-07 19:06:50 +00:00
Henning Dieterichs ca2ded47a8 updates component explorer 2026-05-07 18:43:10 +02:00
Tyler James Leonhardt c9b1f88ce7 agentHost/claude: Phase 5 + Phase 6 — IAgent provider, sendMessage (re-land) (#314533)
* agentHost/claude: post-Phase-4 cleanup

- roadmap.md: mark Phase 4 as DONE, link merged PR #313780.
- phase4-plan.md: record live-system smoke completion in §7.8;
  disabled-gate run skipped (covered by unit tests + env-var guard).
- claudeAgent.test.ts: drop gratuitous 'as unknown as' cast in the
  CCAModel fixture (literal already matches CCAModelBilling exactly;
  plan §7.4 forbids unsafe casts in tests).

* agentHost/claude: lock Phase 5 implementation plan

Handoff plan for Phase 5 (replace 7 throwing stubs in claudeAgent.ts).
Locked against post-PR-#313841 reality (provisional sessions,
onDidMaterializeSession, 30s empty-session GC) and the IAgent contract
on origin/main.

Decisions captured:
- Non-fork createSession is synchronous and in-memory; fork deferred
  to Phase 6 (throws TODO).
- IClaudeAgentSdkService surface mirrors IAgent (no dir parameter on
  listSessions); SDK loader caches resolved module, retries on
  failure, logs once.
- listSessions joins SDK enumeration with workbench session DB
  metadata via ISessionDataService; per-entry try/catch resilience.
- shutdown() routes per-session teardown through the same
  SequencerByKey<string> used by disposeSession() so concurrent
  shutdown/disposeSession cannot double-dispose a wrapper in Phase 6.
- 14 unit tests defined (12 lifecycle + 2 resolved-config), including
  log-once contract and shutdown/disposeSession race guard.

* agentHost/claude: Phase 5 — IAgent provider skeleton

Lands the ClaudeAgent IAgent provider behind the
'chat.agentHost.claudeAgent.enabled' setting (env gate
VSCODE_AGENT_HOST_ENABLE_CLAUDE=1). Pins
@anthropic-ai/claude-agent-sdk@0.2.112 in workspace + remote/.

Implemented in this phase:
* createSession - non-fork, in-memory wrapper only. Honors
  config.session for restore. The fork path and SDK session
  creation are deferred to Phase 6.
* listSessions - SDK is source of truth; per-session DB read
  is a best-effort overlay (failure never excludes an entry).
* disposeSession / shutdown - routed through a per-session
  SequencerByKey to serialize teardown.
* getDescriptor, getProtectedResources, models,
  onDidSessionProgress, setClientCustomizations,
  setClientTools, onClientToolCallComplete,
  setCustomizationEnabled, authenticate, respondTo*Request -
  minimal Phase-5 wiring.

Stubbed for Phase 6 (throw async 'TODO: Phase 6'):
sendMessage, abortSession, changeModel, getSessionMessages,
plus the createSession fork path.

Tests: 29 unit tests in claudeAgent.test.ts cover the
createSession restore-id path, listSessions overlay resilience,
dispose serialization, and stub surfaces.

Note: provisional / onDidMaterializeSession is intentionally
omitted in Phase 5 (see plan section 3.3.1) - the workbench needs
an immediate sessionAdded until the agent has real materialization
work, which arrives in Phase 6 alongside SDK query() startup.

* agentHost/claude: Phase 6 — sendMessage, single-turn, no tools

Implements the Phase 6 plan: provisional sessions materialize on first sendMessage, route a single-turn prompt through the Anthropic Claude Agent SDK's WarmQuery, and stream SDKMessages back as protocol AgentSignals via a pure mapSDKMessageToAgentSignals reducer.

Tools remain denied (canUseTool: 'deny'); fork moves to Phase 6.5; Plan Mode UI moves to Phase 7.

Highlights:

- ClaudeAgent.sendMessage routes through _sessionSequencer to collapse concurrent first sends into one materialize + N ordered sends.

- _materializeProvisional has two abort gates (post-startup + post-customizationDirectory write) so disposeSession landing mid-materialize cannot leak a WarmQuery subprocess.

- ClaudeAgentSession owns the prompt iterator + per-turn deferreds; mapSDKMessageToAgentSignals is a pure reducer with state owned by the session.

- IClaudeAgentSdkService gains startup() alongside listSessions().

Tests: 43 unit + 2 proxy-backed integration. Council-review fixes (C1 dispose race, C2 missing integration test, S1 cwd-less ratification) included.

* agentHost/claude: address PR review (listSessions resilience, dispose abort)

Two Copilot-reviewer comments on #314216:

1. listSessions: wrap _sdkService.listSessions() in try/catch. AgentService.listSessions fans out across providers via Promise.all; an SDK dynamic-import failure would otherwise nuke every other provider's session list. Now logs and returns [].

2. dispose: abort _provisionalSessions AbortControllers before super.dispose(). Previously a racing first sendMessage parked inside _writeCustomizationDirectory could pass the materialize abort gates and call _sessions.set on a disposed DisposableMap, orphaning the WarmQuery. Aborting first triggers the existing post-customization-write abort gate, which asyncDisposes the WarmQuery.

Tests: 2 new regressions (listSessions empty on SDK throw; agent.dispose() during racing materialize disposes the WarmQuery). 45/45 unit + 2/2 integration pass.

* Drop stale @anthropic-ai/sandbox-runtime dep from merge resolution

* Bump @anthropic-ai/claude-agent-sdk 0.2.112 → 0.2.128

The new SDK no longer vendors native binaries inside the main package.
It now ships a ~200MB `claude` executable per platform via 8 optional
platform-specific packages, mirroring the @github/copilot pattern:

  @anthropic-ai/claude-agent-sdk-{darwin,win32}-{x64,arm64}
  @anthropic-ai/claude-agent-sdk-linux-{x64,arm64}{,-musl}

The SDK loader picks the right package at runtime via process.platform
/process.arch (and tries -musl first on linux).

To strip off-target packages from the build output:
- build/lib/claudeAgentSdk.ts mirrors build/lib/copilot.ts
- gulpfile.vscode.ts and gulpfile.reh.ts apply the filter alongside
  the existing copilot one
- gulpfile.vscode.ts asar-unpacks @anthropic-ai/claude-agent-sdk-* so
  the executable stays on disk (asar would break exec permissions)
- alpine-{arch} maps to linux-{arch}-musl (claude is statically linked
  against libc and must match the host)

cglicenses.json gets 8 new entries mirroring the parent SDK's
"© Anthropic PBC. All rights reserved." text.

The new SDK Query interface adds a `readFile` method; FakeQuery and
RoundTripQuery test doubles get matching stubs.

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

* build: cross-copy @anthropic-ai/claude-agent-sdk darwin packages for universal app

Mirror the existing @github/copilot pattern in create-universal-app.ts.
Each darwin arch build only contains its own platform package (npm only
installs the optionalDependency matching the host CPU), so the universal
merger fails with files unique to one side.

Cross-copy node_modules/@anthropic-ai/claude-agent-sdk-{darwin-x64,darwin-arm64}/
between the two builds, skip them from the equality comparison, and tag
the per-arch `claude` executable as arch-specific so the merger keeps both.

Also extend verify-macho's skip list to ignore the single-arch `claude`
binaries inside the universal app.

* agentHost/claude: address PR review

- claudeAgent: rewrite `rgPath` from node_modules.asar →
  node_modules.asar.unpacked before putting it on the Claude subprocess
  PATH. Mirrors copilotAgent.ts and the workbench search engine helpers;
  without this, packaged builds advertise a path that doesn't exist on
  disk.
- cglicenses.json: add "// Reason: …" justification comments to the
  parent @anthropic-ai/claude-agent-sdk entry and each of the 8 new
  platform sub-packages, matching the file's convention.

* build: bump DMG volume size from 1g to 2g

The universal macOS app now carries platform-specific binaries for both
x64 and arm64 — @github/copilot-darwin-* (~128MB each) and the new
@anthropic-ai/claude-agent-sdk-darwin-* (~207MB each) — so the source
filesystem the DMG is built from has crossed 1GB. dmgbuild fails with
`No space left on device` when ditto can't fit the app inside the
volume.

Output DMG is LZMA-compressed (format = 'ULMO') so this only changes
the build-time staging size, not the shipped artifact size.

* agentHost/claude: don't bundle claude-agent-sdk; load it from a user-specified path

Move `@anthropic-ai/claude-agent-sdk` from `dependencies` to
`devDependencies` so the ~200MB-per-arch platform binaries are no longer
shipped with VS Code. The SDK becomes opt-in and externally-installed.

User-facing surface:
  - Replace boolean setting `chat.agentHost.claudeAgent.enabled` with
    string setting `chat.agentHost.claudeAgent.path`. When the setting
    is non-empty, the Claude provider registers; when empty (the default),
    it does not.
  - The setting value is forwarded to the agent host via the
    `VSCODE_AGENT_HOST_CLAUDE_SDK_PATH` env var (replacing the previous
    `VSCODE_AGENT_HOST_ENABLE_CLAUDE` flag).
  - `agentHostServerMain` exposes a `--claude-sdk-path <path>` CLI flag
    in place of the previous `--enable-claude-agent` flag.

Runtime loader:
  - `ClaudeAgentSdkService._loadSdk()` now reads the env var and
    dynamic-imports from there. If the path is a directory, the package's
    main entry is resolved from `package.json` (`exports['.']` /
    `main`) before the import — Node ESM does not support directory
    imports of `file://` URLs.

Build/packaging cleanup (no longer needed once the SDK is gone from
production deps):
  - Drop `build/lib/claudeAgentSdk.ts` and its callers in
    `gulpfile.{vscode,reh}.ts`.
  - Drop the `@anthropic-ai/claude-agent-sdk-*` glob from the
    asar-unpack list in `gulpfile.vscode.ts`.
  - Revert universal-app cross-copy + filesToSkip + x64ArchFiles entries
    in `build/darwin/create-universal-app.ts` and the corresponding
    skip patterns in `build/darwin/verify-macho.ts`.
  - Revert DMG volume size from 2g back to 1g in
    `build/darwin/dmg-settings.py.template` (was bumped earlier in
    this branch to fit the bundled SDK; no longer needed).
  - Remove the 9 `@anthropic-ai/claude-agent-sdk*` entries from
    `cglicenses.json` (no longer shipped, no manifest to license).

Type imports of `@anthropic-ai/claude-agent-sdk` continue to work via
the devDependency, so source code that does `import type` from the
package still typechecks.

* revert cglicenses change

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-06 16:48:32 -07:00
Henning Dieterichs 4c3311e130 updates component explorer 2026-05-06 19:36:23 +02:00
Alexandru Dima 881fa943e7 Revert "agentHost/claude: Phase 6 — sendMessage, single-turn, no tools (#314216)"
This reverts commit dea0d3c24a.
2026-05-05 12:38:51 +02:00
Tyler James Leonhardt dea0d3c24a agentHost/claude: Phase 6 — sendMessage, single-turn, no tools (#314216)
* agentHost/claude: post-Phase-4 cleanup

- roadmap.md: mark Phase 4 as DONE, link merged PR #313780.
- phase4-plan.md: record live-system smoke completion in §7.8;
  disabled-gate run skipped (covered by unit tests + env-var guard).
- claudeAgent.test.ts: drop gratuitous 'as unknown as' cast in the
  CCAModel fixture (literal already matches CCAModelBilling exactly;
  plan §7.4 forbids unsafe casts in tests).

* agentHost/claude: lock Phase 5 implementation plan

Handoff plan for Phase 5 (replace 7 throwing stubs in claudeAgent.ts).
Locked against post-PR-#313841 reality (provisional sessions,
onDidMaterializeSession, 30s empty-session GC) and the IAgent contract
on origin/main.

Decisions captured:
- Non-fork createSession is synchronous and in-memory; fork deferred
  to Phase 6 (throws TODO).
- IClaudeAgentSdkService surface mirrors IAgent (no dir parameter on
  listSessions); SDK loader caches resolved module, retries on
  failure, logs once.
- listSessions joins SDK enumeration with workbench session DB
  metadata via ISessionDataService; per-entry try/catch resilience.
- shutdown() routes per-session teardown through the same
  SequencerByKey<string> used by disposeSession() so concurrent
  shutdown/disposeSession cannot double-dispose a wrapper in Phase 6.
- 14 unit tests defined (12 lifecycle + 2 resolved-config), including
  log-once contract and shutdown/disposeSession race guard.

* agentHost/claude: Phase 5 — IAgent provider skeleton

Lands the ClaudeAgent IAgent provider behind the
'chat.agentHost.claudeAgent.enabled' setting (env gate
VSCODE_AGENT_HOST_ENABLE_CLAUDE=1). Pins
@anthropic-ai/claude-agent-sdk@0.2.112 in workspace + remote/.

Implemented in this phase:
* createSession - non-fork, in-memory wrapper only. Honors
  config.session for restore. The fork path and SDK session
  creation are deferred to Phase 6.
* listSessions - SDK is source of truth; per-session DB read
  is a best-effort overlay (failure never excludes an entry).
* disposeSession / shutdown - routed through a per-session
  SequencerByKey to serialize teardown.
* getDescriptor, getProtectedResources, models,
  onDidSessionProgress, setClientCustomizations,
  setClientTools, onClientToolCallComplete,
  setCustomizationEnabled, authenticate, respondTo*Request -
  minimal Phase-5 wiring.

Stubbed for Phase 6 (throw async 'TODO: Phase 6'):
sendMessage, abortSession, changeModel, getSessionMessages,
plus the createSession fork path.

Tests: 29 unit tests in claudeAgent.test.ts cover the
createSession restore-id path, listSessions overlay resilience,
dispose serialization, and stub surfaces.

Note: provisional / onDidMaterializeSession is intentionally
omitted in Phase 5 (see plan section 3.3.1) - the workbench needs
an immediate sessionAdded until the agent has real materialization
work, which arrives in Phase 6 alongside SDK query() startup.

* agentHost/claude: Phase 6 — sendMessage, single-turn, no tools

Implements the Phase 6 plan: provisional sessions materialize on first sendMessage, route a single-turn prompt through the Anthropic Claude Agent SDK's WarmQuery, and stream SDKMessages back as protocol AgentSignals via a pure mapSDKMessageToAgentSignals reducer.

Tools remain denied (canUseTool: 'deny'); fork moves to Phase 6.5; Plan Mode UI moves to Phase 7.

Highlights:

- ClaudeAgent.sendMessage routes through _sessionSequencer to collapse concurrent first sends into one materialize + N ordered sends.

- _materializeProvisional has two abort gates (post-startup + post-customizationDirectory write) so disposeSession landing mid-materialize cannot leak a WarmQuery subprocess.

- ClaudeAgentSession owns the prompt iterator + per-turn deferreds; mapSDKMessageToAgentSignals is a pure reducer with state owned by the session.

- IClaudeAgentSdkService gains startup() alongside listSessions().

Tests: 43 unit + 2 proxy-backed integration. Council-review fixes (C1 dispose race, C2 missing integration test, S1 cwd-less ratification) included.

* agentHost/claude: address PR review (listSessions resilience, dispose abort)

Two Copilot-reviewer comments on #314216:

1. listSessions: wrap _sdkService.listSessions() in try/catch. AgentService.listSessions fans out across providers via Promise.all; an SDK dynamic-import failure would otherwise nuke every other provider's session list. Now logs and returns [].

2. dispose: abort _provisionalSessions AbortControllers before super.dispose(). Previously a racing first sendMessage parked inside _writeCustomizationDirectory could pass the materialize abort gates and call _sessions.set on a disposed DisposableMap, orphaning the WarmQuery. Aborting first triggers the existing post-customization-write abort gate, which asyncDisposes the WarmQuery.

Tests: 2 new regressions (listSessions empty on SDK throw; agent.dispose() during racing materialize disposes the WarmQuery). 45/45 unit + 2/2 integration pass.
2026-05-05 07:34:01 +00:00
vs-code-engineering[bot] 9e4437bc47 Update distro commit (main) (#314301) 2026-05-05 01:34:03 +00:00
vs-code-engineering[bot] 59d5b26e86 Bump version to 1.120.0 (#314014) 2026-05-04 17:45:09 -07:00
Bryan Chen 75e5aceefd Merge branch 'main' into bryanchen-d/bump-xterm-overview-ruler-fix 2026-05-04 12:54:50 -07:00
Henning Dieterichs 08452f3d3a updates component explorer 2026-05-04 13:58:23 +02:00
dileepyavan e7c6e7ebea Sandbox: AllowNetwork option to allow outgoing traffic in sandbox mode. (#313912)
* changes

* changes

* Fix deprecated sandbox setting fallback

* Changes to include workspaceStorage directory for allowRead

* changes

* updating vscode sandbox runtime version

* Cleaning up the PR

* Fix terminal sandbox allow-network config

* fixing tests

* fixing tests

* Centralize terminal sandbox enablement checks

* Update network filter sandbox mode test
2026-05-03 16:58:50 +00:00
Alexandru Dima 125b21f63b Merge pull request #313531 from microsoft/alexd/digital-crawdad
Change `transpile-client-esbuild` to use the same esbuild script as core-ci
2026-05-02 15:56:46 +03:00
Bryan Chen 5e517570c7 chore(deps): bump @xterm/* to beta.213 to pick up overview ruler dispose fix
Picks up xterm.js commit 08ae141 (xtermjs/xterm.js#5826) which adds dispose / hasRenderer guards in OverviewRulerRenderer and cancels its pending requestAnimationFrame on dispose. This addresses the long-standing 'Cannot read properties of undefined (reading ''dimensions'')' crash tracked in microsoft/vscode#303546.
2026-05-01 16:09:16 -07:00
Robo 85177ecfed Revert "Share secrets between Code and Agents app via macOS Keychain" (#313635)
This reverts commit 48c0eed0c5.
2026-05-01 04:55:36 +00:00
Megan Rogge 4d75b7af01 fix: disable data-idle fallback for sync terminal commands (#313589) 2026-04-30 22:36:07 +00:00
Tyler James Leonhardt ddb2b117c3 Add CopilotAPI service for a future Claude agent (#313553)
* Add CopilotAPI service & plan for Claude

This service can be used to send requests to CAPI which we will need as we shim requests from agents to CAPI.

* Add CopilotAPI service & plan for Claude

This service can be used to send requests to CAPI which we will need as we shim requests from agents to CAPI.

* Clarify signal propagation behavior in ICopilotApiServiceRequestOptions documentation
2026-04-30 19:15:11 +00:00
Lee Murray 7f23453970 Update @vscode/codicons version to 0.0.46-6 (#313547)
Update @vscode/codicons version to 0.0.46-6 in package.json and package-lock.json

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-04-30 18:03:42 +00:00
Alex Dima 6f19b48219 Merge remote-tracking branch 'origin/main' into alexd/digital-crawdad 2026-04-30 19:21:27 +03:00
Alex Dima a5334fc981 Change transpile-client-esbuild to use the same esbuild script as core-ci 2026-04-30 19:21:15 +03:00
vs-code-engineering[bot] c5dfe8b76e Update distro commit (main) (#313496)
Update distro commit to 03ddc71f

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
2026-04-30 16:26:56 +02:00
Paul e643cdd7ba Update distro (#313438) 2026-04-30 07:14:47 +00:00
Robo 48c0eed0c5 Reapply "Share secrets between Code and Agents app via macOS Keychain" (#313241)
This reverts commit afe5823325.
2026-04-29 23:25:23 -07:00
Matt Bierner e5c31ee6f3 Merge pull request #313356 from microsoft/dev/mjbvz/wily-capybara
Pick up latest TS versions
2026-04-29 16:36:16 -07:00
Connor Peet c4ffdb5da7 Merge pull request #313301 from microsoft/connor4312/ah-plan-mode
agentHost: implement plan and native autopilot modes
2026-04-29 15:23:26 -07:00
Matt Bierner e41148800a Pick up latest TS versions 2026-04-29 15:19:54 -07:00