Include statically named dynamic imports in the remote Agent Host dependency graph while excluding exact dev-only and test-only imports.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix remote Agent Host dependencies
Include fs-copyfile in REH packages and verify that startup imports are declared in the remote manifest.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Smoke test packaged remote Agent Host
Launch the packaged Agent Host with its bundled Node after native REH builds and require it to bind a WebSocket listener.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Support platform-specific built-in extensions from GitHub releases
Adds support for downloading platform-specific built-in extension VSIXs
from GitHub releases, keyed by marketplace target platform. Also downloads
the latest pre-release assets for insiders builds, ignoring the pinned
version and checksum.
- extensionTarget.ts: resolve build target + release asset name
- builtInExtensions.ts: platformSpecific checksum map + insiders detection
- extensions.ts/fetch.ts: fromGithub asset selection + prerelease support
- CI: platform-aware cache key and target env plumbing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Insiders downloads the latest release instead of latest pre-release
Insiders builds should always be on the newest published release, so the
GitHub download now resolves the most recently published release (including
pre-releases) rather than filtering to pre-releases only.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address code review feedback for platform-specific extensions
- Sort latest releases by published_at instead of created_at
- Log a warning when skipping checksum validation in latest mode
- Document that platform-specific extensions always download from GitHub
- Skip gracefully on unsupported platforms; keep a clear error for a
known target missing from the platformSpecific map
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address CCR feedback: restrict targets and harden helpers
- Restrict getExtensionTarget to the supported marketplace targets, returning
undefined for unsupported OS/arch (e.g. win32-ia32, linux-riscv64) so callers
skip gracefully instead of failing with a missing-asset error
- Remove the bogus ia32 -> x86 mapping (no win32-x86 target exists)
- Validate the target format in getPlatformSpecificAssetName and throw a clear
error for malformed targets
- Guard the latest-release sort against NaN timestamps (missing published_at
sorts to the end deterministically)
- Update tests accordingly
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Align asset naming with VS Code convention and support product.overrides.json
The platform-specific extension this feature targets (typescript-go's
TypeScriptTeam.native-preview) publishes VSIX assets named
<name>-<target>.vsix using the raw marketplace target platform, not the
node-vsce-sign osx/win/arm aliasing. Update getPlatformSpecificAssetName to
the standard <name>-<target>.vsix convention and validate against the
supported target set.
- fetch.ts: in latest mode, select the newest published release that actually
contains the requested asset, so releases shipping only other artifacts
(e.g. tarballs) without a matching VSIX are skipped
- builtInExtensions.ts: merge product.overrides.json (gitignored, local) so
overridden built-in extensions are downloaded, mirroring bootstrap-meta
- Update tests for the new naming convention
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Detect extensions project by path segment, not substring
ESBuildTranspiler decided CJS vs ESM output via configFilePath.includes('extensions').
When the repo is checked out (e.g. as a git worktree) into a folder whose name
merely contains the substring 'extensions', the 'src' project was wrongly treated
as an extension and transpiled to CJS, breaking top-level await in src/cli.ts,
src/server-cli.ts and src/server-main.ts. Match an 'extensions' path segment instead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove product.overrides.json support from built-in extensions download
Revert the download script to read product.json directly, per review feedback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Revert "fix: builtin resolution of electron modules via asar hook (#324861)"
This reverts commit 5928613aa1.
* Revert "fix: restrict asar esm hook resolution to app resources (#324851)"
This reverts commit 89bc3825bd.
* Revert "feat: restore asar for node_modules (#324084)"
This reverts commit c9dda3b36a.
* feat: restore node_modules bundled into asar
* fix: store node_modules at top level inside asar archive
* Revert "fix: store node_modules at top level inside asar archive"
This reverts commit 4747aa5e375cc1fe49b8eb510dd1acec1fd6a581.
* fix: pack node_modules into asar
* fix: read copilot/ripgrep natives from node_modules.asar.unpacked
* fix: load node-context modules and native binaries from ASAR
- bootstrap-esm: resolve bare specifiers via package self-reference so
Node applies the package's real `exports`/`main` and ESM conditions.
The previous CommonJS `require.resolve()` picked the `require`
condition and loaded the CJS entry of dual CJS/ESM packages (e.g.
playwright-core), which did not expose their named ESM exports.
- amdX: in `_nodeJSLoadScript`, read module files with the ASAR-aware
`require('fs')` instead of `import('fs')`, which the resolution hook
maps to the ASAR-unaware `original-fs` and therefore cannot read
files inside the archive (e.g. @vscode/iconv-lite-umd).
- agentHost commandAutoApprover: load the tree-sitter `.wasm` files
from node_modules.asar.unpacked in built apps (node_modules in dev).
- agentHost copilotAgent: resolve the @github/copilot-<platform> CLI
and the @microsoft/mxc-sdk sandbox binaries from
node_modules.asar.unpacked in built apps, and unpack
@microsoft/mxc-sdk/bin so those executables can be spawned.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: resolve ASAR modules relative to the archive root
Two follow-up fixes for ASAR support:
- bootstrap-esm: resolve packages inside node_modules.asar with relative
specifiers (require.resolve("./<pkg>/package.json") and "./<spec>")
instead of bare specifiers. The archive directory is named
node_modules.asar, so a bare-specifier resolution walks for a
node_modules directory that does not exist and fails. This broke every
native module imported from main.js in the packaged app
(@vscode/spdlog, @vscode/sqlite3, native-keymap, @vscode/deviceid,
@vscode/policy-watcher), preventing startup.
- create-universal-app: pass `singleArchFiles` so the universal merger
allows files that are unique to a single arch inside the merged
node_modules.asar (the @github/copilot-<arch> platform package and the
arch-specific copilot/ripgrep binaries). These paths are ASAR-internal
(top level, no node_modules prefix); without the allowlist the merge
aborts with "Detected unique file ... not covered by allowList rule".
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: resolve sandbox runtime and Windows CJS lookups with ASAR
* fix: resolve ESM modules from the importer's own node_modules
* fix: unpack node-pty package.json
* fix: resolve node-pty binaries from unpacked asar in Copilot shim
* fix: resolve Copilot native binaries from node_modules.asar.unpacked
* fix: universal build for mxc
* fix: load tree-sitter wasm from node_modules on web
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Bump Copilot CLI packages to @github/copilot@1.0.64-1 and @github/copilot-sdk@1.0.3
* Resolve Agent Host Copilot CLI through @github/copilot/bin.copilot
* Materialize @github/copilot/sdk from @github/copilot-<platform> in extension postinstall
* Package @github/copilot-<platform>/copilot for Agent Host and linuxmusl
* Exclude Copilot optional native payloads from extension package
* Scan @github/copilot-*/copilot for Linux package dependencies
* Tighten Copilot SDK 1.0.64-1 attachment and RPC typings
* Increase Copilot SDK native binary scan test timeout
* Update amd64 deb deps for @github/copilot-linux-x64/copilot
* Update arm64 rpm deps for Copilot package layout
* Update x64 rpm deps for @github/copilot-linux-x64/copilot
* Try to fix windows smoke test
* Try to fix platform runtime files for agent host
* exclude copilot computer.node from agent host packaging
* Another attempt to try to get packaging right
* Should only try to load 1.0.64-1
* Try to fix packaing for windows, macos, deb deps
* Update armhf/arm64 deb and x64 rpm Copilot dependency baselines
* Copilot darwin ripgrep universal merge and arm64 rpm deps
* Restore target Copilot SDK prebuilds for built-in extension packaging
* see if changes to gulpfile.reh.ts would help
* dont mess with formatting
* Launch copilot cli from platform index.js and exclude SEA
* policy: escape XML special characters in ADML/profile output (#320551)
Policy descriptions containing angle brackets (e.g. `<plugin>@<marketplace>`,
`<url>`) produced invalid XML in generated ADML and macOS profile files,
causing Intune and Active Directory upload failures.
Add `escapeXml` helper that escapes `&`, `<`, and `>` in text content
and apply it in `renderADMLString` and `renderProfileString`. Add unit
tests for the escaper and an E2E regression test with angle-bracket
descriptions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* policy: replace angle brackets with curly braces in plugin description placeholders (#320551)
The policy descriptions for ChatEnabledPlugins and ChatExtraMarketplaces
used `<plugin>`, `<marketplace>`, and `<url>` as placeholder tokens.
These are not HTML/XML tags — replace with `{plugin}`, `{marketplace}`,
and `{url}` to avoid ambiguity and eliminate the source of the invalid
XML that was fixed in the previous commit.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* address PR review: remove useless backtick escapes, clarify test name
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add policyData.jsonc validation test and update add-policy skill
- Add test that parses the checked-in policyData.jsonc through parsePolicies()
to catch missing/mismatched enumDescriptions on string enum policies
- Update add-policy skill to document that enumDescriptions is required for
string enum policies
* Update build/lib/test/policyConversion.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Run our build scripts directly as typescript #277567
Follow up on #276864
For #277526
* Remove a few more ts-node references
* Fix linux and script reference
* Remove `_build-script` ref
* Fix script missing closing quote
* use type only import
* Fix export
* Make sure to run copy-policy-dto
* Make sure we run the copy-policy-dto script
* Enable `verbatimModuleSyntax`
* Pipelines fixes
* Try adding explicit ext to path
* Fix bad edit
* Revert extra `--`
---------
Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
* remove dead code from Transifex
* use @vscode/l10n-dev for XLF operations for extensions
* generated files
* more generated files
* remove dead code
* move l10n-dev to where gulp is
* generated
Upgrades our build scripts to target ES2017 since they are run on modern versions of node
This allows us to remove shims for es6 features such as `Object.assign`, and also remove a few extra typings packages
* Ensure that settings search build id handling fail will cause the build to fail
* Move some settings search build ID computation to util.ts
* Bump version number for test
* Add unit tests for util.ts additions
* Revert version number change
* Make versionStringToNumber throw if it fails
* Add missing import