@jeffreycao/copilot-api 2.5.7 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/README.zh-CN.md +5 -2
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -372,6 +372,9 @@ bun install
|
|
|
372
372
|
|
|
373
373
|
## Running from Source
|
|
374
374
|
|
|
375
|
+
> [!NOTE]
|
|
376
|
+
> Building from source with `tsdown@0.23` requires Node.js `^22.18.0 || ^24.11.0 || >=26.0.0`. This is a build-time requirement only; the published CLI supports Node.js >= 22.13.0.
|
|
377
|
+
|
|
375
378
|
The project can be run from source in several ways:
|
|
376
379
|
|
|
377
380
|
### Development Mode
|
|
@@ -393,7 +396,7 @@ bun run start start
|
|
|
393
396
|
You can run the project directly using npx:
|
|
394
397
|
|
|
395
398
|
> [!IMPORTANT]
|
|
396
|
-
> Token usage storage uses Node's built-in `node:sqlite` module when running with `npx`. It is enabled on Node.js >= 22.13.0
|
|
399
|
+
> Token usage storage uses Node's built-in `node:sqlite` module when running with `npx`. It is enabled on Node.js >= 22.13.0, the first release where `node:sqlite` works without `--experimental-sqlite`. On older Node.js versions the CLI still starts, but token usage storage is disabled.
|
|
397
400
|
>
|
|
398
401
|
> If you want token usage storage without upgrading Node.js, run the published CLI with Bun instead: `bunx --bun @jeffreycao/copilot-api@latest start`.
|
|
399
402
|
|
|
@@ -595,7 +598,7 @@ After starting the server, a URL to the Copilot Usage Dashboard will be displaye
|
|
|
595
598
|
|
|
596
599
|
The dashboard provides a user-friendly interface to view your Copilot usage data:
|
|
597
600
|
|
|
598
|
-
> Token usage history requires Bun or Node.js >= 22.13.0. Node.js
|
|
601
|
+
> Token usage history requires Bun or Node.js >= 22.13.0. On older Node.js versions the server runs normally but token usage storage is disabled.
|
|
599
602
|
|
|
600
603
|
- **API Endpoint URL**: The dashboard is pre-configured to fetch data from your local server endpoint via a URL query parameter. You can manually switch this to any other compatible API endpoint.
|
|
601
604
|
- **API Key Authentication**: If API Key authentication is enabled, enter a raw API key (sent as the `x-api-key` header) or `Authorization: Bearer <key>`. Credentials are remembered in the browser's local storage per endpoint origin, and switching to a different endpoint origin does not automatically send the previous credential.
|
package/README.zh-CN.md
CHANGED
|
@@ -398,6 +398,9 @@ bun install
|
|
|
398
398
|
|
|
399
399
|
## 从源码运行
|
|
400
400
|
|
|
401
|
+
> [!NOTE]
|
|
402
|
+
> 使用 `tsdown@0.23` 从源码构建时,需要 Node.js `^22.18.0 || ^24.11.0 || >=26.0.0`。这只是构建期要求;已发布 CLI 的运行时要求仍为 Node.js >= 22.13.0。
|
|
403
|
+
|
|
401
404
|
本项目可以通过多种方式从源码运行:
|
|
402
405
|
|
|
403
406
|
### 开发模式
|
|
@@ -421,7 +424,7 @@ bun run start start
|
|
|
421
424
|
你可以直接用 npx 运行本项目:
|
|
422
425
|
|
|
423
426
|
> [!IMPORTANT]
|
|
424
|
-
> 通过 `npx` 运行时,token usage 存储会使用 Node 内置的 `node:sqlite` 模块。该能力会在 Node.js >= 22.13.0
|
|
427
|
+
> 通过 `npx` 运行时,token usage 存储会使用 Node 内置的 `node:sqlite` 模块。该能力会在 Node.js >= 22.13.0(`node:sqlite` 不再需要 `--experimental-sqlite` 标志的首个版本)时启用;更早的 Node.js 上 CLI 仍可启动,但会禁用 token usage 存储。
|
|
425
428
|
>
|
|
426
429
|
> 如果不升级 Node.js 但仍需要 token usage 存储,可以改用 Bun 运行已发布 CLI:`bunx --bun @jeffreycao/copilot-api@latest start`。
|
|
427
430
|
|
|
@@ -633,7 +636,7 @@ cp plugin/opencode/subagent-marker.js ~/.config/opencode/plugins/
|
|
|
633
636
|
|
|
634
637
|
看板提供了更易读的 Copilot 用量视图:
|
|
635
638
|
|
|
636
|
-
> token usage 历史记录需要 Bun 或 Node.js >= 22.13.0
|
|
639
|
+
> token usage 历史记录需要 Bun 或 Node.js >= 22.13.0。更早的 Node.js 上服务会正常运行,但 token usage 存储会被禁用。
|
|
637
640
|
|
|
638
641
|
- **API Endpoint URL**:通过 URL 查询参数指定 API endpoints,默认指向本地服务。支持手动切换为其他兼容 endpoints。
|
|
639
642
|
- **API Key 认证**:如果启用了 API Key 认证,可填入原始 API key(默认通过 `x-api-key` 请求头发送)或 `Authorization: Bearer <key>`。凭据会按 endpoint origin 保存在浏览器本地存储中;切换到不同 endpoint origin 时,不会自动携带其他 origin 的凭据。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@jeffreycao/copilot-api",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.8",
|
|
5
5
|
"description": "GitHub Copilot, OpenAI Codex, OpenCode Go, and third-party AI provider gateway with OpenAI and Anthropic API compatibility.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"github-copilot",
|
|
@@ -90,8 +90,7 @@
|
|
|
90
90
|
"simple-git-hooks": "^2.13.1",
|
|
91
91
|
"tsdown": "^0.23.0",
|
|
92
92
|
"typescript": "^5.9.3",
|
|
93
|
-
"typescript-eslint": "^8.41.0"
|
|
94
|
-
"unrun": "^0.3.1"
|
|
93
|
+
"typescript-eslint": "^8.41.0"
|
|
95
94
|
},
|
|
96
95
|
"engines": {
|
|
97
96
|
"node": ">=22.13.0"
|