Commit Graph

566 Commits

Author SHA1 Message Date
Tyler James Leonhardt e6f4d6c6f2 Avoid CPU-pegging process report in libc detection (#322260)
* Avoid CPU-pegging process report in libc detection

detectLibc() called process.report.getReport() on every Linux process to
tell glibc from musl. That report serializes heap, native stack and libuv
state, and the network/socket enumeration can peg the CPU on busy hosts.

Detect cheapest-first instead: parse the ELF PT_INTERP dynamic-linker path
from the head of /proc/self/exe, then string-match the head of /usr/bin/ldd,
and only fall back to the process report (now with excludeNetwork = true to
skip the expensive libuv section, also inspecting sharedObjects). Default to
glibc when nothing is conclusive.

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

* Read ELF64 offsets as 64-bit with safe-integer guards

Address PR review: e_phoff, p_offset and p_filesz are 64-bit fields in
ELF64. Read them via readBigUInt64LE through a bounded helper that rejects
values past Number.MAX_SAFE_INTEGER, validate e_phentsize covers a full
Elf64_Phdr, and widen the per-entry bounds check to the 8-byte p_filesz.

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

* Use detect-libc package instead of hand-rolled libc detection

Replace the bespoke ELF/ldd/process-report probing in detectLibc() with the
detect-libc package (already present transitively, now a direct dependency).
It performs the same cheapest-first detection and sets process.report's
excludeNetwork flag internally, so the CPU-pegging libuv enumeration is still
avoided without us maintaining the ELF parser. Add detect-libc to the
hasNode import allowlist in eslint.config.js.

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

* Declare detect-libc in remote/package.json

detectLibc() (via agentSdkDownloader) is reached from agentHostServerMain,
so the server/REH build requires detect-libc. It was only present in the
remote node_modules transitively (through @parcel/watcher); declare it
directly to match the root manifest and the direct import.

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

* Rename detectLibc to detectLibcSync

Signal the blocking nature in the name and leave room for a future
promise-based detectLibc that wraps detect-libc's async family(). Update
the agentSdkDownloader consumer and the unit test.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-21 19:43:34 -07:00
dependabot[bot] 8b458a5d61 build(deps): bump undici from 7.26.0 to 7.28.0 (#322102)
* build(deps): bump undici from 7.26.0 to 7.28.0

Bumps [undici](https://github.com/nodejs/undici) from 7.26.0 to 7.28.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v7.26.0...v7.28.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.28.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: restore cpu-features entry in package-lock.json

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
2026-06-19 23:17:11 +00:00
Lee Murray f3dbc26de1 Update @vscode/codicons to version 0.0.46-20 and add new icons (#322136)
chore: update @vscode/codicons to version 0.0.46-20 and add new icons

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-06-19 20:48:40 +00:00
Don Jayamanne a0c54ca2e9 Update GitHub Copilot and SDK versions to 1.0.64-0 in package and package-lock files (#322020)
* Update GitHub Copilot and SDK versions to 1.0.64-0 in package and package-lock files

* Increase timeout for CopilotAgent tests to 30 seconds
2026-06-19 16:35:16 +02:00
Lee Murray 19002965c0 Update @vscode/codicons to version 0.0.46-18 and add new git pull request icons (#321738)
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-06-17 10:18:29 +00:00
Don Jayamanne e364243a0d chore: update @github/copilot to version 1.0.63 (#321608)
* chore: update @github/copilot to version 1.0.63 in package.json and package-lock.json

* chore: update @github/copilot to version 1.0.63 in package.json and package-lock.json
2026-06-17 09:35:41 +10:00
dependabot[bot] 880405777d Bump hono from 4.12.23 to 4.12.25 (#321666)
* Bump hono from 4.12.23 to 4.12.25

Bumps [hono](https://github.com/honojs/hono) from 4.12.23 to 4.12.25.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.23...v4.12.25)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.25
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: sync root lockfile for cpu-features override

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
2026-06-16 15:34:25 -07:00
dependabot[bot] 6deeaca7dc Bump form-data from 4.0.5 to 4.0.6 (#321512)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.5 to 4.0.6.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.5...v4.0.6)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-16 00:39:46 +00:00
dependabot[bot] 7face70eca Bump tar from 7.5.15 to 7.5.16 (#321511)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.15 to 7.5.16.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.15...v7.5.16)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.16
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 17:07:07 -07:00
dependabot[bot] c9f37fc676 Bump markdown-it from 14.1.1 to 14.2.0 (#321510)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.1 to 14.2.0.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.1...14.2.0)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 17:06:30 -07:00
vs-code-engineering[bot] 0a9d0e4c40 Bump version to 1.126.0 (#321382)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 12:08:54 +02:00
Tyler James Leonhardt 56414283d5 AH: per-platform agent SDK build + CDN upload (#321012)
* AH: replace agentSdks {url, sha256} with {urlTemplate}

product.agentSdks.<sdk> now ships {version, urlTemplate} instead of
{version, url, sha256}. The runtime substitutes {sdkTarget} into the
template per-launch via a new IAgentSdkPackage.currentSdkTarget()
hook — Claude appends -musl on musl Linux hosts (detected from Node's
process.report.header.glibcVersionRuntime, no subprocess), Codex
never does (statically musl-linked, single Linux SKU).

Why the shape change:

  1. macOS Universal bundles ship arm64 + x64 binaries sharing one
     product.json — a fixed per-platform {url, sha256} could only be
     correct for one of the two halves. The template lets the same
     bundle serve both.
  2. The sha256 was belt-and-suspenders: product.json is covered by
     product.checksums inside the signed app bundle, URLs are HTTPS
     to a Microsoft-controlled CDN. The sha only guarded "trusted URL
     string, tampered edge bytes" — a much harder attack than
     tampering with product.json itself.

Downloader changes: sdkTarget joins the cache key path
(<userDataPath>/agent-host/sdk-cache/<pkg>/<sdkVersion>/<sdkTarget>/)
so Universal launches with different resolved targets get independent
caches. .complete sentinel content is now the source URL (debug-only;
the file's existence is the integrity signal).

isAvailable() now gates on both product config AND currentSdkTarget()
resolving, so the provider doesn't register on hosts with no SKU
(armhf) even if some future product.json carries an agentSdks block.

Tests: drop sha-mismatch + stale-cache-by-sha tests; add coverage for
{sdkTarget} substitution, separate-cache-dirs-for-different-targets
(the Universal motivating case), currentSdkTarget-undefined gating
isAvailable, and CodexSdkPackage.currentSdkTarget agreeing with the
existing codexPackageSuffix table.

Pairs with the build PR (#321012), which will be rebased to emit the
new shape once this lands. See build/agent-sdk/TODO.md on that branch.

* AH: simplify per-package SDK target resolution

Replaces per-package `currentSdkTarget()` (one method per SDK,
re-implementing the same platform/arch table modulo a musl branch)
with a single boolean `hasSeparateMuslLinuxPackage` on the package
descriptor and a shared `resolveSdkTarget(pkg, host)` in the
downloader. Claude sets it true; Codex sets it false. The supported-
platforms whitelist collapses from three copies (claudeSdkTarget,
codexPackageSuffix, build's getSdkTargetForBuild) to one runtime
resolver paired with the build helper.

Host injection: AgentSdkDownloader gains an optional leading
`ISdkTargetHost` constructor param (per project convention, non-DI
before DI). Production call sites pass `undefined` to derive from
`process`; tests pass synthetic hosts to exercise Universal launches
and musl Linux without touching `process`.

Other simplifications applied from review:
- `_cacheHit` was a one-line passthrough → inlined to
  `_fileService.exists(sentinel)` at both call sites.
- `_pendingDownloads` key now uses `cacheDir` directly (already
  unique per pkg/version/target) instead of allocating a parallel
  `<pkg>/<version>/<target>` key string.
- `.complete` sentinel content is now empty — the file's existence
  is the integrity signal, the cache dir path already encodes
  `<pkg>/<version>/<sdkTarget>` for debugging.
- `detectLibc()` returns `LibcFamily | undefined` on non-Linux
  instead of `'glibc'`-by-convention (drops consumer-specific
  phrasing from the primitive).
- Test's `listLeftovers` recursive walker replaced with a direct
  `readdir` of the known version dir (the only level where scratch
  dirs can land).
- Tests collapse 4 direct `new AgentSdkDownloader(...)` blocks
  through `makeDownloader(null, host)`.
- `IAgentSdkProductConfig` JSDoc trimmed to interface contract;
  rationale lives in roadmap.md Phase 15.
- `_failureLatch` doc explains why per-id (not per-target) granularity
  is intentional.

Tests: 25 passing (3 libc + 3 resolveSdkTarget + 13 downloader +
6 codex paths). New `resolveSdkTarget` suite covers the cross-product
of {claude, codex} × {linux glibc, linux musl, darwin, win32} that
previously lived as scattered table tests.

* AH: drop test-only host injection on AgentSdkDownloader

The previous commit added a constructor param to inject a synthetic
`(platform, arch, libc)` into the downloader so tests could exercise
Universal launches and musl Linux from any CI host. Production passed
`undefined` and the body fell back to a derived host — a test-only
ceremony in production code.

Restructured so the runtime stays clean:

  - `resolveSdkTarget(pkg, host?)` keeps its optional `host` param,
    defaulting to the real process. Cross-host coverage lives in
    dedicated unit tests that call it directly.
  - `AgentSdkDownloader` no longer takes a host. Both call sites
    revert to `createInstance(AgentSdkDownloader)` with no extras.
  - Integration suite `suiteSetup` skips on hosts the downloader
    can't target (e.g. linux-armhf), and pins `hostSdkTarget` for
    path assertions. The "two-host cache key" assertion becomes a
    direct path check on the host's resolved target instead of an
    artificial second-host download.

Tests: 23 passing (3 libc + 3 resolveSdkTarget unit + 11 downloader
integration + 6 codex paths).

* AH: address PR review — validate urlTemplate placeholders + honor backpressure

Two findings from #321078 review:

1. `format2()` silently leaves unknown placeholders untouched, so a
   vscode-distro typo like `{sdkTaret}` would produce a 404 from the
   CDN with no hint at the real cause. Add a `{...}` scan after
   substitution that throws an actionable error pointing at the
   suspect product.json field. Covered by a new test.

2. The hand-rolled `_fetch` pipe ignored `out.write()`'s return value,
   so a slow disk (Windows AV scan, network home dir) could buffer
   the entire 70-95MB tarball in memory. Pause the source stream on
   write-buffer full, resume on drain. Can't use `stream/promises
   .pipeline()` here because `IRequestContext.stream` is a
   `VSBufferReadableStream`, not a Node Readable — the source's own
   `pause()`/`resume()` is what we have to work with.

Cancellation test still passes; backpressure change is transparent to
the cancel teardown.

* AH: per-platform agent SDK build + CDN upload (#7885)

Per-platform VS Code build jobs now produce + upload the Claude and
Codex agent SDK tarballs to main.vscode-cdn.net and stamp the resulting
url/sha into `product.agentSdks` of their own packaged product.json.

The build step (`build/azure-pipelines/common/agent-sdk-produce.yml`)
runs inline in each existing platform job (darwin/linux/win32/alpine),
before the gulp packaging step. It always builds the tarballs. The
AzureCLI credential fetch and the CDN upload are gated on
`VSCODE_PUBLISH=true` — test pipeline runs leave the tarballs as a
pipeline artifact (`agent_sdk_<platform>_<arch>_tarballs`) for
inspection but don't touch the CDN, and ship product.json without
`agentSdks` (same shape as a local dev build).

The REH gulpfile only stamps `agentSdks` for `type === 'reh'`; REH-web
skips it because the agent host is node-only.

* AH: use npm.cmd on Windows in agent SDK build

`spawnSync('npm', ...)` fails on Windows because npm ships as a `.cmd`
shim and Node's child_process doesn't resolve PATHEXT without an
explicit suffix. The Windows pipeline jobs were dying with `exited
null` and no further context.

Also surface `result.error` so a future spawn-resolution failure shows
the actual ENOENT instead of a bare exit-code message.

* AH: pass shell:true when spawning npm.cmd on Windows

Node 20+ (CVE-2024-27980) refuses to spawn `.cmd`/`.bat` files without
`shell: true` and fails with `EINVAL`. The Windows pipeline jobs hit
this after the previous fix swapped `npm` for `npm.cmd`.

* AH: emit {version, urlTemplate} per the runtime shape change

Stacked on top of the runtime PR (tyler/agent-sdk-url-template). With
the runtime now consuming `{version, urlTemplate}` and substituting
`{sdkTarget}` per launch, the build pipeline emits the matching shape:

  - `IAgentSdkResults[<sdk>]` drops `{url, sha256}` for
    `{version, urlTemplate}`.
  - `produce.ts` still uploads its platform's tarballs (idempotent
    HEAD-then-skip in upload.ts is unchanged), but the results JSON
    every job writes is identical per SDK — only the version differs.
    That's the whole point: macOS Universal can ship one product.json
    that covers both arm64 and x64 launches because the runtime
    resolves {sdkTarget} per launch.
  - New `buildCdnUrlTemplate(sdk, version)` mirrors `buildCdnUrl`'s
    path but leaves `{sdkTarget}` as the format2 placeholder.
  - README updated; TODO.md (the placeholder note left while the
    runtime PR was pending) deleted.

Tarballs at the existing CDN paths (e.g.
`agent-sdk/claude/0.3.168/darwin-arm64.tgz`) remain valid and reachable
— no re-upload needed, just a re-stamp of product.json on the next
publish run.

* AH: address PR review on build/agent-sdk (Copilot)

Five comments from the build PR review:

1. common.ts header named drift-check.ts (deleted during simplification)
   and missed produce.ts. Updated.
2. common.ts "single source of truth is package.json optionalDependencies"
   was aspirational — getSdkTargetForBuild is a hardcoded table. Reframed
   the comment to describe what we actually do (hardcoded table kept in
   lockstep by convention) and why (no runtime npm metadata lookup).
3. package.ts header said the library form is consumed by gulpfile
   packaging tasks — actually called from produce.ts as its own pipeline
   step. Updated.
4. + 5. isCliInvocation() in package.ts and upload.ts compared
   import.meta.url to a manually constructed `file://${process.argv[1]}`,
   which breaks on Windows (drive letters URL-encoded, spaces escaped).
   Repo already established the cleaner `import.meta.filename ===
   process.argv[1]` pattern (see build/npm/installStateHash.ts:143).
   Pure portability fix — only affects the dev-mode CLIs, the production
   pipeline calls these as library functions.

* AH: per-SDK agents/<sdk>/{package.json,package-lock.json} for byte determinism

Build 447090 surfaced sha drift across pipeline runs: same exact-pinned
SDK version, but transitive deps unlocked (`npm install
--no-package-lock`) → different bytes → CDN HEAD-then-fail rejected
the re-upload. Determinism is load-bearing for the security model
(content-addressed CDN URLs, no runtime sha verification — the bytes
at a given URL must be stable).

Fix: ship pinned lockfiles per SDK and use `npm ci`. New layout:

  build/agent-sdk/agents/
    claude/
      package.json       # exact one dep: @anthropic-ai/claude-agent-sdk@0.3.168
      package-lock.json  # full transitive graph
    codex/
      package.json       # exact one dep: @openai/codex@0.134.0
      package-lock.json

Bonus: the folder set IS the SDK list. Drops the hardcoded
`SDKS: readonly Sdk[]` and `PACKAGE_NAME: Record<Sdk, string>` from
common.ts; replaced with `getSdks()` (discovers from `agents/`) and
`getAgentMeta(sdk)` (reads from the agent's own package.json). Adding
a new SDK is now one folder + lockfile gen + commit.

Verified reproducible locally: two back-to-back runs of `package.ts
--sdk=codex --target=darwin-arm64` produce byte-identical tarballs.

NOTE: existing CDN blobs from build 446990 carry the old drifted
shas. The next publish will fail HEAD-then-skip against them. Need to
delete `agent-sdk/{claude,codex}/{0.3.168,0.134.0}/*.tgz` from the
vscodeweb storage account's $web container before re-publishing, or
the upload step will refuse with "blob already present with DIFFERENT
sha256".

* AH: bump pinned SDK versions to sidestep stale CDN blobs

claude 0.3.168 → 0.3.169 (one point release; 0.3.170/172/173/174/175
all exist upstream, sticking to the next bump for risk minimisation).
codex 0.134.0 → 0.135.0 (next stable; 0.135-0.139 are all stable
releases, picking the immediate successor).

Bumping versions changes the CDN URL path (`agent-sdk/<sdk>/<version>/...`)
so the next publish lands at fresh, never-uploaded blob URLs. Avoids
having to delete the drift-shaped blobs from build 446990 that would
otherwise trip HEAD-then-fail.

Bumped both the per-SDK `agents/<sdk>/package.json` (the build's pin)
and repo-root `package.json` devDeps (the runtime's type-import pin)
in lockstep, with all four lockfiles regenerated. Local reproducibility
re-verified: two back-to-back runs of `package.ts --sdk=codex
--target=darwin-arm64` produce byte-identical tarballs at the new pin.

Runtime typecheck clean — no API changes to either SDK in these point
releases.

* AH: stub usage_EXPERIMENTAL on test Query fakes (SDK 0.3.169)

Claude SDK 0.3.169 added `usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET`
as a required method on `Query`. Three test files implement the
interface as fakes (FakeQuery, ImmediatelyDoneQuery, RoundTripQuery)
and broke the type-check on tsgo.

Stubbed each as `throw 'not modeled'` matching the existing pattern
for every other method these fakes don't exercise. The field name
makes it clear the SDK doesn't expect anyone to rely on it yet, so a
"not modeled" stub is honest.

* AH: authenticate npmrc before agent SDK `npm ci`

Build 447232 hit E401 from the private npm mirror: the platform job's
existing "Setup NPM Authentication" step is gated on the node_modules
cache being a miss (it lives in the cache-warming path), so on a cache
hit the user's ~/.npmrc has no auth token, and our agent-sdk `npm ci`
inherits the global registry override + missing auth → E401.

Fix: add an always-on auth step at the top of agent-sdk-produce.yml.
Captures the user's npmrc path, runs npmAuthenticate@0 against it. Now
runs independent of the node_modules cache state.

The previous npm install --no-package-lock path tolerated this because
it fell back to anonymous resolution against npmjs.org. `npm ci`
strictly resolves through the configured (private) registry, which
needs auth. The lockfile + private mirror combination is what we want
for supply-chain auditing — the fix is to make sure auth is set up
unconditionally rather than bypass the mirror.

Also reverts a brief stop-along-the-way that added
`--registry=https://registry.npmjs.org/` to the npm ci call — wrong
direction (would bypass the supply-chain mirror).

* AH: create ~/.npmrc with `npm config set` before authenticating

npmAuthenticate@0 errored on cache-hit runs: the .npmrc path returned
by `npm config get userconfig` is just where npm WOULD write — the
file doesn't exist until something actually writes to it. The platform
job's "Setup NPM" step creates it via `npm config set registry`, but
is skipped on cache hits.

Mirror that pattern in our prep step: run `npm config set registry`
ourselves (idempotent — rewrites the same value the existing config
already has on cache misses) so npmAuthenticate@0 has a real file to
edit.

* AH: move agent SDK step ahead of Download Copilot VSIX

Was: install-builtin → VSIX-background → Compile → … → VSIX-attach → agent-sdk → Build client.
Now: install-builtin → agent-sdk → VSIX-background → Compile → … → VSIX-attach → Build client.

No data dependency between the agent SDK step and the VSIX download
(or Compile, for that matter — agent SDK uses its own scratch dir,
its own npmrc, doesn't read node_modules or anything from out-build).

Benefit: fail-fast. The agent SDK step previously ran after Compile +
both VSIX wait points, so a CDN auth failure or a sha-mismatch
would only surface ~10 minutes into the job. Moving it earlier
catches those failures in seconds, before any heavy work runs.

Applied consistently across darwin/linux/win32/alpine (linux still
gated on `ne(VSCODE_ARCH, 'armhf')`).
2026-06-12 16:03:30 -04:00
Josh Spicer d72b81a914 Add discovery of copilot MDM policy (#320991)
* Add Copilot managed settings policy source

* Refactor Copilot managed settings policy evaluation

* Clarify raw managed settings bridge policy

* Use dedicated Copilot managed settings service

* Avoid Copilot managed settings IPC update loop
2026-06-12 00:37:03 +00:00
Raymond Zhao 42b70f5d09 chore: run npm audit fix (#321005) 2026-06-11 19:38:19 +00:00
Don Jayamanne 847d569028 chore: update @github/copilot and related dependencies to version 1.0.61 (#320868)
* chore: update @github/copilot and @github/copilot-sdk to version 1.0.61 and 1.0.1 respectively

- Bump @github/copilot from 1.0.60 to 1.0.61 in package.json and package-lock.json
- Update @github/copilot-sdk from 1.0.0 to 1.0.1 in package.json and package-lock.json
- Modify postinstall script to copy tgrep files instead of sharp files
- Update tests to include tgrep binaries
- Change model in e2e tests from 'claude-opus-4.7' to 'gpt-5-mini'

* fix: add libm.so.6(GLIBC_2.27)(64bit) to referenceGeneratedDepsByArch
2026-06-11 20:46:55 +10:00
Tyler James Leonhardt f57a83c819 Distribute Claude and Codex agent SDKs via product.json (#320709)
* Add tar to REH dependencies and eslint allowlist

The agent SDK downloader uses node-tar to extract the per-platform
SDK tarballs it downloads from product.json — pure JS, zero native
deps, so the agent host works on every server install footprint
without relying on a system tar binary.

* Distribute Claude and Codex agent SDKs via product.json

Adds IAgentSdkDownloader, which fetches the per-platform Claude
and Codex SDKs from a CDN configured through product.agentSdks
(populated by vscode-distro), verifies the sha256 anchored in
product.json, and caches the extracted root under userDataPath.
Providers register iff the SDK is available — either a dev override
env var or a product.agentSdks entry whose sha256 declares the
current platform. Falls through to today's no-op behavior in OSS
builds with neither.

Tracks microsoft/vscode-internalbacklog#7885.

* Fix lockfiles after merge resolve

The previous merge took upstream's @anthropic-ai/sdk@0.82.0 in
package.json but left the lock file's nested resolution tree
pointing at 0.102.0, so npm ci rejected the workspace. Re-resolve
via npm install. Also adds the remote/package-lock.json entry for
tar that was missed in the first commit.

* Address PR review feedback

- nodeAgentHostStarter: pass process.env (not the local shell-env
  snapshot) to buildAgentSdkEnv so a developer's env-var dev override
  actually wins over a settings value. Matches electronAgentHostStarter.
- agentSdkDownloader: write the .complete sentinel inside tmpDir BEFORE
  the move so cache publish is atomic. A crash between move and
  sentinel-write previously left a wedged cacheDir that subsequent runs
  could not recover from (rename-loser path requires a valid sentinel).
- agentHostBootstrap: register RequestService with the DisposableStore
  so its config-change listener is cleaned up at shutdown.
- agentSdkDownloader.test: build the fixture tarball via node-tar
  (already a dep) instead of spawning the host tar binary; drops the
  bsdtar/gnutar portability surface.
- agentHostMain: comment referenced the renamed VSCODE_AGENT_HOST_*_PATH
  env var; corrected to VSCODE_AGENT_HOST_*_SDK_ROOT.

* Drop test-stub fields not present in @anthropic-ai/sdk 0.82

The earlier merge took upstream's @anthropic-ai/sdk@0.82.0 over the
stash's 0.102.0; some test stubs had been authored on a branch using
0.102.0 and reference fields that don't exist in 0.82
(output_tokens_details, estimated_tokens, diagnostics on BetaMessage).
Strip the optional fields — they're shape-only filler in the test
fixtures and aren't asserted on.
2026-06-10 14:20:12 -07:00
Matt Bierner 2aef175f61 Merge pull request #320675 from microsoft/dev/mjbvz/private-panther
Pick up latest TS version for building VS Code
2026-06-09 15:04:11 -07:00
Matt Bierner aa2b7b38b5 Pick up latest TS version for building VS Code 2026-06-09 14:19:09 -07:00
Megan Rogge 4b47f077e4 xterm@6.1.0-beta.285 (#320646)
Diff: https://github.com/xtermjs/xterm.js/compare/6.1.0-beta.220...6.1.0-beta.285

Updates @xterm/* from beta.220 to beta.285 (addon-webgl to beta.284, its latest published).

Co-authored-by: Megan Rogge <meganrogge@Megans-MacBook-Pro.local>
2026-06-09 19:04:24 +00:00
Lee Murray a66cbe3510 Update @vscode/codicons to version 0.0.46-16 and add 'runCompact' icon registration (#320436)
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-06-09 11:52:57 +00:00
Don Jayamanne 8ad4bc41d2 chore: update @github/copilot to version 1.0.60 in package.json and package-lock.json (#320521)
* chore: update @github/copilot to version 1.0.60 in package.json and package-lock.json

* chore: update @github/copilot to version 1.0.60 in package.json and package-lock.json

* test: update feature flag service creation in Copilot CLI tests
2026-06-08 22:25:38 -07:00
vs-code-engineering[bot] ab186162fa Bump version to 1.125.0 (#320361)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-08 09:10:48 +00:00
Joaquín Ruales c5e7f266cd Upgrade Playwright to 1.61.0-alpha-2026-06-04 (#319067) 2026-06-04 18:26:44 -07:00
dependabot[bot] b1e5e01b08 Bump hono from 4.12.18 to 4.12.23 (#319997)
Bumps [hono](https://github.com/honojs/hono) from 4.12.18 to 4.12.23.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.18...v4.12.23)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-04 20:34:54 +00:00
Lee Murray 9629924031 Update @vscode/codicons to version 0.0.46-15 and add new compact icons (#319885)
chore: update @vscode/codicons to version 0.0.46-15 and add new compact icons

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-06-04 10:40:45 +00:00
Don Jayamanne 764764d15c Update GitHub Copilot and SDK dependencies to latest versions (#319677) 2026-06-03 16:06:08 +02:00
dileepyavan b70081faab [Windows-Sandboxing] Update MXC sdk package to 0.6.0 (#319649)
mxc_upgrade
2026-06-02 16:34:23 -07:00
Robo 294fb35083 build: pin node-addon-api 6.x at root to avoid MSBuild tlog race (#319398) 2026-06-02 10:15:00 +09:00
Matt Bierner 2ed9640c30 Keep package.json in sync 2026-06-01 09:52:46 -07:00
Matt Bierner f65d12a26a Update build ts versions 2026-06-01 09:48:41 -07:00
vs-code-engineering[bot] c620cf1382 Bump version to 1.124.0 (#319284)
* Bump version to 1.124.0

* Revert distro change to match main

The distro field was carried over from before PR #319280 reverted it on main.
Removing the distro change so the bump PR only modifies version-related fields,
matching the workflow's PKG_LOCK_AND_COPILOT exception.

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ulugbek Abdullaev <uabdullaev@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-01 19:58:18 +05:00
Giuseppe Cianci 20830ab4e4 [Codex] Add app-server protocol generation (#318826) 2026-06-01 11:48:48 +02:00
dileepyavan 2ac719f7cb Retry with AllowNetwork option before retrying outside the sandbox. (#319181)
Enabling AllowNetwork option for retrying before running outside the sandbox,
2026-05-31 21:03:28 -07:00
dileepyavan e1a9625b76 [Windows_Sandboxing]Refactoring config creation for windows sandboxing and upgrading mxc (#318865)
* refactoring config creation for windows sandboxing and upgrading mxc package

* Avoid MXC SDK imports in shared sandbox contract

* fixing tests
2026-05-29 23:02:29 +00:00
vs-code-engineering[bot] f834625f05 Bump version to 1.123.0 (#318253)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Federico Brancasi <federicobrancasi@gmail.com>
Co-authored-by: Anthony Kim <62267334+anthonykim1@users.noreply.github.com>
2026-05-29 21:58:27 +00:00
Robo b0bdc05bbb fix: zip inflate with yauzl on node v24.16.0 (#318682) 2026-05-29 17:01:24 +10:00
Rob Lourens 98abbd3140 Bump @github/copilot-sdk to 1.0.0-beta.8 (#318683)
* Bump @github/copilot-sdk to 1.0.0-beta.8 (Written by Copilot)

Also bumps @github/copilot CLI to 1.0.55-3 to satisfy the SDK's
`^1.0.55-1` peer requirement.

Key SDK breaking changes adapted in `src/vs/platform/agentHost/`:

- `CopilotClientOptions`: `useStdio`/`cliPath`/`autoStart` →
  `connection: RuntimeConnection.forStdio({ path })`; `remote` →
  `enableRemoteSessions`.
- `SessionContext.cwd` → `workingDirectory`.
- `CopilotSession.getMessages()` → `getEvents()`,
  `destroy()` → `disconnect()`.
- `PermissionRequest` is now a discriminated union; the host-side
  `ITypedPermissionRequest` is no longer `extends PermissionRequest` but
  a standalone bag-of-optionals interface so existing call sites continue
  to work. Extended host signal with the new `extension-management` /
  `extension-permission-access` kinds.
- `BaseHookInput`: `timestamp: number` → `Date`, `cwd` →
  `workingDirectory`, new required `sessionId`.
- `Tool.handler` is now optional — tests use `tool.handler!(...)`.
- `ToolBinaryResult.type` narrowed to literal `'image' | 'resource'`.
- `AssistantUsageData.copilotUsage` and `ShutdownData.totalPremiumRequests`
  removed; corresponding accumulation/trace code dropped.

Validation: 0 TS errors, layers check passes, all 1357 agent-host unit
tests pass. Real-SDK integration tests: 9/11 passing. Two failures
documented in the session plan:

- plan-mode session-state test times out (likely needs migration of the
  `_enablePlanModeOnClient` shim to the new public
  `SessionConfig.onExitPlanModeRequest`).
- subagent-routing test: `read_agent` now appears on the parent session
  (likely a CLI 1.0.55 behavior change).

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

* Fix broken @github/copilot-win32-x64 entry in remote/package-lock.json

The committed remote/package-lock.json had a malformed stub entry:

  "node_modules/@github/copilot/node_modules/@github/copilot-win32-x64": {
    "optional": true
  }

with no version field, which caused npm install to crash with:

  TypeError: Invalid Version:
      at Node.canDedupe (.../@npmcli/arborist/lib/node.js:1137:32)
      at PlaceDep.pruneDedupable (.../@npmcli/arborist/lib/place-dep.js:426:14)

Replaced with a proper top-level node_modules entry for
@github/copilot-win32-x64@1.0.55-3 (matches the resolution used for
the other platform optionals on the @github/copilot dep). This is what
npm naturally produces when regenerating the lockfile from scratch.

Fixes the failing 'Install dependencies' step on the macOS / Remote
CI job.

(Written by Copilot)

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

* Bump deb amd64 libc6 floor to 2.15 for new @github/copilot runtime.node

The new @github/copilot 1.0.55-3 ships a Linux x64 runtime.node that
references GLIBC_2.15 (was GLIBC_2.14 in 1.0.49). dpkg-shlibdeps now
emits libc6 (>= 2.15) for amd64; update the reference list so the deb
prepare task no longer fails the build.

Only amd64 is affected: arm64 runtime.node GLIBC version set is
unchanged, and @github/copilot does not ship an armhf binary. The
overall libc6 floor for the package is still 2.28, so distro support
is unchanged.

(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-28 15:50:15 -07:00
Raymond Zhao 49d14f8afc chore: npm audit fix (#318614)
* chore: npm audit fix

* Remove merge conflict

* chore: bump build
2026-05-28 21:53:33 +00:00
Osvaldo Ortega d53d505759 Render cloud task history from typed session events (#318646)
* CAPI package update

* Missindg updates

* Missing lock

* Render cloud task history from typed events

- Extract shared session-event-to-chat-parts renderer into
  chatSessions/common/sessionEventRenderer.ts so both the Copilot CLI
  and Cloud Tasks providers produce identical tool/text formatting.
- Render Task API history via the shared renderer, remapping
  custom_agent.* to the equivalent subagent.* names so tool cards,
  bash terminal output, edits, search results, MCP results and
  subagent groups all render the same way they do in the CLI.
- Match github.com/github/github-ui presentation by suppressing
  intermediate assistant.message events that echo tool input/output
  and only rendering the final summary message per turn.

* Address review: break circular dep & restore flush timing

- Inject CLI tool-event handlers (processStart/processComplete/
  enrichSubagent/isEditToolCall/getEditedUris) into the shared
  renderer via a ToolEventHandlers<T> bundle, so common/sessionEventRenderer
  no longer imports from copilotcli/. Layering now only flows one way.
- Flush buffered assistant.message_delta chunks at the top of the
  CLI loop for non-message events so the session.model_change /
  assistant.usage guards see streamed text exactly the way the
  pre-extraction code did.

* Missing lock changes

* Revert unintended copilot package manifest edits

* Revert unintended root package manifest edits

* remote package revert

* lock

---------

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-05-28 10:59:15 -07:00
Henning Dieterichs 6149246c90 update vscode diff 2026-05-28 15:28:35 +02:00
Lee Murray b528e0633f Update @vscode/codicons to version 0.0.46-14 and add cloudCompact icon (#318717)
feat: update @vscode/codicons to version 0.0.46-14 and add cloudCompact icon

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-05-28 18:24:53 +05:00
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
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