Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"sync-versions": "node scripts/sync-versions.mjs",
"package:vscode": "npm run sync-versions && npm run package -w packages/vscode",
"publish:core": "npm run sync-versions && npm publish -w packages/core --access public",
"publish:cli": "npm run sync-versions && npm publish -w packages/cli --access public"
"publish:cli": "npm run sync-versions && npm publish -w packages/cli --access public",
"publish:vscode": "npm run sync-versions && npm run build:check -w packages/vscode && npx @vscode/vsce publish --no-dependencies --allow-all-proposed-apis",

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish:vscode script runs build:check but never runs the extension build (esbuild) before vsce publish. Since there is no vscode:prepublish hook in packages/vscode/package.json, this can publish without an up-to-date out/extension.js. Update the script to run npm run build -w packages/vscode (or reuse package:vscode) before publishing.

Suggested change
"publish:vscode": "npm run sync-versions && npm run build:check -w packages/vscode && npx @vscode/vsce publish --no-dependencies --allow-all-proposed-apis",
"publish:vscode": "npm run sync-versions && npm run build:check -w packages/vscode && npm run build:vscode && npx @vscode/vsce publish --no-dependencies --allow-all-proposed-apis",

Copilot uses AI. Check for mistakes.
"publish:all": "npm run sync-versions && npm test && npm publish -w packages/core --access public && npm publish -w packages/cli --access public && npm run publish:vscode",
"publish:dry": "npm run sync-versions && npm publish -w packages/core --access public --dry-run && npm publish -w packages/cli --access public --dry-run"
},
"devDependencies": {
"typescript": "^5.4.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @copilot-proxy/cli
# @hyorman/copilot-proxy-cli

OpenAI-compatible proxy server for GitHub Copilot. Use Copilot models through standard OpenAI API endpoints from any HTTP client.

Expand All @@ -8,7 +8,7 @@ OpenAI-compatible proxy server for GitHub Copilot. Use Copilot models through st

```bash
export GITHUB_TOKEN=ghp_...
npx @copilot-proxy/cli
npx @hyorman/copilot-proxy-cli
```

Test it:
Expand All @@ -24,13 +24,13 @@ curl http://localhost:3000/v1/chat/completions \
**Run without installing (recommended):**

```bash
npx @copilot-proxy/cli
npx @hyorman/copilot-proxy-cli
```

**Install globally:**

```bash
npm install -g @copilot-proxy/cli
npm install -g @hyorman/copilot-proxy-cli
copilot-proxy
```

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@copilot-proxy/cli",
"name": "@hyorman/copilot-proxy-cli",
"version": "1.0.0",
"description": "OpenAI-compatible proxy server for GitHub Copilot, powered by the Copilot SDK",
"type": "module",
Expand Down Expand Up @@ -34,7 +34,7 @@
"test:watch": "vitest"
},
"dependencies": {
"@copilot-proxy/core": "^1.0.0",
"@hyorman/copilot-proxy-core": "^1.0.0",
"@github/copilot-sdk": "^0.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
state as assistantsState,
skillsState,
setSkillStorageDir,
} from '@copilot-proxy/core';
} from '@hyorman/copilot-proxy-core';
import { SdkBackend } from './sdkBackend.js';

const PORT = parseInt(process.env.PORT ?? '3000', 10);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/sdkBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
ChatCompletionResponse,
ChatCompletionChunk,
generateId,
} from '@copilot-proxy/core';
} from '@hyorman/copilot-proxy-core';

