Commit Graph

508 Commits

Author SHA1 Message Date
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
Raymond Zhao 9df8712e1d chore: run npm audit fix (#316150) 2026-05-13 18:20:31 +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
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
Henning Dieterichs ca2ded47a8 updates component explorer 2026-05-07 18:43:10 +02:00
Raymond Zhao 6c2aba20dc chore: npm audit fix (#314855) 2026-05-07 07:33:46 +00:00
Matt Bierner 1936c06af2 Pick up latest TS native preview for building VS Code 2026-05-06 23:46:28 -07: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] 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
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
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
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
Tyler James Leonhardt f5e05a0253 chore: migrate agent-browser to @playwright/cli (#313316)
* chore: migrate agent-browser to @playwright/cli

Replace all uses of the `agent-browser` automation tool with `@playwright/cli`,
which supports `npx @playwright/cli attach --cdp=<port>` for connecting to
Electron/Chromium apps via CDP.

- Rewrite launch SKILL.md files (Code OSS and Copilot variants) with new
  command mappings: attach --cdp, tab-list, snapshot, screenshot --filename,
  fill, press
- Update auto-perf-optimize and chat-customizations-editor skills with
  @playwright/cli commands; fix eval blocks to use IIFE syntax required by
  the new tool
- Migrate testRemoteAgentHost.sh: connect→attach --cdp, snapshot -i→snapshot,
  screenshot path→screenshot --filename=path; verified end-to-end with --skip-message
- Remove agent-browser from extensions/copilot/package.json (covered by root
  devDependency); bump @playwright/cli to ^0.1.9 in root package.json

* fix: add @types/ws as explicit devDependency in copilot extension

Previously pulled in transitively via agent-browser -> webdriver.
Now that agent-browser is removed, @types/ws must be declared directly.
2026-04-29 20:55:11 +00:00
Connor Peet e8848aa993 comments and polish 2026-04-29 13:14:42 -07:00
Connor Peet e8825bfd05 Merge remote-tracking branch 'origin/main' into connor4312/ah-plan-mode 2026-04-29 11:52:39 -07:00
Connor Peet 75ec86b07f agentHost: implement plan and native autopilot modes 2026-04-29 11:43:46 -07:00
Matt Bierner 75d676cce9 Merge branch 'main' into dev/mjbvz/copilot-eslint-unify 2026-04-29 08:00:31 -07:00
Henning Dieterichs 19b3119b33 Pin @github/copilot to exact 1.0.34 and regenerate lockfiles
The previous reverts only changed the spec to ^1.0.34, but the resolved entries in the lockfiles still pointed at 1.0.38 (with 1.0.38 tarballs and integrity hashes). Since ^1.0.34 satisfies 1.0.38, npm ci would still install the broken version. Pin to exact 1.0.34 in all three package.json files and regenerate the lockfiles.
2026-04-29 16:46:30 +02:00
Henning Dieterichs 6087b944fe Revert "agents: bump @github/copilot to 1.0.38 (#313073)"
This reverts commit 83cbe74699.
2026-04-29 16:46:30 +02:00
Matt Bierner 371c4a0a73 Use root eslint for copilot 2026-04-28 15:20:59 -07:00
Rob Lourens 83cbe74699 agents: bump @github/copilot to 1.0.38 (#313073)
* agents: bump @github/copilot to 1.0.38

Tracks the version pinned in extensions/copilot/package.json. Updates
both root and remote/ package.json + lockfiles. Verified by re-running
the real-SDK 'listModels returns well-shaped model entries' integration
test (AGENT_HOST_REAL_SDK=1).

(Written by Copilot)

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

* fix: skip electron re-download when correct version already present

The macOS/Electron CI job was failing because `electron.ts` unconditionally
deletes `.build/electron` and re-downloads Electron on every invocation.

When integration tests run CSS/HTML tests via `node-electron.sh`, they call
`npm run electron` which triggers this re-download. This can fail due to
transient network errors (e.g. 502 Bad Gateway from GitHub), causing the
integration test step to fail even though Electron was already downloaded
successfully in the dedicated "Download Electron and Playwright" CI step.

Fix: add a `.version` marker file inside `.build/electron` that records the
Electron version, MS build ID, and architecture. On the next invocation,
`main()` reads this marker and returns early if it matches the expected
version, skipping the unnecessary delete-and-re-download cycle.

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/8d0b4207-2616-497e-9a4f-bf8a39671934

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

* Revert "fix: skip electron re-download when correct version already present"

This reverts commit e1811ece5b. That
commit was pushed to this PR by another agent and is unrelated to the
@github/copilot bump that this PR is for.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>
2026-04-28 21:00:14 +00:00
Johannes Rieken 7c6d456ec3 profiling: replace v8-inspect-profiler with chrome-remote-interface (#312974)
* profiling: replace v8-inspect-profiler with chrome-remote-interface

Convert src/vs/base/node/profiling.ts from pasted JS+DTS into a
proper TypeScript module. Replace the v8-inspect-profiler dependency
with chrome-remote-interface and update all import sites.

* Update src/vs/base/node/profiling.ts

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

* Update src/vs/base/node/profiling.ts

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

* ccr

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-28 10:40:22 +02:00
vs-code-engineering[bot] 61fa519123 Bump version to 1.119.0 (#312684) 2026-04-27 09:30:17 -07:00
vs-code-engineering[bot] dd05fac328 [cherry-pick] Revert "Share secrets between Code and Agents app via macOS Keychain" (#312735)
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
2026-04-27 13:54:58 +00:00
Alexandru Dima b4347c5814 Share secrets between Code and Agents app via macOS Keychain (#308990)
* Share secrets between Code and Agents app via macOS Keychain

Add a shared keychain service that stores secrets directly in the macOS
Keychain, allowing Code and its embedded Agents app to share auth tokens
without re-authentication.

Architecture:
- ISharedKeychainService (common interface) with ISharedKeychainMainService
  running in the Electron main process, exposed to renderer via IPC
- SharedKeychainMainService wraps @vscode/macos-keychain native addon
- NativeSecretStorageService now writes to both the shared keychain and
  the legacy safeStorage+SQLite pipeline (for rollback safety)
- On read, shared keychain is tried first, falling back to legacy

Product configuration:
- darwinSharedKeychainServiceName: per-flavor service name for data
  isolation between Stable/Insiders/Exploration
- Access group auto-detected from entitlements by the native addon

Key design decisions:
- Shared keychain only used when type is 'persisted' (not in-memory)
- BaseSecretStorageService refactored to expose protected _doGet/_doSet/
  _doDelete/_doGetKeys for use by subclasses within sequencer tasks
- Native addon is an optional dependency (macOS-only)

Files:
- build/azure-pipelines/darwin/app-entitlements.plist (keychain-access-groups)
- src/vs/platform/secrets/common/sharedKeychainService.ts (interface)
- src/vs/platform/secrets/electron-main/sharedKeychainMainService.ts (impl)
- src/vs/workbench/services/secrets/electron-browser/sharedKeychainService.ts (IPC proxy)
- src/vs/workbench/services/secrets/electron-browser/secretStorageService.ts (wiring)

Issue: #308028

* Address review feedback

* Add one-time migration of legacy secrets to shared keychain

On first secret operation, migrate all existing secrets from the legacy
safeStorage+SQLite pipeline into the shared macOS Keychain. This ensures
the Agents app can read secrets that were stored before the shared
keychain was introduced.

- Migration is lazy (triggered on first get/set/delete/keys)
- Guarded by a 'sharedKeychain.migrationDone' storage flag
- Idempotent: keychain writes are upserts, re-running is safe
- Best-effort per key: individual failures don't block the rest
- Skipped when type is 'in-memory'
- Also: make set() in SharedKeychainMainService best-effort (log, don't throw)

* update the current implementation

* restrict shared keychain to CROSS_APP_SHARED_SECRET_KEYS

* kick off shared keychain migration eagerly in constructor

* update @vscode/macos-keychain to 0.0.1

* Use provisioning profile for keychain access groups when available

During signing, check for build/darwin/distribution.provisionprofile.
If present, use it as the provisioning profile and keep the
keychain-access-groups entitlement in app-entitlements.plist.

If not present (e.g. OSS builds), strip the keychain-access-groups
section from a temp copy of the entitlements plist to avoid signing
failures. The shared keychain still works via the app's default
keychain without access-group isolation.

* Add entitlements diagnostic dump after signing

Dump the actual entitlements from the signed binary to validate
whether $(TeamIdentifierPrefix) is being expanded by codesign.

Hypothesis: the variable is passed literally to the entitlements
plist without expansion, causing a mismatch with the provisioning
profile and resulting in Killed: 9 on launch.

* Exclude provisioning profile from unicode hygiene check

* update package-lock.json

* Adopt multiple provision profiles

* fix: expand teamidentifier in the entitlement

* Re-sign without provisioning profile for tests

Run the entitlements step twice in CI:
1. First with provisioning profile (keychain-access-groups) for codesign/notarize
2. Then without provisioning profile for tests (in parallel with codesign)

This avoids making codesign sequential with tests while still
supporting the keychain-access-groups entitlement that requires
a provisioning profile.

- Add --skip-provisioning-profile flag to sign.ts
- Add 'Set Hardened Entitlements (for tests)' pipeline step

* Skip plist modifications when re-signing for tests

The plutil -insert calls fail on the second sign pass because the
keys already exist from the first pass. Skip plist modifications
when --skip-provisioning-profile is set since they are not needed.

* Move shared keychain migration from renderer to main process

Replace crossAppIPC-based secret handshake with direct shared keychain
writes in the main process:

- MacOSCrossAppSecretSharing now reads safeStorage+SQLite and writes to
  shared keychain via SharedKeychainMainService (no crossAppIPC needed)
- Code.app migrates on startup; Agents app spawns Code.app once if
  keychain is incomplete
- NativeSecretStorageService no longer does migration — just reads/writes
  shared keychain for cross-app keys

* Add isMacintosh guards before using the shared keychain service

Co-authored-by: Copilot <copilot@github.com>

* Remove spec

* Tweak comments

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 22:40:10 +03:00
dileepyavan bb09e7379b terminal: Disable read all by default (#311850)
* adding allowRead and testing with defaults

* Rename terminal sandbox read allow list

* Remove Copilot settings change from sandbox PR

* changes

* changes

* Updating sandbox runtime package

* Updating tests

* Add macOS test cases for denyRead/allowRead behavior and ~ path handling

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/ec5cf3c2-6c7b-4577-bdbb-8ac3d42bdfb0

Co-authored-by: dileepyavan <52841896+dileepyavan@users.noreply.github.com>

* changes for readonly home dir

* skipping integrated tests for sandbox

* running srt in tmp_dir for linux

* running srt in tmp_dir for linux

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-24 11:07:16 -07:00
Matt Bierner 1a54933643 Revert "Use main eslint config for copilot extension too" 2026-04-23 15:17:22 -07:00
Matt Bierner 74fca4377e Merge pull request #311606 from microsoft/dev/mjbvz/advisory-swallow
Use main eslint config for copilot extension too
2026-04-23 14:29:25 -07:00
Alex Dima 24838ca669 Merge remote-tracking branch 'origin/main' into alexdima/shared-keychain 2026-04-23 15:11:04 +02:00
Henning Dieterichs 23bf8f6efa Merge pull request #311958 from microsoft/hediet/b/educational-gayal
Improves source map support
2026-04-23 12:38:54 +02:00
Rob Lourens 096e5abe9d agentHost: bump @github/copilot to 1.0.34 (#311964)
* Fix broken sessions list
From #311751

Co-authored-by: Copilot <copilot@github.com>

* fix tests

* agentHost: settings followups

- Unrelated: fix local agent host being broken on main following
  some overnight cleanups
- Register a JSON schema for agent session settings (only when they're
  open since it has a perf cost)
- When there are multiple custom approval buttons, show them in a
  dropdown similar to other tool calls.

* Add tests for agent session settings schema registration

* Bump @github/copilot from ^1.0.28 to ^1.0.34

Matches the version used in extensions/copilot.

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

* agentHost: tolerate synthetic Copilot models with empty capabilities

After bumping @github/copilot to 1.0.34, listModels() returns a synthetic
'auto' router entry shaped like { id: 'auto', name: 'Auto', capabilities: {} }.
The SDK's ModelInfo type still declares capabilities.limits.max_context_window_tokens
as required, so reading it crashed _listModels and zeroed out the model list.

Wrap the SDK type in a local ICopilotModelInfo with the actually-optional
fields marked optional, and skip entries lacking max_context_window_tokens
with a warn log instead of throwing.

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

* agentHost: surface synthetic 'auto' model with optional maxContextWindow

Instead of dropping the synthetic 'auto' router model, make
IAgentModelInfo.maxContextWindow optional and pass it through as
undefined when the SDK doesn't report a fixed context window. The
agentHostLanguageModelProvider already handles undefined via '?? 0',
and the protocol state type already had the field optional.

Update the real-SDK listModels test to allow undefined maxContextWindow
and to assert the 'auto' entry is present.

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

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-22 19:23:45 +00:00
Henning Dieterichs 021452aeb0 updates source-map-support 2026-04-22 19:59:33 +02:00
Alex Dima 08b85031c9 update package-lock.json 2026-04-22 11:45:52 +02:00
Alex Dima 70abdc1ad8 Merge remote-tracking branch 'origin/main' into alexdima/shared-keychain 2026-04-22 11:37:15 +02:00
Rob Lourens a1abedfea0 Update @github/copilot SDK to ^1.0.28 (#311807)
Bump @github/copilot in root and remote package.json to ^1.0.28 to match
the version pinned by the bundled copilot extension (extensions/copilot).

Also adds a real-SDK integration test for listModels that subscribes to
the root state, authenticates, and asserts every model has a well-formed
shape (id, name, numeric maxContextWindow). This guards against SDK
schema drift like the issue in 1.0.34, where the server returned models
with optional capabilities.limits, causing _listModels to throw a
TypeError that _refreshModels silently swallowed (resulting in no models
in the UI).

Drive-by: fix stale provider id 'copilot' -> 'copilotcli' in the same
test file.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-22 02:29:53 +00:00
Raymond Zhao 9a60a6f5f9 chore: bump windows-process-tree (#311781) 2026-04-21 23:18:39 +00:00
Matt Bierner ad6844f64d Use main eslint config for copilot extension too
- Moves copilot eslint config into top level eslint config
- Adopts some standard rules
- Suppress a few new shared rules
2026-04-20 22:46:02 -07:00