Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bd3b36b
Bump Copilot CLI packages to @github/copilot@1.0.64-1 and @github/cop…
anthonykim1 Jun 22, 2026
eb6576a
Resolve Agent Host Copilot CLI through @github/copilot/bin.copilot
anthonykim1 Jun 22, 2026
ab77c40
Materialize @github/copilot/sdk from @github/copilot-<platform> in ex…
anthonykim1 Jun 22, 2026
a7ef46c
Package @github/copilot-<platform>/copilot for Agent Host and linuxmusl
anthonykim1 Jun 22, 2026
b200a59
Exclude Copilot optional native payloads from extension package
anthonykim1 Jun 22, 2026
173a998
Scan @github/copilot-*/copilot for Linux package dependencies
anthonykim1 Jun 22, 2026
93a7fdc
Tighten Copilot SDK 1.0.64-1 attachment and RPC typings
anthonykim1 Jun 22, 2026
3a5f8d8
Increase Copilot SDK native binary scan test timeout
anthonykim1 Jun 22, 2026
7b42237
Update amd64 deb deps for @github/copilot-linux-x64/copilot
anthonykim1 Jun 22, 2026
8c61d6c
Update arm64 rpm deps for Copilot package layout
anthonykim1 Jun 22, 2026
a6b3301
Update x64 rpm deps for @github/copilot-linux-x64/copilot
anthonykim1 Jun 22, 2026
add1ff7
Try to fix windows smoke test
anthonykim1 Jun 23, 2026
3be2a3b
Merge branch 'main' into anthonykim1/updateCopilotCLI
anthonykim1 Jun 23, 2026
1b60705
Try to fix platform runtime files for agent host
anthonykim1 Jun 23, 2026
4f8b1ca
exclude copilot computer.node from agent host packaging
anthonykim1 Jun 23, 2026
7c36b5f
Another attempt to try to get packaging right
anthonykim1 Jun 23, 2026
0d13df6
Should only try to load 1.0.64-1
anthonykim1 Jun 23, 2026
a900039
Try to fix packaing for windows, macos, deb deps
anthonykim1 Jun 23, 2026
baab4b8
Update armhf/arm64 deb and x64 rpm Copilot dependency baselines
anthonykim1 Jun 23, 2026
3e37de2
Copilot darwin ripgrep universal merge and arm64 rpm deps
anthonykim1 Jun 23, 2026
6a0f68f
Restore target Copilot SDK prebuilds for built-in extension packaging
anthonykim1 Jun 23, 2026
cf74d3b
see if changes to gulpfile.reh.ts would help
anthonykim1 Jun 23, 2026
7be53b2
dont mess with formatting
anthonykim1 Jun 23, 2026
2c0a13e
Launch copilot cli from platform index.js and exclude SEA
anthonykim1 Jun 23, 2026
f9bdc05
Merge branch 'main' into anthonykim1/copilotcliBump2
anthonykim1 Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/darwin/create-universal-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async function main(buildDir?: string) {
outAppPath,
force: true,
mergeASARs: true,
x64ArchFiles: '{*/kerberos.node,**/extensions/microsoft-authentication/dist/libmsalruntime.dylib,**/extensions/microsoft-authentication/dist/msal-node-runtime.node,**/node_modules/@github/copilot-darwin-*/copilot,**/node_modules/@github/copilot/prebuilds/darwin-*/*,**/node_modules/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot-darwin-*/copilot,**/node_modules.asar.unpacked/@github/copilot/prebuilds/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/prebuilds/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/ripgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules/@vscode/ripgrep-universal/bin/darwin-*/*,**/node_modules.asar.unpacked/@vscode/ripgrep-universal/bin/darwin-*/*,**/node_modules/@microsoft/mxc-sdk/bin/**,**/node_modules.asar.unpacked/@microsoft/mxc-sdk/bin/**}',
x64ArchFiles: '{*/kerberos.node,**/extensions/microsoft-authentication/dist/libmsalruntime.dylib,**/extensions/microsoft-authentication/dist/msal-node-runtime.node,**/node_modules/@github/copilot-darwin-*/**,**/node_modules/@github/copilot/prebuilds/darwin-*/*,**/node_modules/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot-darwin-*/**,**/node_modules.asar.unpacked/@github/copilot/prebuilds/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/prebuilds/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/ripgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules/@vscode/ripgrep-universal/bin/darwin-*/*,**/node_modules.asar.unpacked/@vscode/ripgrep-universal/bin/darwin-*/*,**/node_modules/@microsoft/mxc-sdk/bin/**,**/node_modules.asar.unpacked/@microsoft/mxc-sdk/bin/**}',
filesToSkipComparison: (file: string) => {
for (const expected of filesToSkip) {
if (minimatch(file, expected)) {
Expand Down
3 changes: 2 additions & 1 deletion build/gulpfile.reh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import log from 'fancy-log';
import buildfile from './buildfile.ts';
import { fetchUrls } from './lib/fetch.ts';
import { downloadFeedPackage } from './lib/azureFeed.ts';
import { getCopilotExcludeFilter, getCopilotRuntimePrebuildFiles, getCopilotTgrepExcludeFilter, getRipgrepExcludeFilter, prepareBuiltInCopilotRipgrepShim } from './lib/copilot.ts';
import { ensureCopilotPlatformPackage, getCopilotExcludeFilter, getCopilotRuntimePrebuildFiles, getCopilotTgrepExcludeFilter, getRipgrepExcludeFilter, prepareBuiltInCopilotRipgrepShim } from './lib/copilot.ts';
import { readAgentSdkResults } from './agent-sdk/common.ts';


Expand Down Expand Up @@ -442,6 +442,7 @@ function packageTask(type: string, platform: string, arch: string, sourceFolderN
.pipe(filter(['**', '!**/package-lock.json', '!**/*.{js,css}.map']))
.pipe(util.cleanNodeModules(path.join(import.meta.dirname, '.moduleignore')))
.pipe(util.cleanNodeModules(path.join(import.meta.dirname, `.moduleignore.${process.platform}`)));
ensureCopilotPlatformPackage(platform, arch, 'remote/node_modules');
const copilotRuntimePrebuilds = gulp.src(getCopilotRuntimePrebuildFiles(platform, arch, 'remote/node_modules'), { base: 'remote', dot: true, allowEmpty: true });
const deps = es.merge(cleanedDeps, copilotRuntimePrebuilds)
.pipe(filter(getCopilotExcludeFilter(platform, arch)))
Expand Down
3 changes: 2 additions & 1 deletion build/gulpfile.vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import minimist from 'minimist';
import { compileBuildWithoutManglingTask, compileBuildWithManglingTask } from './gulpfile.compile.ts';
import { compileNonNativeExtensionsBuildTask, compileNativeExtensionsBuildTask, compileAllExtensionsBuildTask, compileExtensionMediaBuildTask, cleanExtensionsBuildTask, compileCopilotExtensionBuildTask } from './gulpfile.extensions.ts';
import { copyCodiconsTask } from './lib/compilation.ts';
import { getCopilotExcludeFilter, getCopilotRuntimePrebuildFiles, getCopilotTgrepExcludeFilter, getRipgrepExcludeFilter, prepareBuiltInCopilotRipgrepShim } from './lib/copilot.ts';
import { ensureCopilotPlatformPackage, getCopilotExcludeFilter, getCopilotRuntimePrebuildFiles, getCopilotTgrepExcludeFilter, getRipgrepExcludeFilter, prepareBuiltInCopilotRipgrepShim } from './lib/copilot.ts';
import { readAgentSdkResults } from './agent-sdk/common.ts';
import { useEsbuildTranspile } from './buildConfig.ts';
import { promisify } from 'util';
Expand Down Expand Up @@ -340,6 +340,7 @@ function packageTask(platform: string, arch: string, sourceFolderName: string, d
.pipe(filter(depFilterPattern))
.pipe(util.cleanNodeModules(path.join(import.meta.dirname, '.moduleignore')))
.pipe(util.cleanNodeModules(path.join(import.meta.dirname, `.moduleignore.${process.platform}`)));
ensureCopilotPlatformPackage(platform, arch);
const copilotRuntimePrebuilds = gulp.src(getCopilotRuntimePrebuildFiles(platform, arch), { base: '.', dot: true, allowEmpty: true });
const deps = es.merge(cleanedDeps, copilotRuntimePrebuilds)
.pipe(filter(getCopilotExcludeFilter(platform, arch)))
Expand Down
233 changes: 190 additions & 43 deletions build/lib/copilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
*--------------------------------------------------------------------------------------------*/

import * as fs from 'fs';
import { createHash } from 'crypto';
import { execFileSync } from 'child_process';
import * as os from 'os';
import * as path from 'path';
import { extract } from 'tar';

/**
* The platforms that @github/copilot ships platform-specific packages for.
Expand All @@ -13,6 +17,7 @@ import * as path from 'path';
export const copilotPlatforms = [
'darwin-arm64', 'darwin-x64',
'linux-arm64', 'linux-x64',
'linuxmusl-arm64', 'linuxmusl-x64',
'win32-arm64', 'win32-x64',
];

Expand Down Expand Up @@ -73,6 +78,38 @@ function toCopilotTgrepPlatformArch(platform: string, arch: string): string {
return `${nodePlatform}-${nodeArch}`;
}

function toCopilotPackagePlatformArch(platform: string, arch: string): string {
if (platform === 'alpine') {
return `linuxmusl-${arch}`;
}
if (arch === 'alpine') {
return 'linuxmusl-x64';
}

const { nodePlatform, nodeArch } = toNodePlatformArch(platform, arch);
return `${nodePlatform}-${nodeArch}`;
}

const copilotOptionalNativePayloadDirs = [
'clipboard',
'foundry-local-sdk',
'mxc-bin',
'pvrecorder',
];

function getCopilotOptionalNativePayloadFiles(platform: string): string[] {
const files = [
'prebuilds/*/computer.node',
'prebuilds/*/keytar.node',
];

if (platform !== 'win32') {
files.push('prebuilds/*/cli-native.node');
}

return files;
}

/**
* Returns a glob filter that strips @vscode/ripgrep-universal bin directories
* for architectures other than the build target.
Expand Down Expand Up @@ -102,14 +139,13 @@ export function getCopilotTgrepExcludeFilter(platform: string, arch: string): st
* Returns a glob filter that strips @github/copilot platform packages
* for architectures other than the build target.
*
* For platforms the copilot SDK doesn't natively support (e.g. alpine, armhf),
* ALL platform packages are stripped - that's fine because the copilot CLI SDK
* resolves `node-pty` from the embedder (VS Code) first via `hostRequire`,
* falling back to its bundled copy only if the embedder can't provide it.
* Alpine uses the linuxmusl-* packages. Other platform package names follow
* Node's `${process.platform}-${process.arch}` naming. If Copilot does not
* ship the computed platform package (for example linux-arm for armhf builds),
* this strips every known @github/copilot-* platform package.
*/
export function getCopilotExcludeFilter(platform: string, arch: string): string[] {
const { nodePlatform, nodeArch } = toNodePlatformArch(platform, arch);
const targetPlatformArch = `${nodePlatform}-${nodeArch}`;
const targetPlatformArch = toCopilotPackagePlatformArch(platform, arch);
const nonTargetPlatforms = copilotPlatforms.filter(p => p !== targetPlatformArch);

// Strip wrong-architecture @github/copilot-{platform} packages.
Expand All @@ -119,55 +155,121 @@ export function getCopilotExcludeFilter(platform: string, arch: string): string[
}

/**
* Returns the public @github/copilot-sdk runtime native addon files that must
* survive app/remote packaging for the target platform.
* Returns the public @github/copilot package files that must survive
* app/remote packaging for the target platform.
*
* .moduleignore strips @github/copilot/prebuilds/** globally because the
* internal extension SDK uses a copied sdk/prebuilds layout. Agent Host uses
* the public SDK, whose runtime addon loader expects runtime.node in the root
* prebuilds layout. The SDK's built-in shell tool additionally spawns commands
* through node-pty, whose native binaries live in the same root prebuilds
* layout, so those must be preserved too (otherwise the sandboxed shell fails
* with `Cannot find module './prebuilds/<platform>/pty.node'` — or conpty.node
* on Windows).
* .moduleignore strips all @github/copilot-* platform packages globally.
* Re-add the selected runtime package so Agent Host can launch its index.js
* entrypoint and load runtime prebuilds. Keep the standalone SEA executable
* and optional native payload trees out of the product build.
*/
export function getCopilotRuntimePrebuildFiles(platform: string, arch: string, nodeModulesRoot = 'node_modules'): string[] {
const { nodePlatform, nodeArch } = toNodePlatformArch(platform, arch);
const targetPlatformArch = `${nodePlatform}-${nodeArch}`;
const prebuildDir = path.posix.join(nodeModulesRoot, '@github', 'copilot', 'prebuilds', targetPlatformArch);
const copilotPackagePlatformArch = toCopilotPackagePlatformArch(platform, arch);
const copilotPlatformPackageDir = path.posix.join(nodeModulesRoot, '@github', `copilot-${copilotPackagePlatformArch}`);

const files = [
path.posix.join(prebuildDir, 'runtime.node'),
return [
path.posix.join(copilotPlatformPackageDir, '**'),
`!${path.posix.join(copilotPlatformPackageDir, 'copilot')}`,
`!${path.posix.join(copilotPlatformPackageDir, 'copilot.exe')}`,
...copilotOptionalNativePayloadDirs.map(dir => `!${path.posix.join(copilotPlatformPackageDir, dir, '**')}`),
...getCopilotOptionalNativePayloadFiles(platform).map(file => `!${path.posix.join(copilotPlatformPackageDir, file)}`),
];
}

// node-pty native binaries for the SDK's built-in shell tool. Windows uses
// ConPTY (conpty.node plus the conpty/ helpers); darwin/linux use pty.node,
// and darwin additionally ships the spawn-helper executable.
if (nodePlatform === 'win32') {
files.push(
path.posix.join(prebuildDir, 'conpty.node'),
path.posix.join(prebuildDir, 'conpty_console_list.node'),
path.posix.join(prebuildDir, 'conpty', 'OpenConsole.exe'),
path.posix.join(prebuildDir, 'conpty', 'conpty.dll'),
);
} else {
files.push(path.posix.join(prebuildDir, 'pty.node'));
if (nodePlatform === 'darwin') {
files.push(path.posix.join(prebuildDir, 'spawn-helper'));
}
interface NpmPackageLock {
packages?: Record<string, {
version?: string;
integrity?: string;
}>;
}

interface EnsureCopilotPlatformPackageOptions {
packPackage?: (packageName: string, version: string, tempDir: string) => string;
}

/**
* Ensures the selected @github/copilot-{platform} package is present before
* packaging. npm only installs the host-compatible optional dependency, but
* VS Code packaging can cross-build targets such as darwin-x64 on arm64 hosts.
*/
export function ensureCopilotPlatformPackage(platform: string, arch: string, nodeModulesRoot = 'node_modules', options: EnsureCopilotPlatformPackageOptions = {}): void {
const copilotPackagePlatformArch = toCopilotPackagePlatformArch(platform, arch);
if (!copilotPlatforms.includes(copilotPackagePlatformArch)) {
return;
}

return files;
const packageName = `@github/copilot-${copilotPackagePlatformArch}`;
const packageDir = path.join(nodeModulesRoot, '@github', `copilot-${copilotPackagePlatformArch}`);
if (fs.existsSync(packageDir)) {
return;
}

const lockFilePath = path.join(path.dirname(nodeModulesRoot), 'package-lock.json');
const lockPackageKey = path.posix.join('node_modules', '@github', `copilot-${copilotPackagePlatformArch}`);
const lockPackage = readNpmPackageLock(lockFilePath).packages?.[lockPackageKey];
if (!lockPackage?.version) {
throw new Error(`[ensureCopilotPlatformPackage] Missing ${lockPackageKey} in ${lockFilePath}. Run npm install to refresh the lockfile.`);
}

const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'vscode-copilot-platform-'));
try {
const tarballPath = (options.packPackage ?? packCopilotPlatformPackage)(packageName, lockPackage.version, tempDir);
verifyNpmIntegrity(tarballPath, lockPackage.integrity);

fs.mkdirSync(packageDir, { recursive: true });
extract({ file: tarballPath, cwd: packageDir, strip: 1, sync: true });
console.log(`[ensureCopilotPlatformPackage] Materialized ${packageName}@${lockPackage.version} in ${packageDir}`);
} catch (err) {
fs.rmSync(packageDir, { recursive: true, force: true });
throw new Error(`[ensureCopilotPlatformPackage] Failed to materialize ${packageName}@${lockPackage.version}: ${err instanceof Error ? err.message : String(err)}`);
} finally {
fs.rmSync(tempDir, { recursive: true, force: true });
}
}

function packCopilotPlatformPackage(packageName: string, version: string, tempDir: string): string {
execFileSync(process.platform === 'win32' ? 'npm.cmd' : 'npm', ['pack', `${packageName}@${version}`, '--pack-destination', tempDir, '--silent'], { stdio: 'pipe', shell: process.platform === 'win32' });

const tarball = fs.readdirSync(tempDir).find(name => name.endsWith('.tgz'));
if (!tarball) {
throw new Error(`npm pack did not produce a tarball in ${tempDir}`);
}

return path.join(tempDir, tarball);
}

function readNpmPackageLock(lockFilePath: string): NpmPackageLock {
try {
return JSON.parse(fs.readFileSync(lockFilePath, 'utf8'));
} catch (err) {
throw new Error(`[ensureCopilotPlatformPackage] Failed to read ${lockFilePath}: ${err instanceof Error ? err.message : String(err)}`);
}
}

function verifyNpmIntegrity(tarballPath: string, integrity: string | undefined): void {
if (!integrity) {
return;
}

const sha512Integrity = integrity.split(/\s+/).find(entry => entry.startsWith('sha512-'));
if (!sha512Integrity) {
return;
}

const expected = sha512Integrity.slice('sha512-'.length);
const actual = createHash('sha512').update(fs.readFileSync(tarballPath)).digest('base64');
if (actual !== expected) {
throw new Error(`integrity mismatch for ${tarballPath}`);
}
}

/**
* Materializes the copilot CLI ripgrep shim directly inside the built-in copilot extension.
* Materializes target-platform Copilot CLI SDK files directly inside the built-in copilot extension.
*
* This is used when copilot is shipped as a built-in extension so startup does
* not need to create the shim at runtime. The destination layout matches the
* runtime shim logic in the copilot extension:
* - ripgrep: node_modules/@github/copilot/sdk/ripgrep/bin/{platform-arch}
* - marker: node_modules/@github/copilot/shims.txt
* not need to create the shim at runtime. The Copilot VSIX is built once on the
* Linux x64 host, so product packaging also restores target-platform SDK
* natives from the selected @github/copilot-{platform} package.
*
* Note: `node-pty` is no longer shimmed. The copilot CLI SDK resolves
* `node-pty` from the embedder (VS Code) via `hostRequire` and falls back to
Expand All @@ -179,6 +281,7 @@ export function getCopilotRuntimePrebuildFiles(platform: string, arch: string, n
export function prepareBuiltInCopilotRipgrepShim(platform: string, arch: string, builtInCopilotExtensionDir: string, appNodeModulesDir: string): void {
const { nodePlatform, nodeArch } = toNodePlatformArch(platform, arch);
const platformArch = `${nodePlatform}-${nodeArch}`;
const copilotPackagePlatformArch = toCopilotPackagePlatformArch(platform, arch);
const tgrepPlatformArch = toCopilotTgrepPlatformArch(platform, arch);

const extensionNodeModules = path.join(builtInCopilotExtensionDir, 'node_modules');
Expand All @@ -187,7 +290,8 @@ export function prepareBuiltInCopilotRipgrepShim(platform: string, arch: string,
if (!fs.existsSync(copilotSdkBase)) {
throw new Error(`[prepareBuiltInCopilotRipgrepShim] Copilot SDK directory not found at ${copilotSdkBase}`);
}
pruneNonTargetCopilotSdkPrebuilds(platformArch, path.join(copilotSdkBase, 'prebuilds'), copilotPlatforms);
materializeBuiltInCopilotSdkPlatformFiles(copilotPackagePlatformArch, tgrepPlatformArch, copilotBase, appNodeModulesDir);
pruneNonTargetCopilotSdkPrebuilds(copilotPackagePlatformArch, path.join(copilotSdkBase, 'prebuilds'), copilotPlatforms);
pruneNonTargetCopilotSdkPrebuilds(tgrepPlatformArch, path.join(copilotSdkBase, path.join('tgrep', 'bin')), copilotTgrepPlatforms);
pruneNonTargetCopilotSdkPrebuilds(tgrepPlatformArch, path.join(copilotBase, path.join('tgrep', 'bin')), copilotTgrepPlatforms);

Expand Down Expand Up @@ -219,6 +323,49 @@ export function prepareBuiltInCopilotRipgrepShim(platform: string, arch: string,
}
}

function materializeBuiltInCopilotSdkPlatformFiles(copilotPackagePlatformArch: string, tgrepPlatformArch: string, copilotBase: string, appNodeModulesDir: string): void {
if (!copilotPlatforms.includes(copilotPackagePlatformArch)) {
return;
}

const platformPackageDir = path.join(appNodeModulesDir, '@github', `copilot-${copilotPackagePlatformArch}`);
if (!fs.existsSync(platformPackageDir)) {
throw new Error(`[prepareBuiltInCopilotRipgrepShim] Copilot platform package not found at ${platformPackageDir}`);
}

copyRequiredDirectory(
path.join(platformPackageDir, 'prebuilds', copilotPackagePlatformArch),
path.join(copilotBase, 'sdk', 'prebuilds', copilotPackagePlatformArch),
`Copilot SDK native prebuilds for ${copilotPackagePlatformArch}`
);

if (!copilotTgrepPlatforms.includes(tgrepPlatformArch)) {
return;
}

const tgrepSource = path.join(platformPackageDir, 'tgrep', 'bin', tgrepPlatformArch);
copyRequiredDirectory(
tgrepSource,
path.join(copilotBase, 'tgrep', 'bin', tgrepPlatformArch),
`Copilot tgrep for ${tgrepPlatformArch}`
);
copyRequiredDirectory(
tgrepSource,
path.join(copilotBase, 'sdk', 'tgrep', 'bin', tgrepPlatformArch),
`Copilot SDK tgrep for ${tgrepPlatformArch}`
);
}

function copyRequiredDirectory(source: string, target: string, description: string): void {
if (!fs.existsSync(source)) {
throw new Error(`[prepareBuiltInCopilotRipgrepShim] ${description} not found at ${source}`);
}

fs.rmSync(target, { recursive: true, force: true });
fs.mkdirSync(path.dirname(target), { recursive: true });
fs.cpSync(source, target, { recursive: true });
}

function pruneNonTargetCopilotSdkPrebuilds(targetPlatformArch: string, prebuildsDir: string, platformArchs: string[]): void {
if (!fs.existsSync(prebuildsDir)) {
return;
Expand Down
Loading
Loading