mirror of
https://github.com/larsbaunwall/vscode-copilot-bridge.git
synced 2025-10-05 22:22:59 +00:00
- Implements VS Code extension per AGENTS.md specification
- OpenAI-style HTTP facade: POST /v1/chat/completions (SSE), GET /v1/models, GET /healthz
- JSON-RPC WebSocket server with methods: mcp.fs.read/list, mcp.search.code, mcp.symbols.list, mcp.edit.applyPatch, mcp.format.apply, mcp.imports.organize
- Copilot Chat integration via vscode.chat.requestChatAccess('copilot')
- Commands: bridge.enable/disable/status with status bar indicator
- Security: localhost-only binding, optional bearer token, read-only by default
- Policy enforcement via optional .agent-policy.yaml
- Ephemeral port management with globalState persistence
Co-Authored-By: Lars Baunwall <larslb@thinkability.dk>
92 lines
2.4 KiB
JSON
92 lines
2.4 KiB
JSON
{
|
|
"name": "copilot-bridge",
|
|
"displayName": "Copilot Bridge (OpenAI Facade + JSON-RPC)",
|
|
"description": "Bridge Copilot Chat to an OpenAI-style API and expose JSON-RPC tools inside VS Code Desktop",
|
|
"version": "0.1.0",
|
|
"publisher": "larsbaunwall",
|
|
"engines": {
|
|
"vscode": "^1.86.0"
|
|
},
|
|
"categories": [
|
|
"Other"
|
|
],
|
|
"activationEvents": [
|
|
"onStartupFinished",
|
|
"onCommand:bridge.enable",
|
|
"onCommand:bridge.disable",
|
|
"onCommand:bridge.status"
|
|
],
|
|
"main": "./dist/extension.js",
|
|
"contributes": {
|
|
"commands": [
|
|
{
|
|
"command": "bridge.enable",
|
|
"title": "Copilot Bridge: Enable"
|
|
},
|
|
{
|
|
"command": "bridge.disable",
|
|
"title": "Copilot Bridge: Disable"
|
|
},
|
|
{
|
|
"command": "bridge.status",
|
|
"title": "Copilot Bridge: Status"
|
|
}
|
|
],
|
|
"configuration": {
|
|
"title": "Copilot Bridge",
|
|
"properties": {
|
|
"bridge.enabled": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Start servers on activation"
|
|
},
|
|
"bridge.bindAddress": {
|
|
"type": "string",
|
|
"default": "127.0.0.1",
|
|
"description": "Bind address for HTTP and WebSocket servers"
|
|
},
|
|
"bridge.openai.port": {
|
|
"type": "number",
|
|
"default": 0,
|
|
"description": "Port for OpenAI HTTP facade (0 = pick random free port)"
|
|
},
|
|
"bridge.rpc.port": {
|
|
"type": "number",
|
|
"default": 0,
|
|
"description": "Port for JSON-RPC WebSocket server (0 = pick random free port)"
|
|
},
|
|
"bridge.token": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Optional bearer token for HTTP and WS auth"
|
|
},
|
|
"bridge.readOnly": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Reject write operations by default"
|
|
},
|
|
"bridge.history.maxTurns": {
|
|
"type": "number",
|
|
"default": 3,
|
|
"description": "Max dialog turns to include in prompt"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"compile": "tsc -p .",
|
|
"watch": "tsc -w -p .",
|
|
"lint": "tsc -p . --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"minimatch": "^9.0.4",
|
|
"ws": "^8.17.0",
|
|
"yaml": "^2.5.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.12.0",
|
|
"@types/vscode": "^1.86.0",
|
|
"@types/ws": "^8.5.10",
|
|
"typescript": "^5.5.0"
|
|
}
|
|
}
|