type ToolCall = {
id: string;
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/test/sdkBackend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ vi.mock('@github/copilot-sdk', () => {
return { CopilotClient, approveAll: vi.fn() };
});

vi.mock('@copilot-proxy/core', async (importOriginal) => {
const original = await importOriginal<typeof import('@copilot-proxy/core')>();
vi.mock('@hyorman/copilot-proxy-core', async (importOriginal) => {
const original = await importOriginal<typeof import('@hyorman/copilot-proxy-core')>();
let counter = 0;
return {
...original,
Expand All @@ -23,12 +23,12 @@ vi.mock('@copilot-proxy/core', async (importOriginal) => {

import { SdkBackend, type SdkOptions } from '../src/sdkBackend.js';
import { CopilotClient } from '@github/copilot-sdk';
import { generateId } from '@copilot-proxy/core';
import { generateId } from '@hyorman/copilot-proxy-core';
import type {
ChatCompletionRequest,
ChatCompletionResponse,
ChatCompletionChunk,
} from '@copilot-proxy/core';
} from '@hyorman/copilot-proxy-core';

// --------------- Mock session factory ---------------

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@copilot-proxy/core",
"name": "@hyorman/copilot-proxy-core",
"version": "1.0.0",
"description": "Core shared library for Copilot Proxy",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @copilot-proxy/core
* @hyorman/copilot-proxy-core
*
* Shared platform-independent logic for the Copilot Proxy.
* Exports server factory, types, state management, assistants, and skills modules.
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"test": "vitest run"
},
"devDependencies": {
"@copilot-proxy/core": "*",
"@hyorman/copilot-proxy-core": "^1.0.0",
"@types/node": "^18.11.18",
"@types/vscode": "^1.95.0",
"esbuild": "^0.24.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
SerializedSkillsState,
setSkillStorageDir,
Logger,
} from '@copilot-proxy/core';
} from '@hyorman/copilot-proxy-core';
import { VSCodeBackend } from './vscodeBackend';

let outputChannel: vscode.OutputChannel;
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode/src/toolConvert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* VS Code-Specific Tool Conversion Utilities
*
* Converts between OpenAI tool formats and VS Code Language Model API tool types.
* Platform-independent conversions live in @copilot-proxy/core.
* Platform-independent conversions live in @hyorman/copilot-proxy-core.
*/

import * as vscode from 'vscode';
import { FunctionTool, ChatCompletionRequest, AssistantTool } from '@copilot-proxy/core';
import { FunctionTool, ChatCompletionRequest, AssistantTool } from '@hyorman/copilot-proxy-core';

/**
* Convert OpenAI FunctionTool[] to VS Code LanguageModelChatTool[]
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode/src/vscodeBackend.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* VS Code Chat Backend
*
* Implements the ChatBackend interface from @copilot-proxy/core using
* Implements the ChatBackend interface from @hyorman/copilot-proxy-core using
* VS Code's Language Model API. This is the platform-specific bridge
* that lets the shared server talk to VS Code's LLM providers.
*/
Expand All @@ -19,7 +19,7 @@ import {
StructuredMessageContent,
ToolCall,
ToolCallChunk,
} from '@copilot-proxy/core';
} from '@hyorman/copilot-proxy-core';
import { toVSCodeTools, toToolMode } from './toolConvert';

// Extended LanguageModelChat for optional id access
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/test/extension.models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ vi.mock('vscode', () => {
};
});

vi.mock('@copilot-proxy/core', () => ({
vi.mock('@hyorman/copilot-proxy-core', () => ({
createApp: vi.fn(),
setApiTokens: vi.fn(),
addApiToken: vi.fn(),
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OpenAI-compatible proxy server for GitHub Copilot. Use Copilot models through st
| **Backend** | `@github/copilot-sdk` | VS Code Language Model API |
| **Auth** | `GITHUB_TOKEN` env var | VS Code Copilot session |
| **Embeddings** | Not supported | Supported (proposed API) |
| **Install** | `npx @copilot-proxy/cli` | [`.vsix` package](https://github.com/hyorman/copilot-proxy/releases) |
| **Install** | `npx @hyorman/copilot-proxy-cli` | [`.vsix` package](https://github.com/hyorman/copilot-proxy/releases) |
| **Docs** | [CLI README](packages/cli/README.md) | [Extension README](packages/vscode/README.md) |

> This project is not affiliated with GitHub, Microsoft, or OpenAI. It is intended for research, experimentation, and local prototyping rather than production use.
Expand All @@ -23,7 +23,7 @@ This project was originally inspired by [`copilot-proxy`](https://github.com/lut

```bash
export GITHUB_TOKEN=ghp_...
npx @copilot-proxy/cli
npx @hyorman/copilot-proxy-cli
```

### VS Code Extension
Expand Down Expand Up @@ -252,8 +252,8 @@ curl -X POST http://localhost:3000/v1/assistants/asst_abc123 \

| Package | Path | Description |
|---|---|---|
| `@copilot-proxy/core` | `packages/core` | Shared server logic, OpenAI-compatible routes, types |
| `@copilot-proxy/cli` | `packages/cli` | CLI proxy server using `@github/copilot-sdk` |
| `@hyorman/copilot-proxy-core` | `packages/core` | Shared server logic, OpenAI-compatible routes, types |
| `@hyorman/copilot-proxy-cli` | `packages/cli` | CLI proxy server using `@github/copilot-sdk` |
| `copilot-proxy` | `packages/vscode` | VS Code extension |

### Build
Expand Down
Loading