Skip to content
Closed
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Agent2API 把多家 AI 桌面客户端里已登录的账号接到一起,共用
| Command Code | ✓ | ✗ | ✓ | — | — | — |
| Antigravity(Google,Gemini / Claude / GPT-OSS) | ✓ | ✓ | ✓ | — | — | — |
| OfficeAce(华为云果办 / OfficeClaw) | ✓ | ✓ | ✓ | ✓ | ✓ | — |
| ModelScope(魔搭,国内版 / 国际版) | ✓ | ✗ 令牌长期有效 | ✓ 仅远程 | ✓ 魔粒余额 | ✓ 每日魔粒(调登录接口即触发) | — |
| OrcaTerm(腾讯云遨驰终端) | ✓ | ✓ | ✓ | ✓ | — | — |
| 智谱清言 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 自定义提供商 | ✓ | — | ✓ | — | — | — |
Expand Down Expand Up @@ -224,6 +225,8 @@ services:

### 签到中心

后台任务统一在这一页(开关 / 间隔 / 上次结果 / 立即执行);清单存在 `~/.agent2api/config.json` 的 `scheduledTasks`,改动即时生效。

![签到中心页:签到总览与每日签到分组](./assets/screenshots/checkin-center.png)

## 🔧 开发与构建
Expand Down Expand Up @@ -252,7 +255,7 @@ macOS 的 `.dmg` **只能在 macOS 上构建**(`npm --prefix desktop-tauri run

### 仅供学习与交流

本项目是一个用于学习 HTTP 反向代理、SSE 流式透传、多上游协议适配与桌面端打包(Tauri)等技术主题的实践项目,**仅供个人学习与研究使用**。它不是官方产品,与腾讯公司及 WorkBuddy / CodeBuddy、美团及 CatPaw、商汤及小浣熊、智谱及 AutoClaw / autoglm、阿里巴巴及 Qoder / Accio、华为云及 CodeArts / OfficeAce、字节跳动及 Trae、科大讯飞及 Loomy、百度文库及 KukuAI、长亭科技及 MonkeyCode、Command Code、Google 及 Antigravity 均无任何关联,未获得其授权、认可或赞助。
本项目是一个用于学习 HTTP 反向代理、SSE 流式透传、多上游协议适配与桌面端打包(Tauri)等技术主题的实践项目,**仅供个人学习与研究使用**。它不是官方产品,与腾讯公司及 WorkBuddy / CodeBuddy、美团及 CatPaw、商汤及小浣熊、智谱及 AutoClaw / autoglm、阿里巴巴及 Qoder / Accio、华为云及 CodeArts / OfficeAce、字节跳动及 Trae、科大讯飞及 Loomy、百度文库及 KukuAI、长亭科技及 MonkeyCode、Command Code、Google 及 Antigravity、阿里巴巴及 ModelScope(魔搭)均无任何关联,未获得其授权、认可或赞助。

### 关于反向代理行为

Expand Down
8 changes: 8 additions & 0 deletions desktop-tauri/i18n/i18n-src/en/add-account.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
"Command Code": "Command Code",
"JWT(三段点分;也可直接粘贴 Bearer 整行或 data.bin 内容)": "JWT (three dot-separated parts; you can also paste a whole Bearer line or the data.bin content)",
"JWT(三段点分;也可直接粘贴 chatglm_token=… 整行)": "JWT (three dot-separated parts; a whole chatglm_token=… line works too)",
"ModelScope 国内版": "",
"ModelScope 国际版": "",
"MonkeyCode": "MonkeyCode",
"MonkeyCode 国际版": "MonkeyCode International edition",
"NVIDIA NIM 托管端点,Key 在 integrate.api.nvidia.com 申请": "NVIDIA NIM managed endpoint; apply for the Key at integrate.api.nvidia.com",
"OfficeAce 果办": "OfficeAce",
"accessToken 是 Accio 的登录凭证(一长串不透明 token,不是 JWT);refreshToken 可选,填了之后到期能自动续期。请填写 <b>{label}</b>账号的凭证 —— {siteNote}(最容易拿到的办法:直接用上方的「网页登录」,不需要手工找 token。)": "accessToken is Accio's login credential (a long opaque token, not a JWT); refreshToken is optional and enables automatic renewal on expiry. Enter the credential of the <b>{label}</b> account — {siteNote} (the easiest way to get it: just use \"Web login\" above; no need to hunt for the token manually.)",
"accessToken 是 Trae 的 <code>Cloud-IDE-JWT</code>(三段点分),refreshToken 用于到期自动续期(本家 <b>refreshToken 一次一换</b>:换发一次旧的即作废,所以两份程序别同时刷同一个账号)。<br>手工粘贴时请连 <b>machineId / deviceId</b> 一起填:上游把它们与登录时上传的设备公钥绑在一起判设备,凭空换一对会撞 <code>2xxxx</code> 那族设备绑定拒绝。<br>没有这三样时的正路是用上方的「网页登录」;容器 / 远程部署形态按提示粘贴地址栏回调地址即可。": "accessToken is Trae's <code>Cloud-IDE-JWT</code> (three dot-separated segments), and refreshToken enables automatic renewal on expiry (this provider <b>rotates refreshToken on every use</b>: once exchanged, the old one is void, so do not refresh the same account from two programs at once).<br>When pasting manually, fill in <b>machineId / deviceId</b> as well: upstream ties them to the device public key uploaded at sign-in to identify the device, and swapping in a new pair from nowhere triggers the <code>2xxxx</code> family of device-binding rejections.<br>Without these three, the proper route is \"Web login\" above; for container / remote deployments, paste the callback URL from the address bar as prompted.",
"monkeycode_ai_session 的值(也可直接粘贴整段 Cookie)": "The value of monkeycode_ai_session (you can also paste the whole Cookie)",
"ms- 开头的 API 令牌": "API token starting with ms-",
"refreshToken 可选,填了到期可自动续期;两者都能从<a href=\"#\" class=\"raccoon-hint-link\" data-raccoon-hint>小浣熊客户端登录态文件</a>里取到。": "refreshToken is optional and enables automatic renewal on expiry; both can be obtained from the <a href=\"#\" class=\"raccoon-hint-link\" data-raccoon-hint>Raccoon client login-state file</a>.",
"refreshToken 可选,填了可自动续期;两者都能从客户端登录态文件取到。同一个 Cline 账号两个池都能用,这里归入 {label}。": "refreshToken is optional and enables automatic renewal; both can be obtained from the client login-state file. The same Cline account works in both pools; here it is grouped under {label}.",
"token 支持 enc: 前缀(Windows 上自动解密)。未填 refreshToken 无法自动续期。": "token supports the enc: prefix (decrypted automatically on Windows). Without a refreshToken, automatic renewal is not possible.",
Expand Down Expand Up @@ -102,6 +105,7 @@
"可选,留空使用账号昵称或邮箱": "Optional; defaults to the account nickname or email",
"可选,留空则用 key 尾号": "Optional; defaults to the key suffix",
"可选,留空则用 userId": "Optional; defaults to userId",
"可选,留空则用上游账号昵称": "Optional; if left blank, the upstream account's nickname is used",
"可选,留空则用上游返回的账号名或账号 id": "Optional; defaults to the account name or account id returned by upstream",
"可选,留空则用凭证里的账号名": "Optional; defaults to the account name in the credential",
"可选,留空则用文件里的昵称": "Optional; leave empty to use the nickname from the file",
Expand Down Expand Up @@ -293,11 +297,13 @@
"等待登录完成…": "Waiting for sign-in…",
"等待网页登录…": "Waiting for web login…",
"粘贴 API Key": "Paste API Key",
"粘贴 API 令牌": "Paste API token",
"粘贴 Accio 的 accessToken": "Paste the Accio accessToken",
"粘贴 Antigravity 的 Google refresh token(以 <code>1//</code> 开头;直接粘贴含 <code>refresh_token=</code> 的整行也行)。<br>这是网页登录之外的手工入口(例如从已登录的官方 IDE 里导出)。refresh token 不会过期,access token 到期由网关自动续期;令牌丢了只能重新走 Google 授权,请妥善保存。": "Paste Antigravity's Google refresh token (starts with <code>1//</code>; pasting the whole line containing <code>refresh_token=</code> also works).<br>This is a manual entry besides web login (for example, exported from the official IDE you are already signed in to). The refresh token does not expire, and the gateway renews the access token automatically when it expires; if the token is lost, you can only go through Google authorization again, so keep it safe.",
"粘贴 Command Code 的 API Key(user_ 开头;从官方 CLI 的 ~/.commandcode/auth.json 或网页 studio 获取)。整行 / 带引号 / 带 Bearer 前缀地粘都行,网关会自己剥成裸 key。key 不过期、也没有续期接口,失效后重新获取即可;添加时网关会做一次轻量探活,失败不影响添加。": "Paste the Command Code API Key (starts with user_; get it from the official CLI's ~/.commandcode/auth.json or the web studio). Pasting the whole line / with quotes / with the Bearer prefix all work; the gateway strips it down to the bare key itself. The key does not expire and there is no renewal API, so if it stops working just get a new one. When adding, the gateway runs a lightweight liveness check; a failure does not affect adding.",
"粘贴 Cookie": "Paste Cookie",
"粘贴 Google refresh token": "Paste Google refresh token",
"粘贴 ModelScope 的 API 令牌(<code>ms-</code> 开头,在 {site} 的「访问令牌」页获取)。<br>{siteNote}<br>这枚令牌<b>两用</b>:网关既用它调推理,也用它读账号身份、魔粒余额与每日签到。令牌长期有效、没有续期接口,失效后重新获取再粘一次即可。": "",
"粘贴 OrcaTerm 的 OAuth accessToken(JWT,三段点分;从桌面客户端 <code>data.bin</code> 或 Web 版 Cookie <code>ot_session</code> 获取)。直接粘贴含 <code>Bearer</code> / <code>ot_session=</code> 的整行也行,网关会自己剥成裸 token。添加后由网关自动续期(上游有续期接口),无需跟随 2 小时时效手动更换。": "Paste OrcaTerm's OAuth accessToken (a JWT with three dot-separated parts; available from the desktop client's <code>data.bin</code> or the web version's <code>ot_session</code> cookie). Pasting a whole line containing <code>Bearer</code> / <code>ot_session=</code> is fine too — the gateway strips it down to the bare token. After adding, the gateway renews it automatically (the upstream has a renewal API), so you do not need to follow the 2-hour expiry by hand.",
"粘贴 Qoder 个人访问令牌(pt-…)": "Paste the Qoder personal access token (pt-…)",
"粘贴 accessToken": "Paste accessToken",
Expand Down Expand Up @@ -369,7 +375,9 @@
"这一家当前不支持网页登录,请改用填写凭证": "This provider does not support web login right now; use Enter credentials instead",
"这个账号当前没有可自动领的活动(只自动领每日登录赠送积分)": "This account has no campaigns that can be claimed automatically right now (only the daily login gift points are claimed automatically)",
"这份额度走「活动套餐」通道:若转发时提示编码套餐已到期,": "This quota goes through the Start Plan channel: if forwarding reports that the Coding Plan has expired, ",
"这里填国内站(modelscope.cn)的账号:请粘贴国内站的令牌。国际站(modelscope.ai)是另一家 provider、另一套账号,两边的令牌不通用。": "This is for the China site (modelscope.cn) account: paste the China site's token. The international site (modelscope.ai) is another provider with its own account; tokens are not interchangeable between the two.",
"这里填国内站(monkeycode-ai.com)的账号:请粘贴国内站的 session。国际站(monkeycode-ai.net)是另一家 provider、另一套账号,两边的凭证不通用。": "This is for the China site (monkeycode-ai.com) account: paste the China site's session. The international site (monkeycode-ai.net) is another provider with its own account; credentials are not interchangeable between the two.",
"这里填国际站(modelscope.ai)的账号:请粘贴国际站的令牌。国内站(modelscope.cn)是另一家 provider、另一套账号,两边的令牌不通用。": "This is for the international site (modelscope.ai) account: paste the international site's token. The China site (modelscope.cn) is another provider with its own account; tokens are not interchangeable between the two.",
"这里填国际站(monkeycode-ai.net)的账号:请粘贴国际站的 session。国内站(monkeycode-ai.com)是另一家 provider、另一套账号,两边的凭证不通用。": "This is for the international site (monkeycode-ai.net) account: paste the international site's session. The China site (monkeycode-ai.com) is another provider with its own account; credentials are not interchangeable between the two.",
"选择 CatPaw 客户端的登录态文件 auth.json(Windows:C:\\Users\\<你的用户名>\\.meituan-catpaw\\auth.json;macOS / Linux:~/.meituan-catpaw/auth.json)。导入后凭证直接落在网关、可独立转发,不再依赖本机客户端。": "Select the CatPaw client's login-state file auth.json (Windows: C:\\Users\\<your username>\\.meituan-catpaw\\auth.json; macOS / Linux: ~/.meituan-catpaw/auth.json). After import the credentials live on the gateway and can be forwarded independently — no longer dependent on this machine's client.",
"选择 Cline 客户端的登录态文件 providers.json(Windows:C:\\Users\\<你的用户名>\\.cline\\data\\settings\\providers.json;macOS / Linux:~/.cline/data/settings/providers.json)。导入后凭证直接落在网关、可独立转发,不再依赖本机客户端;这一条归入 {label}。": "Select the Cline client's login-state file providers.json (Windows: C:\\Users\\<your username>\\.cline\\data\\settings\\providers.json; macOS / Linux: ~/.cline/data/settings/providers.json). After import the credentials live on the gateway and can be forwarded independently — no longer dependent on this machine's client; this record goes into {label}.",
Expand Down
Loading
Loading