magpie-gemini-web 0.5.6 → 0.7.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 +29 -10
- package/README.md +29 -10
- package/docs/backend-release.md +3 -1
- package/docs/logo.svg +16 -0
- package/docs/studio-release.md +79 -20
- package/index.mjs +39 -10
- package/lib/backend-release.json +15 -15
- package/lib/backend.mjs +35 -8
- package/lib/native.mjs +77 -26
- package/lib/setup.mjs +96 -2
- package/lib/studio-native.mjs +58 -9
- package/lib/studio-release.json +47 -19
- package/lib/studio.mjs +10 -8
- package/package.json +8 -2
- package/patches/argon.patch +781 -168
- package/patches/studio-0.2.17-preserve-request-bodies.patch +160 -0
- package/scripts/backend-argon.mjs +2 -2
- package/scripts/backend.mjs +17 -5
- package/scripts/studio-managed-smoke.mjs +30 -6
- package/scripts/studio-pins.mjs +49 -0
- package/scripts/studio-regzip.go +75 -0
- package/scripts/studio-release.mjs +137 -18
- package/scripts/studio.mjs +8 -6
package/lib/studio-release.json
CHANGED
|
@@ -1,39 +1,67 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.2.
|
|
2
|
+
"version": "0.2.17-magpie.1",
|
|
3
3
|
"repository": "BUKOWSKIREAL/magpie-gemini-web",
|
|
4
|
-
"tag": "studio-v0.2.
|
|
4
|
+
"tag": "studio-v0.2.17-magpie.1",
|
|
5
5
|
"goVersion": "1.27.1",
|
|
6
|
+
"toolchains": {
|
|
7
|
+
"zig": "0.16.0",
|
|
8
|
+
"xcode": {
|
|
9
|
+
"version": "26.3",
|
|
10
|
+
"build": "17C529"
|
|
11
|
+
},
|
|
12
|
+
"llvmMingw": {
|
|
13
|
+
"version": "20261020",
|
|
14
|
+
"clang": "clang version 23.1.4 (https://github.com/llvm/llvm-project.git 7a941dfb2877a0b8cf30323fefa85ad019e0b0f5)",
|
|
15
|
+
"hosts": {
|
|
16
|
+
"darwin": {
|
|
17
|
+
"asset": "llvm-mingw-20261020-ucrt-macos-universal.tar.xz",
|
|
18
|
+
"sha256": "e9c13e4ede38e715003ffc674d4d00a1088df8235439d1f0c16188ff0704c17e"
|
|
19
|
+
},
|
|
20
|
+
"linux-x64": {
|
|
21
|
+
"asset": "llvm-mingw-20261020-ucrt-ubuntu-22.04-x86_64.tar.xz",
|
|
22
|
+
"sha256": "55064b60b991a1e1e8090b8c2f84e82b22cfe5903d12c159d65064cf5e8ae335"
|
|
23
|
+
},
|
|
24
|
+
"win32-x64": {
|
|
25
|
+
"asset": "llvm-mingw-20261020-ucrt-x86_64.zip",
|
|
26
|
+
"sha256": "fd5462b7f5d93b2ff981fcd3f9c7e427e47f3203c64ea91c27bcc444eebd74cd"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
6
31
|
"upstream": {
|
|
7
|
-
"version": "0.2.
|
|
32
|
+
"version": "0.2.17",
|
|
8
33
|
"repository": "https://github.com/Mag1cFall/AIStudio2API.git",
|
|
9
|
-
"commit": "
|
|
34
|
+
"commit": "bd6c40f5f8a3a680a19a1ebff67216298d8bae27",
|
|
10
35
|
"camoufox": "152.0.4-beta.29"
|
|
11
36
|
},
|
|
37
|
+
"patches": [
|
|
38
|
+
"studio-0.2.17-preserve-request-bodies.patch"
|
|
39
|
+
],
|
|
12
40
|
"binaries": {
|
|
13
41
|
"darwin-arm64": {
|
|
14
|
-
"asset": "aistudio2api-v0.2.
|
|
15
|
-
"sha256": "
|
|
16
|
-
"binarySha256": "
|
|
42
|
+
"asset": "aistudio2api-v0.2.17-magpie.1-darwin-arm64.tar.gz",
|
|
43
|
+
"sha256": "10a6f71fcd8313b4d3afc72797027454ff45ae545dfd2bbd96cc0b4b97004517",
|
|
44
|
+
"binarySha256": "5978c56cb705eb1b449e59b772655aac2b3aa933da82e71ce28e7d6f7029e8ef"
|
|
17
45
|
},
|
|
18
46
|
"darwin-x64": {
|
|
19
|
-
"asset": "aistudio2api-v0.2.
|
|
20
|
-
"sha256": "
|
|
21
|
-
"binarySha256": "
|
|
47
|
+
"asset": "aistudio2api-v0.2.17-magpie.1-darwin-amd64.tar.gz",
|
|
48
|
+
"sha256": "44527571d9294db1451ebb215552a76f3836be9e3a1a5e5fd79bfc57ad6b9878",
|
|
49
|
+
"binarySha256": "f3b3d48094d1a7849c455b31487db5e4569de00124d092d1c639d63fb0162178"
|
|
22
50
|
},
|
|
23
51
|
"linux-x64": {
|
|
24
|
-
"asset": "aistudio2api-v0.2.
|
|
25
|
-
"sha256": "
|
|
26
|
-
"binarySha256": "
|
|
52
|
+
"asset": "aistudio2api-v0.2.17-magpie.1-linux-amd64.tar.gz",
|
|
53
|
+
"sha256": "47bc3922c54031435fc35914cf382d20a892ca0a2f4432eb0904677a57b002c0",
|
|
54
|
+
"binarySha256": "385b21e2d5905acb062a355ebf15c2db17492212a2ab93ef14da2f6acece96a1"
|
|
27
55
|
},
|
|
28
56
|
"linux-arm64": {
|
|
29
|
-
"asset": "aistudio2api-v0.2.
|
|
30
|
-
"sha256": "
|
|
31
|
-
"binarySha256": "
|
|
57
|
+
"asset": "aistudio2api-v0.2.17-magpie.1-linux-arm64.tar.gz",
|
|
58
|
+
"sha256": "689e7644c766a9da8d8a462752e2495bbc659484e65d280fcf7e6554c6ec17b7",
|
|
59
|
+
"binarySha256": "20971e5abe5eb27e7e91f1cc2b665c41cd07ad9e1e9a2aa2b8aa7f87a8f1ebe0"
|
|
32
60
|
},
|
|
33
61
|
"win32-x64": {
|
|
34
|
-
"asset": "aistudio2api-v0.2.
|
|
35
|
-
"sha256": "
|
|
36
|
-
"binarySha256": "
|
|
62
|
+
"asset": "aistudio2api-v0.2.17-magpie.1-windows-amd64.zip",
|
|
63
|
+
"sha256": "79f8372f81cbe93ad4e663e7a400989e9d55d57f25dd40ca47decfb838071980",
|
|
64
|
+
"binarySha256": "e05b28fee8a5130074e3e0c23514e3b6451ba1c938458ae63576ffc6d81746f5"
|
|
37
65
|
}
|
|
38
66
|
}
|
|
39
67
|
}
|
package/lib/studio.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeBaseURL, credentials, forward, makeOpenAIError, UNREACHABLE_HEADER } from './backend.mjs';
|
|
1
|
+
import { normalizeBaseURL, credentials, forward, makeOpenAIError, UNREACHABLE_HEADER, PLUGIN_ICON } from './backend.mjs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { localStudio, ensureStudio, studioAdmin, studioAccounts, studioProxy, studioCommand, validateProxy, isConnectRefused, PROXY_SOURCES, downloadProxy, redactProxy, studioDataDir, checkStudioHealth, setupStep, camoufoxState } from './studio-native.mjs';
|
|
4
4
|
import { openProgressPage } from './studio-page.mjs';
|
|
@@ -266,8 +266,11 @@ export async function listStudioModels(c, opts) {
|
|
|
266
266
|
|
|
267
267
|
const toolcall = Boolean(opts.allowTools && caps.function_declarations === true);
|
|
268
268
|
const reasoning = Boolean(caps.thinking === true || caps.thinking_level === true);
|
|
269
|
-
//
|
|
270
|
-
const
|
|
269
|
+
// Newer catalogs expose each model's supported levels; older external services do not.
|
|
270
|
+
const levels = Array.isArray(item.thinking_levels)
|
|
271
|
+
? item.thinking_levels.filter(level => ['minimal', 'low', 'medium', 'high'].includes(level))
|
|
272
|
+
: ['minimal', 'low', 'medium', 'high'];
|
|
273
|
+
const variants = caps.thinking_level === true ? Object.fromEntries(levels.map(level => [level, {}])) : {};
|
|
271
274
|
const image = Boolean(opts.allowImages && caps.media_resolution === true);
|
|
272
275
|
|
|
273
276
|
result[id] = {
|
|
@@ -660,16 +663,14 @@ export const AIStudioPlugin = async (_input, options = {}) => {
|
|
|
660
663
|
}
|
|
661
664
|
}
|
|
662
665
|
|
|
663
|
-
// setupNote
|
|
664
|
-
// open: the download (from GitHub, and on Windows not through the system proxy) shows nothing
|
|
665
|
-
// until it ends, which can take minutes.
|
|
666
|
+
// setupNote says a sign-in must set the service up first, which can take minutes.
|
|
666
667
|
function setupNote() {
|
|
667
668
|
let proxy = '';
|
|
668
669
|
try {
|
|
669
670
|
proxy = downloadProxy(studioDataDir(), opts.proxy);
|
|
670
671
|
} catch {}
|
|
671
|
-
const via = proxy ? `走代理 ${redactProxy(proxy)}` : '
|
|
672
|
-
return `本地 AI Studio 服务还没启动:要先启动它,第一次使用或插件更新后还要先从 GitHub 下载(约
|
|
672
|
+
const via = proxy ? `走代理 ${redactProxy(proxy)}` : '按 Magpie 的代理设置';
|
|
673
|
+
return `本地 AI Studio 服务还没启动:要先启动它,第一次使用或插件更新后还要先从 GitHub 下载(约 30 MB,${via}),可能要等几分钟。${SETUP_PROXY_HINT}\n`;
|
|
673
674
|
}
|
|
674
675
|
|
|
675
676
|
// addAccount signs a new Google account in through the service's own login window, setting the
|
|
@@ -745,6 +746,7 @@ export const AIStudioPlugin = async (_input, options = {}) => {
|
|
|
745
746
|
},
|
|
746
747
|
auth: {
|
|
747
748
|
provider: STUDIO_ID,
|
|
749
|
+
icon: PLUGIN_ICON,
|
|
748
750
|
maxConcurrency: 1,
|
|
749
751
|
methods: [
|
|
750
752
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magpie-gemini-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Gemini Web and Google AI Studio provider for Magpie, backed by gemini-web2api-go and AIStudio2API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
"scripts/studio-smoke.mjs",
|
|
27
27
|
"scripts/studio.mjs",
|
|
28
28
|
"scripts/studio-release.mjs",
|
|
29
|
+
"scripts/studio-pins.mjs",
|
|
29
30
|
"scripts/studio-archive.go",
|
|
31
|
+
"scripts/studio-regzip.go",
|
|
30
32
|
"scripts/studio-managed-smoke.mjs",
|
|
31
33
|
"patches/",
|
|
32
34
|
"native-task/lib/",
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
"native-task/LICENSE",
|
|
39
41
|
"README.md",
|
|
40
42
|
"README.en.md",
|
|
43
|
+
"docs/logo.svg",
|
|
41
44
|
"docs/backend-release.md",
|
|
42
45
|
"docs/studio-release.md",
|
|
43
46
|
"LICENSE",
|
|
@@ -50,7 +53,9 @@
|
|
|
50
53
|
"opencode",
|
|
51
54
|
"provider",
|
|
52
55
|
"gemini",
|
|
53
|
-
"gemini-web"
|
|
56
|
+
"gemini-web",
|
|
57
|
+
"ai-studio",
|
|
58
|
+
"google-ai-studio"
|
|
54
59
|
],
|
|
55
60
|
"engines": {
|
|
56
61
|
"node": ">=22"
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
"studio:smoke": "node scripts/studio-smoke.mjs"
|
|
78
83
|
},
|
|
79
84
|
"magpie": {
|
|
85
|
+
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIyIiB5MT0iMyIgeDI9IjIwIiB5Mj0iMjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjMDZCNkQ0Ii8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiMzQjgyRjYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM4QjVDRjYiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE0IiB5MT0iMiIgeDI9IjIyIiB5Mj0iMTAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjOEI1Q0Y2Ii8+PHN0b3Agb2Zmc2V0PSIxMD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