magpie-plugin-loomy-auth 0.1.12 → 0.1.14

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/NOTICE.md CHANGED
@@ -1,35 +1,35 @@
1
- # NOTICE
2
-
3
- 本插件的实现参考了以下来源。按各自的许可要求在此声明。
4
-
5
- ## magpie 插件契约
6
-
7
- - **yetone/magpie** — Copyright (c) 2026 yetone, MIT License
8
- - `src/pure.mjs` 里 `auth.usage` 的 windows 字段形状、`used` 的归一化行为、
9
- `aside` 的语义、签到 `outcome` 的合法值清单、`client.auth.set` 的整体替换
10
- (而非合并)语义,均取自 magpie 二进制内嵌的插件契约源码。
11
- - `free` 字段的判据取自其路由模式说明("Free first"):模型供应商是否
12
- **不消耗本订阅的额度或积分**。
13
-
14
- ## Loomy(讯飞)协议实现
15
-
16
- - **sucooer / anyaer 的 `magpie-plugin-loomy`**(`github.com/sucooer/magpie-plugins`, MIT)
17
- - `src/crypto.mjs` + `src/pure.mjs` 的 `signedHeaders`:账号接口的 HMAC-SHA1
18
- 待签串构造(9 段 `\n` 连接)、路径分段转义规则。
19
- - `src/desktop.mjs`:Loomy 桌面端登录态的 leveldb 读取方式(键名
20
- `loomy-auth-session`、追加写所以从后往前找)。
21
-
22
- - **agent2api**(`loomy/sign.rs`, `loomy/images.rs`)
23
- - deepseek 系模型只认 `<image_base64>` 标记、不认 `image_url` data URI 的结论,
24
- 以及把标记并入相邻 text 块的做法。
25
-
26
- ## 与上述实现的差异
27
-
28
- 本插件的额度上报口径与它们**不同**:市场现有实现不上报 `used`(或在拿不到上限时
29
- 上报 0),导致 magpie 把被蹬空的账号排在路由队首。本插件上报真实占比、把永久池
30
- 标为 `aside`、并在两池皆空时合成一条 `used: 100` 的参与路由窗口。
31
- 详见 README 的「这个插件修的是什么」。
32
-
33
- ## 本项目自身
34
-
35
- Copyright (c) 2026 MYCF711, MIT License(见 `LICENSE`)。
1
+ # NOTICE
2
+
3
+ 本插件的实现参考了以下来源。按各自的许可要求在此声明。
4
+
5
+ ## magpie 插件契约
6
+
7
+ - **yetone/magpie** — Copyright (c) 2026 yetone, MIT License
8
+ - `src/pure.mjs` 里 `auth.usage` 的 windows 字段形状、`used` 的归一化行为、
9
+ `aside` 的语义、签到 `outcome` 的合法值清单、`client.auth.set` 的整体替换
10
+ (而非合并)语义,均取自 magpie 二进制内嵌的插件契约源码。
11
+ - `free` 字段的判据取自其路由模式说明("Free first"):模型供应商是否
12
+ **不消耗本订阅的额度或积分**。
13
+
14
+ ## Loomy(讯飞)协议实现
15
+
16
+ - **sucooer / anyaer 的 `magpie-plugin-loomy`**(`github.com/sucooer/magpie-plugins`, MIT)
17
+ - `src/crypto.mjs` + `src/pure.mjs` 的 `signedHeaders`:账号接口的 HMAC-SHA1
18
+ 待签串构造(9 段 `\n` 连接)、路径分段转义规则。
19
+ - `src/desktop.mjs`:Loomy 桌面端登录态的 leveldb 读取方式(键名
20
+ `loomy-auth-session`、追加写所以从后往前找)。
21
+
22
+ - **agent2api**(`github.com/aimod-cc/agent2api`, 许可未核实;`loomy/sign.rs`, `loomy/images.rs`)
23
+ - deepseek 系模型只认 `<image_base64>` 标记、不认 `image_url` data URI 的结论,
24
+ 以及把标记并入相邻 text 块的做法。
25
+
26
+ ## 与上述实现的差异
27
+
28
+ 本插件的额度上报口径与它们**不同**:市场现有实现不上报 `used`(或在拿不到上限时
29
+ 上报 0),导致 magpie 把被蹬空的账号排在路由队首。本插件上报真实占比、把永久池
30
+ 标为 `aside`、并在两池皆空时合成一条 `used: 100` 的参与路由窗口。
31
+ 判据与实测见 [`docs/internals.md`](docs/internals.md) 的「这个插件修的是什么」。
32
+
33
+ ## 本项目自身
34
+
35
+ Copyright (c) 2026 MYCF711, MIT License(见 `LICENSE`)。
package/README.md CHANGED
@@ -102,6 +102,18 @@ magpie plugin list
102
102
 
