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
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches: [master]

Copilot AI Aug 27, 2025

Copy link

Choose a reason for hiding this comment

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

The branch name 'master' is inconsistent with the deploy-pages.yml workflow which uses 'main'. This should be 'main' to match the actual default branch.

Suggested change
branches: [master]
branches: [main]

Copilot uses AI. Check for mistakes.
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run linter
run: bun run lint

- name: Run type check
run: bun run typecheck

- name: Run tests
run: bun test

- name: Build
run: bun run build
40 changes: 40 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ "main" ]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./pages

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- **Test all:**
`bun test`
- **Test single file:**
`bun test tests/claude-request.test.ts`- **Start (prod):**
`bun test tests/claude-request.test.ts`
- **Start (prod):**
`bun run start`

## Code Style Guidelines
Expand All @@ -35,7 +36,8 @@
- **Modules:**
Use ESNext modules, no CommonJS.
- **Testing:**
Use Bun’s built-in test runner. Place tests in `tests/`, name as `*.test.ts`.- **Linting:**
Use Bun's built-in test runner. Place tests in `tests/`, name as `*.test.ts`.
- **Linting:**
Uses `@echristian/eslint-config` (see npm for details). Includes stylistic, unused imports, regex, and package.json rules.
- **Paths:**
Use path aliases (`~/*`) for imports from `src/`.
Expand Down
472 changes: 169 additions & 303 deletions bun.lock

Large diffs are not rendered by default.

23 changes: 16 additions & 7 deletions opencode.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
{
"$schema": "https://opencode.ai/config.json",

"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"playwright": {
"type": "local",
"command": [
"docker",
"container",
"run",
"-i",
"--rm",
"--init",
"--network",
"host",
"mcr.microsoft.com/playwright/mcp"
],
"enabled": true
}
}
}
},
"$schema": "https://opencode.ai/config.json"
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "copilot-api",
"version": "0.5.12",
"version": "0.5.13",
"description": "Turn GitHub Copilot into OpenAI/Anthropic API compatible server. Usable with Claude Code!",
"keywords": [
"proxy",
Expand All @@ -22,7 +22,7 @@
"dist"
],
"scripts": {
"build": "tsup",
"build": "tsdown",
"dev": "bun run --watch ./src/main.ts",
"knip": "knip-bun",
"lint": "eslint . --cache",
Expand All @@ -44,20 +44,20 @@
"consola": "^3.4.2",
"fetch-event-stream": "^0.1.5",
"gpt-tokenizer": "^3.0.1",
"hono": "^4.9.0",
"hono": "^4.9.4",
"srvx": "^0.8.6",
"tiny-invariant": "^1.3.3"
},
"devDependencies": {
"@echristian/eslint-config": "^0.0.52",
"@types/bun": "^1.2.19",
"bumpp": "^10.2.2",
"eslint": "^9.33.0",
"knip": "^5.62.0",
"@echristian/eslint-config": "^0.0.53",
"@types/bun": "^1.2.21",
"bumpp": "^10.2.3",
"eslint": "^9.34.0",
"knip": "^5.63.0",
"lint-staged": "^16.1.5",
"prettier-plugin-packagejson": "^2.5.19",
"simple-git-hooks": "^2.13.1",
"tsup": "^8.5.0",
"tsdown": "^0.14.2",
"typescript": "^5.9.2"
}
}
Loading