magpie-gemini-web 0.6.0 → 0.8.0
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.en.md +43 -9
- package/README.md +43 -9
- package/docs/logo.svg +16 -0
- package/docs/studio-release.md +99 -20
- package/index.mjs +2 -1
- package/lib/backend.mjs +121 -3
- package/lib/studio-native.mjs +7 -3
- package/lib/studio-release.json +73 -19
- package/lib/studio.mjs +82 -12
- package/package.json +7 -2
- package/patches/studio-0.2.17-preserve-request-bodies.patch +160 -0
- package/scripts/studio-managed-smoke.mjs +25 -1
- package/scripts/studio-pins.mjs +49 -0
- package/scripts/studio-release.mjs +193 -18
package/README.en.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# magpie-gemini-web
|
|
1
|
+
# <img src="docs/logo.svg" width="28" height="28" align="top" alt="" /> magpie-gemini-web
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/magpie-gemini-web) [](https://www.npmjs.com/package/magpie-gemini-web) [](https://usemagpie.ai/) [](https://nodejs.org/) [](https://github.com/BUKOWSKIREAL/magpie-gemini-web) [](LICENSE)
|
|
2
4
|
|
|
3
5
|
[中文](README.md) | English
|
|
4
6
|
|
|
@@ -14,10 +16,12 @@ The plugin provides two independent providers that can be used individually or t
|
|
|
14
16
|
| :--- | :--- | :--- |
|
|
15
17
|
| **Best for** | **Coding agents (recommended)** | General chat, web-only models & web quota |
|
|
16
18
|
| **Tool calling** | **Native Function Calling**, reliable | Prompt-emulated (experimental; Flash often skips tools) |
|
|
17
|
-
| **Thinking levels** | `minimal` / `low` / `medium` / `high`
|
|
19
|
+
| **Thinking levels** | Supported levels from the model catalog: `minimal` / `low` / `medium` / `high` | `low` (base) / `medium` (`-thinking-medium`, `gemini-4-argon` only) / `high` (`-thinking` extended thinking) |
|
|
20
|
+
| **Image input** | On by default; chat models read images | Off by default; needs a signed-in cookie once on (see below) |
|
|
21
|
+
| **Image generation** | Nano Banana models, for Magpie's image generation (Magpie v0.1.2075+, see below) | Not supported |
|
|
18
22
|
| **Sign-in method** | Sign in directly in an isolated popup browser window | Copy `cookie` from a private/incognito window |
|
|
19
23
|
| **Usage cards** | Shows models currently on cooldown and recovery times | Syncs **5-hour** & **weekly** usage and reset times from the web |
|
|
20
|
-
| **Local backend** | AIStudio2API (`v0.2.
|
|
24
|
+
| **Local backend** | AIStudio2API (`v0.2.18`) | gemini-web2api-go (`4.26.0-magpie.1` optimized build) |
|
|
21
25
|
|
|
22
26
|
---
|
|
23
27
|
|
|
@@ -29,7 +33,7 @@ Install **magpie-gemini-web** from the Magpie plugin market, then sign in to eit
|
|
|
29
33
|
|
|
30
34
|
1. Sign in to **Google AI Studio** in Magpie and choose **「用 Google 账号登录(推荐)」** (Sign in with a Google account).
|
|
31
35
|
2. Sign in to your Google account in the separate login window that opens (your regular browser is unaffected), then close the window.
|
|
32
|
-
> On first run, the local service (~
|
|
36
|
+
> On first run, the local service (~40 MB) and the login browser Camoufox (~300 MB) are downloaded first, so the window may take a few minutes to appear. While they download, Magpie opens a progress page in your browser. Magpie waits at most 10 minutes, downloads included, so finish signing in promptly; if GitHub is unreachable, set `studio.proxy` first (see plugin options and proxy settings below).
|
|
33
37
|
3. **Managing accounts:** Choose "Sign in with a Google account" again at any time to **add a new account**, create a card for an existing local account, or **re-authenticate** an expired account.
|
|
34
38
|
|
|
35
39
|
### Option 2: Gemini Web (`gemini-web`)
|
|
@@ -59,6 +63,18 @@ Install **magpie-gemini-web** from the Magpie plugin market, then sign in to eit
|
|
|
59
63
|
|
|
60
64
|
---
|
|
61
65
|
|
|
66
|
+
## Image Generation (AI Studio)
|
|
67
|
+
|
|
68
|
+
`ai-studio` lists the Nano Banana image models your account can use (such as `gemini-3.1-flash-image` and `gemini-3-pro-image`), for Magpie's image generation. **This needs Magpie v0.1.2075 or later**, the first to take a plugin's Gemini image models as models that draw.
|
|
69
|
+
|
|
70
|
+
- **No need to tick them, or to pick them for a chat:** Magpie's Settings list them under **Images → Image generation**. Pick one there, or leave it on Automatic.
|
|
71
|
+
- **How agents draw:** an agent calls Magpie's `generate_image` tool (the Magpie Image MCP from the Library), which draws with the model picked there; reference images make it an edit. To try it from the command line: `magpie tool generate_image "a magpie on a branch, watercolour" --size 16:9 -o magpie.png`.
|
|
72
|
+
- **Size:** `size` gives the aspect ratio. A ratio (such as `16:9` or `1:4`) is used as it is when the model takes it, else the nearest one it does; a size such as `1536x1024` is made the nearest usual ratio by Magpie first. `quality` makes no difference for these models.
|
|
73
|
+
- **Don't tick them as chat models:** Magpie still keeps a plugin's models that draw in its chat model lists ([yetone/magpie#2792](https://github.com/yetone/magpie/issues/2792)). They take no tool calls and have 32K–128K context windows, so they make poor chat models for agents.
|
|
74
|
+
- If you don't want the image models, turn them off with `studio.imageModels` (see the options below).
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
62
78
|
## Configuration & Advanced Usage
|
|
63
79
|
|
|
64
80
|
<details>
|
|
@@ -66,12 +82,15 @@ Install **magpie-gemini-web** from the Magpie plugin market, then sign in to eit
|
|
|
66
82
|
|
|
67
83
|
<br>
|
|
68
84
|
|
|
69
|
-
Tool calling is enabled by default
|
|
85
|
+
Tool calling is enabled by default. Image input is on by default for AI Studio and off for Gemini Web. Configure plugin options via the CLI:
|
|
70
86
|
|
|
71
87
|
```bash
|
|
72
|
-
#
|
|
88
|
+
# Turn image input on for both providers
|
|
73
89
|
magpie plugin options magpie-gemini-web '{"allowImages":true}'
|
|
74
90
|
|
|
91
|
+
# Turn image input off for AI Studio
|
|
92
|
+
magpie plugin options magpie-gemini-web '{"studio":{"allowImages":false}}'
|
|
93
|
+
|
|
75
94
|
# Configure a proxy for AI Studio
|
|
76
95
|
magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:7890"}}'
|
|
77
96
|
```
|
|
@@ -83,7 +102,7 @@ magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:78
|
|
|
83
102
|
| Option | Default | Scope | Description |
|
|
84
103
|
| :--- | :--- | :--- | :--- |
|
|
85
104
|
| `allowTools` | `true` | Shared (override via `studio.allowTools`) | Allow tool calls. When `false`, requests with tools return 400 |
|
|
86
|
-
| `allowImages` | `false` | Shared (override via `studio.allowImages`) | Allow image input |
|
|
105
|
+
| `allowImages` | Web: `false`; Studio: `true` | Shared (override via `studio.allowImages`) | Allow image input in a chat (an image model's reference images don't need it). Gemini Web reads images only when signed in and returns 400 otherwise; in testing, `gemini-3.6-flash` waited until the timeout on a chat with an image, while `gemini-3.5-flash-lite` and `gemini-3.8-flash` answered |
|
|
87
106
|
| `requestTimeoutMs` / `modelTimeoutMs` | Web: `240000` / `10000`; Studio: `1800000` / `10000` | Shared (override via `studio.*`) | Timeout (ms) per backend wait or model list fetch; resets on stream data, explicit settings take precedence |
|
|
88
107
|
| `stripCitations` | `true` | `gemini-web` only | Strip `[cite: 1]` and `[cite_start]` markers from replies and tool arguments (not supported on AI Studio) |
|
|
89
108
|
| `proxy` | none | `gemini-web` only | Proxy for the managed Gemini Web backend to reach Google (`http` / `https` / `socks5` / `socks5h`), or set `GEMINI_WEB_PROXY` env var / enter during sign-in |
|
|
@@ -92,11 +111,12 @@ magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:78
|
|
|
92
111
|
| `studio.proxy` | none | `ai-studio` only | Proxy for reaching Google (`http` / `https` / `socks5`), or set `AI_STUDIO_PROXY` env var; when set, it takes precedence over the proxy saved in the admin page. An empty value counts as unset |
|
|
93
112
|
| `studio.baseURL` | `http://127.0.0.1:2048/v1` | `ai-studio` only | Default URL when connecting an existing AIStudio2API instance |
|
|
94
113
|
| `studio.contextLimit` / `studio.outputLimit` | Model catalog defaults | `ai-studio` only | Limits reported to clients (can only lower the catalog defaults) |
|
|
114
|
+
| `studio.imageModels` | `true` | `ai-studio` only | List the Nano Banana image models, for Magpie's image generation; `false` lists text models only |
|
|
95
115
|
|
|
96
116
|
**Using a proxy to reach Google:**
|
|
97
117
|
- **AI Studio:** Preferably set it in the local admin page. Open the address on the usage card's "管理页" (admin page) line (default `http://127.0.0.1:2048`) and sign in as `magpie` with `adminPassword` from `config.json` in the data directory. Save the proxy, then restart the service from the admin page. The plugin keeps the saved value when it restarts the backend.
|
|
98
118
|
- Alternatively, `studio.proxy` or `AI_STUDIO_PROXY` take precedence over the saved proxy. A change applies after the local service restarts (`npm run studio:stop`; the next request starts it again).
|
|
99
|
-
- With none set, the backend goes out directly, or
|
|
119
|
+
- With none set, the backend goes out directly, or through the system proxy on macOS and Windows.
|
|
100
120
|
- **The backend uses neither Magpie's proxies (including the provider proxy set for `ai-studio`) nor `HTTPS_PROXY` and similar variables**: it keeps running after Magpie quits, when a proxy borrowed from Magpie may be gone. Use one of the options above. A backend started by a plugin version from before this fix may still be using a proxy from the environment it was started in (Magpie's, for example); the "代理出口" line marks it and says what a restart changes.
|
|
101
121
|
- The usage card's "代理出口" (proxy) line, the Google sign-in instructions and failure messages, and `npm run studio:status` show the proxy the backend actually uses, where it comes from, and whether a new setting still needs a restart.
|
|
102
122
|
- The listen address, API key and admin credentials are managed by the plugin; changing them in the admin page has no effect.
|
|
@@ -147,7 +167,7 @@ When a plugin error asks you to run a command, it includes the full ready-to-cop
|
|
|
147
167
|
- Concurrency is capped at 1, but Google account rate-limiting or flagging cannot be completely ruled out—use at your own risk.
|
|
148
168
|
|
|
149
169
|
**AI Studio upgrades and model selection:**
|
|
150
|
-
- The plugin pins SHA-256-verified `v0.2.
|
|
170
|
+
- The plugin pins SHA-256-verified `v0.2.18-magpie.1`, based on upstream `v0.2.18`. Upgrade the plugin to update the backend. Official releases at or below that upstream version, and managed backends an older plugin installed, are upgraded on the next managed startup, preserving accounts, port and sign-in credentials.
|
|
151
171
|
- **Online updates are disabled in the managed backend on macOS, Linux, and Windows.** The admin page says updates are managed by magpie-gemini-web; the update endpoint returns HTTP 409 and update checks do not contact GitHub. Independently managed external servers are unaffected. See [docs/studio-release.md](docs/studio-release.md) for how the managed build is made and reproduced.
|
|
152
172
|
- Managed Unix installs still attempt to set `package/` to `0555` as additional file protection. Permission failures do not block service, and disabling online updates does not depend on permissions. To reset by manually deleting the data directory, stop the service first, then run `chmod -R u+w "<data-dir>/package"` before deleting it; replace `<data-dir>` with the actual path.
|
|
153
173
|
- If a newer or custom version is installed, the plugin reports a conflict with `stop`, `install`, and `start` commands carrying the correct `--data-dir`. Stop can recover a changed listener PID and verifies its executable path before signaling it. If HTTP is down but the process is still alive, the plugin refuses to reinstall or launch a second process.
|
|
@@ -176,3 +196,17 @@ On macOS, Gemini Web sign-in includes an experimental **macOS Native Task** opti
|
|
|
176
196
|
## License
|
|
177
197
|
|
|
178
198
|
MIT. The upstream `gemini-web2api-go` project is also MIT (see `LICENSE-UPSTREAM`).
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Star History
|
|
203
|
+
|
|
204
|
+
<p align="center">
|
|
205
|
+
<a href="https://www.star-history.com/#BUKOWSKIREAL/magpie-gemini-web&Date">
|
|
206
|
+
<picture>
|
|
207
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=BUKOWSKIREAL/magpie-gemini-web&type=Date&theme=dark" />
|
|
208
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=BUKOWSKIREAL/magpie-gemini-web&type=Date" />
|
|
209
|
+
<img alt="GitHub star history for magpie-gemini-web" src="https://api.star-history.com/svg?repos=BUKOWSKIREAL/magpie-gemini-web&type=Date" width="800" />
|
|
210
|
+
</picture>
|
|
211
|
+
</a>
|
|
212
|
+
</p>
|
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# magpie-gemini-web
|
|
1
|
+
# <img src="docs/logo.svg" width="28" height="28" align="top" alt="" /> magpie-gemini-web
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/magpie-gemini-web) [](https://www.npmjs.com/package/magpie-gemini-web) [](https://usemagpie.ai/) [](https://nodejs.org/) [](https://github.com/BUKOWSKIREAL/magpie-gemini-web) [](LICENSE)
|
|
2
4
|
|
|
3
5
|
中文 | [English](README.en.md)
|
|
4
6
|
|
|
@@ -14,10 +16,12 @@
|
|
|
14
16
|
| :--- | :--- | :--- |
|
|
15
17
|
| **适用场景** | **推荐 Coding Agent 使用** | 日常对话、使用网页版专属模型与额度 |
|
|
16
18
|
| **工具调用** | **原生 Function Calling**,稳定可靠 | 提示词模拟(实验性,Flash 系列常不调工具) |
|
|
17
|
-
| **思考档位** | `minimal` / `low` / `medium` / `high`
|
|
19
|
+
| **思考档位** | 按模型目录提供 `minimal` / `low` / `medium` / `high` 中支持的档位 | `low`(普通)/ `medium`(`-thinking-medium`,仅 `gemini-4-argon`)/ `high`(`-thinking` 扩展思考) |
|
|
20
|
+
| **图片输入** | 默认开启,对话模型可以读图 | 默认关闭;开启后需要登录(挂 Cookie),见下文 |
|
|
21
|
+
| **图片生成** | Nano Banana 系列模型,供 Magpie 的图片生成使用(需要 Magpie v0.1.2075+,见下文) | 不支持 |
|
|
18
22
|
| **登录方式** | 弹出独立浏览器窗口直接登录 Google | 用无痕窗口登录并复制 `cookie` |
|
|
19
23
|
| **额度卡片** | 显示冷却中的模型与恢复时间 | 同步网页版 **5 小时** 与 **每周** 用量及重置时间 |
|
|
20
|
-
| **本地后端** | AIStudio2API (`v0.2.
|
|
24
|
+
| **本地后端** | AIStudio2API (`v0.2.18`) | gemini-web2api-go (`4.26.0-magpie.1` 优化版) |
|
|
21
25
|
|
|
22
26
|
---
|
|
23
27
|
|
|
@@ -29,7 +33,7 @@
|
|
|
29
33
|
|
|
30
34
|
1. 在 Magpie 中登录 **Google AI Studio**,选择 **「用 Google 账号登录(推荐)」**。
|
|
31
35
|
2. 在弹出的独立登录窗口中登录 Google 账号(不影响日常浏览器),完成后直接关闭窗口。
|
|
32
|
-
> 首次使用要先下载本地服务(约
|
|
36
|
+
> 首次使用要先下载本地服务(约 40 MB)和登录浏览器 Camoufox(约 300 MB),弹窗可能需要等几分钟才出现。需要下载时,Magpie 会在浏览器里打开一个进度页,显示下载进度。Magpie 最多等 10 分钟(下载的时间也算在内),请尽快完成登录;连不上 GitHub 时,先按下面「插件选项与代理配置」设置 `studio.proxy`。
|
|
33
37
|
3. **后续管理**:再次点击「用 Google 账号登录」,可选择**添加新账号**、为本机已有账号建卡,或为过期账号**重新登录**。
|
|
34
38
|
|
|
35
39
|
### 方式二:Gemini Web (`gemini-web`)
|
|
@@ -59,6 +63,18 @@
|
|
|
59
63
|
|
|
60
64
|
---
|
|
61
65
|
|
|
66
|
+
## 图片生成(AI Studio)
|
|
67
|
+
|
|
68
|
+
`ai-studio` 会列出账号可用的 Nano Banana 系列图像模型(如 `gemini-3.1-flash-image`、`gemini-3-pro-image`),供 Magpie 的图片生成使用。**需要 Magpie v0.1.2075 及以上**:从这个版本起,Magpie 才会把插件的 Gemini 图像模型列为出图模型。
|
|
69
|
+
|
|
70
|
+
- **不用勾选,也不用在对话里选它们**:Magpie 设置的 **Images → Image generation** 会直接列出这些模型,选中一个,或保持 Automatic(自动)即可。
|
|
71
|
+
- **Agent 怎么出图**:Agent 调用 Magpie 的 `generate_image` 工具(Library 里的 Magpie Image MCP),Magpie 用上面选的模型出图;带参考图就是改图。也可以在命令行试:`magpie tool generate_image "a magpie on a branch, watercolour" --size 16:9 -o magpie.png`。
|
|
72
|
+
- **尺寸**:`size` 决定宽高比:写比例(如 `16:9`、`1:4`)时,模型支持就照用,不支持就取它支持的最接近的比例;写 `1536x1024` 这样的尺寸时,Magpie 先换成最接近的常用比例。`quality` 对这些模型不起作用。
|
|
73
|
+
- **别把它们勾进对话模型**:Magpie 目前会把能出图的插件模型也留在对话模型列表里([yetone/magpie#2792](https://github.com/yetone/magpie/issues/2792))。它们不支持工具调用,上下文也只有 32K–128K,不适合当 Agent 的对话模型。
|
|
74
|
+
- 不需要图像模型时,可以用 `studio.imageModels` 关掉(见下方选项)。
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
62
78
|
## 配置与进阶
|
|
63
79
|
|
|
64
80
|
<details>
|
|
@@ -66,12 +82,15 @@
|
|
|
66
82
|
|
|
67
83
|
<br>
|
|
68
84
|
|
|
69
|
-
|
|
85
|
+
工具调用默认开启。图片输入在 AI Studio 默认开启,在 Gemini Web 默认关闭。可通过命令行修改插件配置:
|
|
70
86
|
|
|
71
87
|
```bash
|
|
72
|
-
#
|
|
88
|
+
# 两个 Provider 都开启图片输入
|
|
73
89
|
magpie plugin options magpie-gemini-web '{"allowImages":true}'
|
|
74
90
|
|
|
91
|
+
# 关闭 AI Studio 的图片输入
|
|
92
|
+
magpie plugin options magpie-gemini-web '{"studio":{"allowImages":false}}'
|
|
93
|
+
|
|
75
94
|
# 为 AI Studio 配置代理
|
|
76
95
|
magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:7890"}}'
|
|
77
96
|
```
|
|
@@ -83,7 +102,7 @@ magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:78
|
|
|
83
102
|
| 选项 | 默认值 | 适用范围 | 说明 |
|
|
84
103
|
| :--- | :--- | :--- | :--- |
|
|
85
104
|
| `allowTools` | `true` | 共用(可用 `studio.allowTools` 单独覆盖) | 允许工具调用。设为 `false` 时带工具的请求返回 400 |
|
|
86
|
-
| `allowImages` |
|
|
105
|
+
| `allowImages` | Web:`false`;Studio:`true` | 共用(可用 `studio.allowImages` 单独覆盖) | 允许对话中的图片输入(图像模型的参考图不受它限制)。Gemini Web 读图需要登录,未登录时返回 400;实测 `gemini-3.6-flash` 带图请求会一直等到超时,`gemini-3.5-flash-lite`、`gemini-3.8-flash` 正常 |
|
|
87
106
|
| `requestTimeoutMs` / `modelTimeoutMs` | Web:`240000` / `10000`;Studio:`1800000` / `10000` | 共用(`studio.*` 可覆盖) | 单次等待后端 / 拉取模型列表的超时(毫秒);收到流数据后重新计时,显式配置优先 |
|
|
88
107
|
| `stripCitations` | `true` | 仅 `gemini-web` | 剥离回复与工具参数中的 `[cite: 1]`、`[cite_start]` 标记(AI Studio 不支持剥离) |
|
|
89
108
|
| `proxy` | 无 | 仅 `gemini-web` | 一键配置后端访问 Google 的代理(`http` / `https` / `socks5` / `socks5h`),也可用环境变量 `GEMINI_WEB_PROXY` 或在登录第一步填写 |
|
|
@@ -92,11 +111,12 @@ magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:78
|
|
|
92
111
|
| `studio.proxy` | 无 | 仅 `ai-studio` | 访问 Google 的代理(`http` / `https` / `socks5`),也可用环境变量 `AI_STUDIO_PROXY`;设置后优先于管理页里保存的代理,留空等于不设置 |
|
|
93
112
|
| `studio.baseURL` | `http://127.0.0.1:2048/v1` | 仅 `ai-studio` | 连接已有 AIStudio2API 时的默认地址 |
|
|
94
113
|
| `studio.contextLimit` / `studio.outputLimit` | 模型目录默认值 | 仅 `ai-studio` | 向客户端声明的上限(仅支持在目录值基础上调低) |
|
|
114
|
+
| `studio.imageModels` | `true` | 仅 `ai-studio` | 列出 Nano Banana 等图像模型,供 Magpie 的图片生成使用;设为 `false` 时只列文本模型 |
|
|
95
115
|
|
|
96
116
|
**配置代理访问 Google:**
|
|
97
117
|
- **AI Studio**:推荐在本地管理页设置。打开额度卡片「管理页」一行里的地址(默认 `http://127.0.0.1:2048`),用户名 `magpie`,密码是数据目录 `config.json` 里的 `adminPassword`;保存代理后在管理页重启服务即可生效,之后插件重启后端也不会覆盖它。
|
|
98
118
|
- 也可以用上表的 `studio.proxy` 或环境变量 `AI_STUDIO_PROXY`,它们优先于管理页里保存的代理。改了要重启本地服务才生效(`npm run studio:stop`,下一次请求会自动启动)。
|
|
99
|
-
- 都没设置时,后端直连;
|
|
119
|
+
- 都没设置时,后端直连;macOS 和 Windows 上会使用已配置的系统代理。
|
|
100
120
|
- **后端不使用 Magpie 的代理(包括给 `ai-studio` 设置的供应商代理),也不读取 `HTTPS_PROXY` 等环境变量**:它在 Magpie 退出后仍会运行,借用 Magpie 的代理到时可能已经失效。请用上面两种方式之一设置。加入这项修复之前的插件版本启动的后端,可能还在用启动时环境变量里的代理(比如 Magpie 的);「代理出口」一行会标出来,并说明重启后会怎样。
|
|
101
121
|
- 额度卡片的「代理出口」一行会显示后端当前实际使用的代理、它来自哪里,以及新设置是否还要重启才生效;登录 Google 时的说明、登录失败的提示和 `npm run studio:status` 也会显示。
|
|
102
122
|
- 监听地址、API Key、管理员账号等由插件管理,在管理页修改不会生效。
|
|
@@ -147,7 +167,7 @@ magpie plugin options magpie-gemini-web '{"studio":{"proxy":"http://127.0.0.1:78
|
|
|
147
167
|
- 插件将请求并发限制为 1,但仍无法完全排除 Google 账号风控风险,请自行评估使用。
|
|
148
168
|
|
|
149
169
|
**AI Studio 升级与模型范围:**
|
|
150
|
-
- 插件固定使用经过 SHA-256 校验的 `v0.2.
|
|
170
|
+
- 插件固定使用经过 SHA-256 校验的 `v0.2.18-magpie.1`(基于上游 `v0.2.18`),通过升级插件更新后端。同基线或更旧的官方版、以及旧版插件装的托管后端,在下次管理启动时自动升级,保留账号、端口与登录凭据。
|
|
151
171
|
- **托管后端已在 macOS、Linux、Windows 统一禁用在线更新**:管理页提示“更新由 magpie-gemini-web 管理”,更新接口返回 HTTP 409,检查更新也不会访问 GitHub。用户自行连接的外部服务不受影响。托管构建方式和可复现构建流程见 [docs/studio-release.md](docs/studio-release.md)。
|
|
152
172
|
- Unix 的 `package/` 仍尽力设置为 `0555`,作为额外的文件保护;权限设置失败不阻断服务,在线更新的禁用也不依赖该权限。若要手动删除数据目录来重置,请先停止服务,再运行 `chmod -R u+w "<数据目录>/package"` 恢复可写权限,然后删除;将 `<数据目录>` 替换为实际路径。
|
|
153
173
|
- 若自行更新到更新版或定制版,插件会提示版本冲突,并提供带正确 `--data-dir` 的 `stop`、`install`、`start` 命令。停止时会找回更新后的监听进程 PID,并核对可执行文件路径;无法核实身份就不会发送终止信号。HTTP 端口关闭但进程尚未退出时,插件不会重装或启动第二个进程。
|
|
@@ -180,3 +200,17 @@ macOS 用户登录 Gemini Web 时会额外看到「macOS 原生 Task(实验性
|
|
|
180
200
|
## 许可证
|
|
181
201
|
|
|
182
202
|
MIT。上游 `gemini-web2api-go` 同为 MIT(见 `LICENSE-UPSTREAM`)。
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Star 趋势
|
|
207
|
+
|
|
208
|
+
<p align="center">
|
|
209
|
+
<a href="https://www.star-history.com/#BUKOWSKIREAL/magpie-gemini-web&Date">
|
|
210
|
+
<picture>
|
|
211
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=BUKOWSKIREAL/magpie-gemini-web&type=Date&theme=dark" />
|
|
212
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=BUKOWSKIREAL/magpie-gemini-web&type=Date" />
|
|
213
|
+
<img alt="magpie-gemini-web 的 GitHub Star 增长趋势" src="https://api.star-history.com/svg?repos=BUKOWSKIREAL/magpie-gemini-web&type=Date" width="800" />
|
|
214
|
+
</picture>
|
|
215
|
+
</a>
|
|
216
|
+
</p>
|
package/docs/logo.svg
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="a" x1="2" y1="3" x2="20" y2="21" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0%" stop-color="#06B6D4"/>
|
|
5
|
+
<stop offset="50%" stop-color="#3B82F6"/>
|
|
6
|
+
<stop offset="100%" stop-color="#8B5CF6"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="b" x1="14" y1="2" x2="22" y2="10" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop offset="0%" stop-color="#8B5CF6"/>
|
|
10
|
+
<stop offset="100%" stop-color="#EC4899"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
</defs>
|
|
13
|
+
<path d="M10 3.2C10.35 3.2 10.62 3.45 10.72 3.8C11.45 6.85 13.15 8.55 16.2 9.28C16.55 9.38 16.8 9.65 16.8 10C16.8 10.35 16.55 10.62 16.2 10.72C13.15 11.45 11.45 13.15 10.72 16.2C10.62 16.55 10.35 16.8 10 16.8C9.65 16.8 9.38 16.55 9.28 16.2C8.55 13.15 6.85 11.45 3.8 10.72C3.45 10.62 3.2 10.35 3.2 10C3.2 9.65 3.45 9.38 3.8 9.28C6.85 8.55 8.55 6.85 9.28 3.8C9.38 3.45 9.65 3.2 10 3.2Z" transform="translate(-0.5 2.5) scale(1.12)" fill="url(#a)"/>
|
|
14
|
+
<path d="M18.2 1.8C18.42 1.8 18.6 1.95 18.66 2.16C19.08 3.82 20.02 4.76 21.68 5.18C21.89 5.24 22.04 5.42 22.04 5.64C22.04 5.86 21.89 6.04 21.68 6.1C20.02 6.52 19.08 7.46 18.66 9.12C18.6 9.33 18.42 9.48 18.2 9.48C17.98 9.48 17.8 9.33 17.74 9.12C17.32 7.46 16.38 6.52 14.72 6.1C14.51 6.04 14.36 5.86 14.36 5.64C14.36 5.42 14.51 5.24 14.72 5.18C16.38 4.76 17.32 3.82 17.74 2.16C17.8 1.95 17.98 1.8 18.2 1.8Z" fill="url(#b)"/>
|
|
15
|
+
<circle cx="17.8" cy="18.2" r="1.35" fill="#6366F1"/>
|
|
16
|
+
</svg>
|
package/docs/studio-release.md
CHANGED
|
@@ -1,49 +1,128 @@
|
|
|
1
1
|
# AI Studio 托管后端构建
|
|
2
2
|
|
|
3
|
-
插件使用 `0.2.
|
|
3
|
+
插件使用 `0.2.18-magpie.1`,基于 AIStudio2API `v0.2.18` 的固定 commit。上游版本、commit、Go 版本、C/C++ 工具链与 SpiderMonkey 静态库(`toolchains`)、补丁列表、安装包及二进制 SHA-256 均记录在 `lib/studio-release.json`。`upstream.camoufox` 是这个 commit 要求的 Camoufox 版本(上游 `internal/camoufoxnative/download.go` 里的 `camoufoxRelease`),更新上游 commit 时要一起核对,构建脚本发现不一致会报错。MIT 许可见 `LICENSE-AISTUDIO`。
|
|
4
|
+
|
|
5
|
+
## 升级兼容
|
|
6
|
+
|
|
7
|
+
- 上游 v0.2.18 删除了纯 Go(goja)的 WAA 后端 `go`,改为经 CGO 内嵌 Firefox 的 JS 引擎 SpiderMonkey(`WAA_BACKEND=spidermonkey`)。插件固定使用 `spidermonkey`:生成仍在服务进程内完成,不需要浏览器;Camoufox 仍只用于 Google 登录。上游默认的 `camoufox` 后端未采用。
|
|
8
|
+
- SpiderMonkey 使用上游自己发布时用的预编译静态库(`Mag1cFall/firefox` 的 `v152.0.4-aistudio2api.1` release),每个目标的归档名与 SHA-256 记录在 `toolchains.spidermonkey`,构建时下载到 `studio-build/toolchains/` 并校验。头文件与库经 `CGO_CXXFLAGS` / `CGO_LDFLAGS` 传入,库名由上游 `internal/waa/mozjs` 的 `#cgo` 指令给出,与上游 `.github/actions/spidermonkey` 一致。
|
|
9
|
+
- 新增设置 `SEARCH_MODEL_ALIASES`、`GOOGLE_SEARCH`、`CONTINUATION_REWRITE`、`CONTINUATION_PROMPT` 保留管理页保存的值,并隔离宿主环境同名变量。上游默认开启 `SEARCH_MODEL_ALIASES`,把每个可搜索的对话模型再列一份 `<id>-search`;插件在 `.env` 缺少该项时写入 `false`,避免 Magpie 的模型列表大多重复一遍,用户可在管理页开启。其余三项沿用上游默认。
|
|
10
|
+
- Gemini 原生接口(`/v1beta`,Magpie 画图用)在 v0.2.18 按 Gemini 的方式拒绝密钥:错误密钥返回 400 `API_KEY_INVALID`,缺少密钥返回 403。插件把这两种情况当作 401 处理,提示重新登录;Google 自身返回的 403(如 code 7 “The caller does not have permission”)属于账号问题,原样传回。
|
|
11
|
+
- 上游 v0.2.17 改用需要 CGO 的原生 SQLite。账号和配置沿用原目录;首次打开旧数据库会整理空闲页。降级前应停止服务并备份完整数据目录,旧版不保证能读取迁移后的数据。
|
|
12
|
+
- 上游(v0.2.17 起,v0.2.18 仍然)会删除旧的请求正文 `bodies` 表。`patches/studio-0.2.17-preserve-request-bodies.patch` 改为在事务内压缩并迁移到 `request_bodies`,已有新版同 ID 记录优先,成功后才删除旧表;失败回滚。补丁原样适用于 v0.2.18,供从 0.2.16 及更早版本直接升级的用户使用;它包含旧正文读取、重复打开及迁移失败回滚测试,随上游测试一起运行。
|
|
13
|
+
- 新增的 `FIRST_EVENT_HEDGE` 保留管理页保存的值,同时隔离宿主环境同名变量。默认仍由上游设为 `off`。备用请求需要空闲账号和 Worker;插件默认单 Worker,不自动提高并发。
|
|
14
|
+
- 模型档位优先使用 `/v1/models` 返回的 `thinking_levels`;旧外部服务未返回该字段时沿用四档。Playground 通道、托管更新限制及插件默认并发保持原设置。
|
|
15
|
+
- macOS 与 Windows 都可能使用系统代理;显式代理及管理页设置仍优先,宿主的 `HTTP_PROXY` 等变量不传入服务。
|
|
4
16
|
|
|
5
17
|
## 在线更新策略
|
|
6
18
|
|
|
7
|
-
上游从 v0.2.14
|
|
19
|
+
上游从 v0.2.14 起原生支持分发方管理更新。构建时通过 `-ldflags` 写入两个值:
|
|
8
20
|
|
|
9
|
-
- `internal/app.version=v0.2.
|
|
10
|
-
- `internal/app.managedBy=magpie-gemini-web
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- 普通插件升级、账户登录、模型调用及管理功能继续保留。用户自行连接的外部 AIStudio2API 服务不受影响。
|
|
21
|
+
- `internal/app.version=v0.2.18-magpie.1`:明确的版本标识。同基线或更旧的官方版、以及更旧的托管版需要升级;更新的官方版、更新的托管版或不认识的定制版仍提示冲突。
|
|
22
|
+
- `internal/app.managedBy=magpie-gemini-web`:`GET /api/update`(包括 `?refresh=1`)只返回本地版本、`mode: managed` 和 `managed_by`,不访问 GitHub;`POST /api/update` 返回 HTTP 409,不下载、不替换文件、不重启。管理页显示“更新由 magpie-gemini-web 管理”。
|
|
23
|
+
|
|
24
|
+
构建不带 `desktop` 标签,不包含桌面窗口。普通插件升级、账户登录、模型调用及管理功能继续保留,用户自行连接的外部服务不受影响。
|
|
14
25
|
|
|
15
26
|
## 复现构建
|
|
16
27
|
|
|
17
|
-
维护者需要 Git、tar、Node.js 26.8.2
|
|
28
|
+
维护者需要 Git、tar、curl、Node.js 26.8.2、Go 1.27.1,以及 `lib/studio-release.json` 的 `toolchains` 固定的 C/C++ 工具链。SQLite 需要 C、SpiderMonkey 需要 C++,工具链因此也是 pin 的一部分:
|
|
29
|
+
|
|
30
|
+
| 目标 | 工具链 | 跨机器字节一致 |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Linux x64/arm64 | Zig `toolchains.zig`(`zig cc` / `zig c++`),musl 静态链接,不依赖构建机器的 glibc | 是:Zig 是自带 libc 的交叉编译器,任何主机产物相同 |
|
|
33
|
+
| Windows x64 | llvm-mingw `toolchains.llvmMingw`(Clang + LLD + UCRT),静态链接,PE 时间戳为 0 | 是:同上;构建脚本自动下载并按 SHA-256 校验。Windows 的库(含 C++ 运行库)取自 Linux x64 归档,见下 |
|
|
34
|
+
| macOS arm64/x64 | Xcode `toolchains.xcode`,最低目标 macOS 13(与 Go 1.27 一致),只能在 macOS 上构建 | 仅在同一 Xcode 下:Apple 链接器和 SDK 随 Xcode 变化 |
|
|
35
|
+
|
|
36
|
+
- Zig 默认从 PATH 查找,也可用 `STUDIO_ZIG=/absolute/path/to/zig` 指定。
|
|
37
|
+
- llvm-mingw 首次使用时下载到 `studio-build/toolchains/`(macOS、Linux x64、Windows x64 主机各有固定的归档及 SHA-256),之后复用。`STUDIO_MINGW_CC` 可指定其他 `x86_64-w64-mingw32-clang`(C++ 编译器取同目录的 `clang++`),但 `--verify` / `--write-pins` 要求其版本与 pin 一致。
|
|
38
|
+
- llvm-mingw 的 Linux 与 Windows 归档里 Windows 目标库逐字节相同,macOS 归档里的是另行构建的,其中 C++ 运行库(libc++abi)会把各自的构建路径写进可执行文件。因此在 macOS 上构建 Windows 时,链接 Linux x64 归档(同样固定 SHA-256)里的目标库;各主机都以一个 `-L` 指明目标库目录,因为 cgo 会把每个链接参数写成生成代码的一行,参数个数不同会改变可执行文件里的行号表。
|
|
39
|
+
- SpiderMonkey 静态库同样在首次使用时按目标下载到 `studio-build/toolchains/` 并校验 SHA-256,之后复用。
|
|
40
|
+
- Linux(musl)的 SpiderMonkey 静态库带有 mozglue 的环境变量拦截函数(`libjs_static.a` 的 `Unified_cpp_mozglue_interposers0.o`):除 `getenv` 外,`setenv` 等都经 `dlsym(RTLD_NEXT)` 找 C 库原函数,静态链接的程序找不到,便有意崩溃(`MOZ_CRASH`);Go 的 `os.Setenv` 在 cgo 程序里正走这条路。构建脚本校验下载后用 `zig ar` 删除这个目标文件,改用 musl 自己的函数;找不到该文件时报错,提示核对新版 SpiderMonkey。上游测试只在动态链接的 glibc 库(`linux-amd64-gnu`)上运行,不会遇到这个问题。
|
|
41
|
+
- Xcode 用 `DEVELOPER_DIR=/Applications/Xcode_<版本>.app/Contents/Developer` 选择,不需要改系统默认。不要用 beta 版 Xcode 制作发布包。
|
|
42
|
+
- 所有目标都以 `-trimpath -buildvcs=false -ldflags=-buildid=` 编译:Go 默认的 build ID 会哈希 C 编译器路径等构建输入,导致不同机器上内容相同的程序哈希不同。
|
|
43
|
+
- Windows 使用 Git Bash 执行命令,安装包运行和解压使用 Windows 自带 PowerShell。最终用户不需要构建工具。
|
|
44
|
+
|
|
45
|
+
`--verify` 和 `--write-pins` 会在开始构建前检查每个目标的工具链是否与 pin 一致,不一致时几秒内报错并说明需要的版本;不带这两个参数的普通构建只给出警告。
|
|
18
46
|
|
|
19
47
|
```bash
|
|
20
|
-
#
|
|
48
|
+
# 构建所有五个平台并核对现有 pin(macOS 目标需要固定的 Xcode)。
|
|
21
49
|
npm run studio:release:build
|
|
22
50
|
|
|
23
|
-
#
|
|
51
|
+
# 只构建当前平台,或用逗号指定多个目标(Linux/Windows 目标不要求固定的 Xcode)。
|
|
24
52
|
node scripts/studio-release.mjs --target=host --verify
|
|
53
|
+
node scripts/studio-release.mjs --target=linux-x64,linux-arm64,win32-x64 --verify
|
|
25
54
|
|
|
26
|
-
#
|
|
27
|
-
node scripts/studio-release.mjs --write-pins
|
|
28
|
-
|
|
29
|
-
# 可复用本地上游 git 仓库,但始终导出固定 commit,不使用工作区修改。
|
|
55
|
+
# 可复用本地仓库;始终导出固定 commit,再应用清单中的补丁,不使用工作区修改。
|
|
30
56
|
node scripts/studio-release.mjs --source=/path/to/AIStudio2API --verify
|
|
31
57
|
```
|
|
32
58
|
|
|
33
|
-
输出在 `studio-build/release/`,不进入 npm
|
|
59
|
+
输出在 `studio-build/release/`,不进入 npm 包。包含安装包、构建记录、SHA256SUMS 和上游许可证。构建记录包含固定工具链、实际编译器版本及补丁 SHA-256;`--verify` 失败时也会写入,便于对比差异。安装包固定文件顺序、权限与时间。前端 `.gz` 资源通过 `scripts/studio-regzip.go` 重新压缩,消除 Node zlib 跨平台差异。
|
|
60
|
+
|
|
61
|
+
## 生成 pin
|
|
62
|
+
|
|
63
|
+
正式 pin 由 CI 生成,因为 macOS 产物只能在固定的 Xcode 下复现,而 GitHub runner 上有固定版本的 Xcode。修改上游 commit、补丁或工具链后:
|
|
64
|
+
|
|
65
|
+
1. 审查源码和补丁,更新 `lib/studio-release.json` 的版本、上游及 `toolchains`,提交并推送。
|
|
66
|
+
2. 手动运行 **Verify managed AI Studio release** 并勾选 `write_pins`(候选模式):
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
gh workflow run studio.yml --ref <分支> -f write_pins=true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
每个 runner 构建、测试、记录自己平台的哈希;`Collect candidate pins` 作业用 `scripts/studio-pins.mjs` 校验所有构建记录来自同一源码、补丁和工具链,再把五个平台合并成 `candidate-pins` 产物,并在作业摘要中给出 diff。
|
|
73
|
+
3. 下载产物覆盖清单后提交(`gh run download` 不覆盖已有文件,所以先下载到临时目录):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
dir="$(mktemp -d)" && gh run download <run-id> --name candidate-pins --dir "$dir" \
|
|
77
|
+
&& cp "$dir/studio-release.json" lib/studio-release.json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
4. 推送后,PR 上的验证会在全新 runner 上重新构建并严格比对。这一步证明 pin 可以复现,而不只是记录了一次构建结果。
|
|
81
|
+
|
|
82
|
+
Linux 和 Windows 的 pin 也可以在本机生成(`--target=linux-x64,linux-arm64,win32-x64 --write-pins`),结果应与 CI 相同。不同来源的 pin 不一致说明工具链没有真正固定,应查明原因,不要直接覆盖。候选模式的产物以 `candidate-` 开头,`publish-studio.yml` 只接受 `studio-` 开头的验证产物,因此候选构建不会被上传到 release。
|
|
34
83
|
|
|
35
84
|
## 验证与发布
|
|
36
85
|
|
|
37
86
|
```bash
|
|
38
|
-
#
|
|
87
|
+
# 在独立临时数据目录安装当前平台真实安装包,无需 Google 账号。
|
|
39
88
|
npm run studio:managed:smoke
|
|
40
89
|
|
|
41
|
-
#
|
|
90
|
+
# 让插件离线恢复测试使用刚构建的安装包。
|
|
42
91
|
AI_STUDIO_TEST_ARCHIVE=/absolute/path/to/archive.tar.gz npm test
|
|
43
92
|
```
|
|
44
93
|
|
|
45
|
-
|
|
94
|
+
真实安装验证检查旧版请求正文迁移及重启后可读、管理页保存的备用请求设置、启动、版本、GET 更新状态、POST 更新返回 409、二进制及 PID 不变、管理页面显示托管提示、停止与状态。`.github/workflows/studio.yml` 在五种系统/架构的原生 runner 上重新构建、对比 SHA-256 并运行该验证;本机交叉编译不能代替 Linux/Windows 真机验证。
|
|
95
|
+
|
|
96
|
+
## 0.2.18 升级验证(2026-10-30)
|
|
97
|
+
|
|
98
|
+
以下为本分支的实际状态,发布前以最新 CI 结果为准。
|
|
99
|
+
|
|
100
|
+
- 首次候选构建(run 41025535280)中,Linux x64/arm64 在上游测试 `TestUserCacheRootWithoutEnvironment` 的 `t.Setenv` 处崩溃(见上文环境变量拦截函数),Windows 的 macOS 本机交叉编译结果与 CI 不同(见上文 C++ 运行库)。两处修复后的候选构建(run 41033635405)五个平台都通过上游测试、真实安装冒烟验证(含 `waa_backend=spidermonkey`、`search_model_aliases=false`)与插件测试。
|
|
101
|
+
- 跨机器一致性:Linux x64/arm64 与 Windows x64 的 CI 候选哈希与 macOS arm64 本机交叉编译完全一致;darwin-arm64 两次 CI 构建得到相同哈希。pin 来自第二次候选构建,随后的严格验证构建(run 41036094948)在五个平台的全新 runner 上重新构建,哈希与 pin 完全一致,冒烟验证与插件测试通过。
|
|
102
|
+
- Linux 二进制为静态链接,不含环境变量拦截函数;Windows 二进制只导入系统 DLL(UCRT、KERNEL32 等),C++ 运行库静态链接,PE 时间戳为 0。
|
|
103
|
+
- 真实账号端到端验证(CI 构建的 darwin-arm64 安装包,一个已登录账号复制到临时数据目录,原服务在验证期间停止、结束后恢复):服务 8 秒就绪,WAA 后端为 spidermonkey,全程未启动 Camoufox;45 个模型中无 `-search` 副本;`gemini-3.8-flash` 文本(4 秒)、流式(3 秒)和图片输入(17 秒,答对左右两半颜色)正常;经插件用 `gemini-3.1-flash-image` 按 16:9 画图得到 1376×768 图片(9 秒);错误密钥在 Gemini 接口上返回 400 `API_KEY_INVALID`,与插件的判断一致。
|
|
104
|
+
- Google 登录(Camoufox 登录窗口)本次未验证:使用的是已登录账号。
|
|
105
|
+
- 此分支未发布后端 release 或 npm 包。
|
|
106
|
+
|
|
107
|
+
## 0.2.17 升级验证(2026-10-29,历史记录)
|
|
46
108
|
|
|
47
|
-
|
|
109
|
+
以下为上一版 `0.2.17-magpie.1` 的验证结果,不代表 0.2.18。
|
|
110
|
+
|
|
111
|
+
- 上游前端 lint/build、Go 测试(含迁移补丁测试)通过;插件完整测试 207 项通过,无跳过。
|
|
112
|
+
- Linux 二进制为静态链接,Windows 二进制只导入 UCRT 与 KERNEL32、PE 时间戳为 0;npm 打包检查包含迁移补丁,排除构建产物。
|
|
113
|
+
- 跨机器一致性:Linux 与 Windows 的 pin 在 macOS arm64 本机交叉编译生成,CI 的 Linux x64/arm64 和 Windows x64 runner 原生重建后哈希完全一致;CI 候选构建得到的这三个平台哈希也与本机相同。macOS 的 pin 由 CI 在 Xcode 26.3 下生成,另一次独立的 CI 构建得到相同的 darwin-arm64 哈希。
|
|
114
|
+
- 五个平台都在 CI 原生 runner 上通过真实安装冒烟验证(含旧请求正文迁移及重启)和插件测试。
|
|
115
|
+
- 新版 Google 登录/生成端到端验证尚未完成。
|
|
116
|
+
- 此分支未发布后端 release 或 npm 包。本机日常后端仍使用 `0.2.16-magpie.1`,新版仅在临时数据目录运行。
|
|
117
|
+
|
|
118
|
+
发布前必须审查各平台 CI 与构建记录,再将安装包及许可证上传到本仓库 `studio-v0.2.18-magpie.1` release。该 release 可公开下载后,才能发布引用它的插件版本,否则新安装会遇到 404。构建脚本及验证 CI 不自动发布 release 或 npm 包。
|
|
119
|
+
|
|
120
|
+
本地试用建议使用独立数据目录:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
node scripts/studio.mjs install --data-dir /path/to/studio-018-trial --archive /absolute/path/to/archive
|
|
124
|
+
node scripts/studio.mjs start --data-dir /path/to/studio-018-trial
|
|
125
|
+
node scripts/studio.mjs stop --data-dir /path/to/studio-018-trial
|
|
126
|
+
```
|
|
48
127
|
|
|
49
|
-
|
|
128
|
+
使用现有账号数据测试前,先停止旧服务并备份;不要让两个进程同时写同一个数据目录。
|
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeBaseURL, settings, credentials, listModels, forward, UNREACHABLE_HEADER } from './lib/backend.mjs';
|
|
1
|
+
import { normalizeBaseURL, settings, credentials, listModels, forward, UNREACHABLE_HEADER, PLUGIN_ICON } from './lib/backend.mjs';
|
|
2
2
|
import { ensureBackend, localBackend } from './lib/native.mjs';
|
|
3
3
|
import { parseCookieInput, importCookie, ensureProxy, validateProxyURL, requireLoginBackend } from './lib/setup.mjs';
|
|
4
4
|
import { usage, poolChoices, poolAccounts, accountEmail } from './lib/usage.mjs';
|
|
@@ -101,6 +101,7 @@ export const GeminiWebPlugin = async (_input, options = {}) => {
|
|
|
101
101
|
},
|
|
102
102
|
auth: {
|
|
103
103
|
provider: ID,
|
|
104
|
+
icon: PLUGIN_ICON,
|
|
104
105
|
maxConcurrency: 1,
|
|
105
106
|
methods: [{
|
|
106
107
|
type: 'oauth',
|