103
103
  ---
104
104
 
105
+ ## 参考源
106
+
107
+ 本插件的协议实现参考了这几处,按各自许可在此声明(完整版权声明见 [`NOTICE.md`](NOTICE.md)):
108
+
109
+ | 来源 | 用在哪 |
110
+ |---|---|
111
+ | [yetone/magpie](https://github.com/yetone/magpie)(MIT) | 插件契约:`usage` 窗口字段、`used` 归一化、`aside` 语义、签到 outcome 清单、`free` 判据 |
112
+ | [sucooer/magpie-plugins](https://github.com/sucooer/magpie-plugins)(MIT) | 账号接口的 HMAC-SHA1 签名构造、桌面端登录态(leveldb)读取方式 |
113
+ | [agent2api](https://github.com/aimod-cc/agent2api) | deepseek 系模型只认 `<image_base64>` 标记、不认 `image_url` 的结论 |
114
+
115
+ ---
116
+
105
117
  ## 许可
106
118
 
107
119
  MIT。
Binary file
package/package.json CHANGED
@@ -1,44 +1,46 @@
1
- {
2
- "name": "magpie-plugin-loomy-auth",
3
- "version": "0.1.12",
4
- "description": "Loomy (iFlytek) for magpie: desktop-session import / SMS / session sign-in, live model catalog with reasoning efforts, chat with tools and images, and the two credit pools reported as the host routes them — the daily pool counts, the permanent one is shown aside.",
5
- "type": "module",
6
- "main": "./index.mjs",
7
- "exports": "./index.mjs",
8
- "files": [
9
- "index.mjs",
10
- "src",
11
- "docs",
12
- "README.md",
13
- "NOTICE.md",
14
- "LICENSE"
15
- ],
16
- "keywords": [
17
- "magpie",
18
- "magpie-plugin",
19
- "opencode",
20
- "opencode-plugin",
21
- "opencode-auth",
22
- "loomy",
23
- "xunfei",
24
- "iflytek"
25
- ],
26
- "license": "MIT",
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/MYCF711/magpie-loomy-auth.git"
30
- },
31
- "engines": {
32
- "node": "^22.19.0 || >=24.0.0"
33
- },
34
- "scripts": {
35
- "test": "node --test tests/"
36
- },
37
- "magpie": {
38
- "maxConcurrency": 4
39
- },
40
- "bugs": {
41
- "url": "https://github.com/MYCF711/magpie-loomy-auth/issues"
42
- },
43
- "homepage": "https://github.com/MYCF711/magpie-loomy-auth#readme"
44
- }
1
+ {
2
+ "name": "magpie-plugin-loomy-auth",
3
+ "version": "0.1.14",
4
+ "description": "Loomy (iFlytek) for magpie: desktop-session import / SMS / session sign-in, live model catalog with reasoning efforts, chat with tools and images, and the two credit pools reported as the host routes them — the daily pool counts, the permanent one is shown aside.",
5
+ "type": "module",
6
+ "main": "./index.mjs",
7
+ "exports": "./index.mjs",
8
+ "files": [
9
+ "index.mjs",
10
+ "src",
11
+ "docs",
12
+ "README.md",
13
+ "NOTICE.md",
14
+ "LICENSE",
15
+ "assets"
16
+ ],
17
+ "keywords": [
18
+ "magpie",
19
+ "magpie-plugin",
20
+ "opencode",
21
+ "opencode-plugin",
22
+ "opencode-auth",
23
+ "loomy",
24
+ "xunfei",
25
+ "iflytek"
26
+ ],
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/MYCF711/magpie-loomy-auth.git"
31
+ },
32
+ "engines": {
33
+ "node": "^22.19.0 || >=24.0.0"
34
+ },
35
+ "scripts": {
36
+ "test": "node --test tests/"
37
+ },
38
+ "magpie": {
39
+ "icon": "https://raw.githubusercontent.com/MYCF711/magpie-loomy-auth/main/assets/icon.png",
40
+ "maxConcurrency": 4
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/MYCF711/magpie-loomy-auth/issues"
44
+ },
45
+ "homepage": "https://github.com/MYCF711/magpie-loomy-auth#readme"
46
+ }