
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@vscode/copilot-api
Advanced tools
A module used for interacting with the GitHub Copilot API.
With npm:
npm install @vscode/copilot-api
With yarn:
yarn add @vscode/copilot-api
import { CAPIClient, RequestType } from '@vscode/copilot-api';
// Create a new client instance
const client = new CAPIClient(editorDetails, license, optionalFetcherService);
// Update domains (if needed)
const domainChanges = client.updateDomains(copilotToken, enterpriseUrlConfig);
// Make requests
const response = await client.makeRequest(fetchOptions, RequestType.ChatCompletions);
RequestType.CopilotToken - Get Copilot tokenRequestType.ChatCompletions - Chat completionsRequestType.RemoteAgent - Remote agent requestsRequestType.Embeddings - EmbeddingsRequestType.Models - Available modelsRequestType.Chunks - Code chunksRequestType.EmbeddingsCodeSearch - Embeddings code searchRequestType.ListSkills - List available skillsRequestType.SearchSkill - Search skillsRequestType.ContentExclusion - Content exclusionRequestType.Telemetry - TelemetryRequestType.CopilotUserInfo - User infoRequestType.OriginTracker - Origin trackingThe package is built using esbuild to create a single platform-neutral ESM module that works in both Node.js and web environments:
# Build for production (minified)
npm run build
# Build for development (unminified)
npm run build:dev
# Clean build artifacts
npm run clean
dist/index.js - Platform-neutral ESM builddist/index.d.ts - TypeScript declarationsThe package is configured with a simplified ESM export structure:
{
"exports": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
This project uses Vitest for testing. Run tests with:
# Run tests once
npm test
# Run tests in watch mode
npm run test:watch
FAQs
A module used for interacting with the GitHub Copilot API.
The npm package @vscode/copilot-api receives a total of 169,409 weekly downloads. As such, @vscode/copilot-api popularity was classified as popular.
We found that @vscode/copilot-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.