
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
@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 44,414 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.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.