dsh-xdpool 2.5.0 → 2.6.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/CHANGELOG.md +158 -0
- package/README.en.md +18 -4
- package/README.md +19 -5
- package/assets/community-qr-qq.jpg +0 -0
- package/assets/community-qr-wechat.jpg +0 -0
- package/cordis.patch.yml +17 -41
- package/lib/bin.js +604 -87
- package/lib/client.js +1227 -891
- package/lib/index.d.ts +430 -143
- package/lib/index.js +2388 -1361
- package/package.json +1 -4
- package/vendor/channel-pack/pack.js +222 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,163 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
本项目的所有重要变更都会记录在此文件。
|
|
3
3
|
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
|
+
## 2.6.0 — 一次收掉 2.5.1 之后的全部改动
|
|
5
|
+
|
|
6
|
+
> 本版把 2.5.2 到 2.5.6 的五个小版本合并发布。内容分四块:**群反馈的五处界面问题**、**八项借鉴来的功能**、**CodeArts 403 那四个缺陷**、以及**路由与看板的一次结构升级**。另外收掉了我自己在修补过程中引入的三处错误(lane 选择极性反转、两套 tsconfig 判据不一、`source` 变量在死区被读取)。
|
|
7
|
+
|
|
8
|
+
### 一、群里反馈的五处
|
|
9
|
+
|
|
10
|
+
**「重启后模型选择变成 1/14」——不是丢了,是名册短了**
|
|
11
|
+
|
|
12
|
+
保存的选择一直完好。真正发生的是目录刷新那一次网关只回了 14 个模型,用户存的 5 个里只有 1 个在其中,界面只显示 `已启用 1 / 14`,看起来就像被重置。现在多一行 `另有 N 个已保存的模型当前未提供`,悬停列出具体 id —— 两个数字都对,不一致本身就是信息,以前这条信息不可见。
|
|
13
|
+
|
|
14
|
+
**「点了咋没起作用,实际都续在后面」——面板改成手风琴**
|
|
15
|
+
|
|
16
|
+
账号列表是一账号一行、模型列表是一模型一卡,两个同时展开会把第二个顶到屏外。现在同一张卡内一次只开一个面板,跨卡仍然独立。模型列表也默认只显示已启用的行,其余收进 `显示其余 N 个`。
|
|
17
|
+
|
|
18
|
+
**「OpenCode Free 关不掉,应该默认关闭」**
|
|
19
|
+
|
|
20
|
+
免密 lane(`free:` 模型)原本无条件注册,而聚合总开关管不到它 —— 它压根不是聚合 provider,所以没有任何 UI 能关。新增 `freeLane` 开关,**默认关**;关闭时 `current()` 返回空,`allRows()` 保留花名册给需要解释它的页面。这样「关掉」是选择,不是抹除。
|
|
21
|
+
|
|
22
|
+
**「移出账号后又被加回来」/「账号使用方式只有 WorkBuddy 有」**
|
|
23
|
+
|
|
24
|
+
忽略名单的持久化与扫描闸门补齐;「账号使用方式」扩展为可作用于第三方渠道的多 Key 分配(见第二节)。
|
|
25
|
+
|
|
26
|
+
### 二、八项借鉴来的功能
|
|
27
|
+
|
|
28
|
+
**A. 同模型多线路优先** —— 限流时正确动作通常是**换线路拿同一个模型**,而不是换模型(换模型会改上下文窗口、工具调用、文风)。注册表里 86 个模型 id 挂在 2 家以上,`siblingRoutes` 从目录推导出来。
|
|
29
|
+
|
|
30
|
+
**B. 熔断 + 探测复活** —— 登录被拒后的冷却时长是猜的,两头都容易错。现在每轮运行对坐冷账号做一次廉价鉴权读,**只有探测成功才解除**,失败则冷却原样留着 —— 否则探测频率会改变账号被关多久。
|
|
31
|
+
|
|
32
|
+
**C. 签到先读状态** —— 领取接口幂等,旧代码靠「故意触发错误再翻译成成功」工作。改成先 GET 状态,常见情况连写请求都不发。状态读失败时回落旧行为。
|
|
33
|
+
|
|
34
|
+
**D. 兜底模型表不再带价格** —— 几个月前抓的倍率会让人按错数字做预算,`multiplier: 0` 还会点亮「免费」徽章让结束的促销继续宣称免费。促销徽章一并删掉;`undefined` 才是诚实的。
|
|
35
|
+
|
|
36
|
+
**E. 凭据文件收成仅本人可读** —— 每个密文原本走裸 `writeFile`,POSIX 上通常是 `0644`(同机其他用户可读,而里面是明文 token)。权限在写临时文件时打上,原子重命名带过去。Windows 的缺口写在注释里而非藏起来。
|
|
37
|
+
|
|
38
|
+
**F. 自动化逐条状态** —— `detail` 是自由文本,所以「0 条已领」在三种情况下长得一样。现在每个任务给出 `已领/早已领过/暂不可领/失败`,卡片渲染成四枚状态标签。
|
|
39
|
+
|
|
40
|
+
**G. 自定义 OpenAI 兼容端点** —— 一个注册表位置 `custom_openai`,**baseUrl 与模型列表都为空**:vLLM、LiteLLM、one-api、自建网关都行。不给默认 URL,因为猜一个会把请求发到用户没选过的地方。
|
|
41
|
+
|
|
42
|
+
**H. 自动化够到以前够不到的任务** —— deeplink 里没有 `expertId` 时按标题去市场查(多个匹配就拒绝,召唤错专家照样 0 分);账号资格从「global 一律不做」改成**按 job 分级**,签到会跑 global。
|
|
43
|
+
|
|
44
|
+
### 三、CodeArts 403:四个缺陷
|
|
45
|
+
|
|
46
|
+
网友的报告带了完整对照实验。四个都修了:
|
|
47
|
+
|
|
48
|
+
1. **真因是 User-Agent** —— `attributionHeaders()` 盖上宿主 bot UA,snap-access 网关对它直接回 `403 TM.00000001`。同凭证、同 body、同接口:bot UA→403,不设 UA→200,IDE 形状的 UA→200。现在请求显式设自己的 UA,其余 attribution 头保留。
|
|
49
|
+
2. **403 被归成 `AUTH`** —— 网关所有 IAM 拒绝实测都是 401 `APIG.0301`;唯一的 403 是 WAF 判定。卡片把 `AUTH` 渲染成「API 密钥无效」,于是一个请求头问题被报成凭据问题。现在 403 按 body 判。
|
|
50
|
+
3. **鉴权失败不换号** —— 原分支只 `refresh()` 当前账号,池里两个账号时一个被拒就整平台失败。现在也轮询,每个账号只试一次。
|
|
51
|
+
4. **报错丢掉上游 body** —— 原来只剩 `HTTP 403`。现在附上 `errorDetail`(截 200 字)。
|
|
52
|
+
|
|
53
|
+
范围是刻意的:`401 || 403 → AUTH` 在 pack 里出现 11 次、分属 6 个适配器,而对多数厂商 403 确实是凭据问题。只有 CodeArts 实测过,所以只改它那两处,测试断言其余 9 处不变。
|
|
54
|
+
|
|
55
|
+
### 四、路由与看板的结构升级
|
|
56
|
+
|
|
57
|
+
**路由改成两级(平台 → 模型)**
|
|
58
|
+
|
|
59
|
+
一条链现在是 `platforms: [{ owner, models[] }]`,界面就是它的样子:折叠态每平台一枚胶囊(`1. TRAE(字节)· 1`),展开态每平台一张卡(上移/下移/移除 + 卡内模型列表 + 只列本平台模型的下拉)。
|
|
60
|
+
|
|
61
|
+
这里有个必须处理的陷阱:**分组对交错链是有损的**。`hy3 → opencode/x → glm-5.3` 按 owner 分组后两个池模型并到一起,顺序被改 —— 也就是路由优先级被改了。所以草稿同时持有 `flat`(服务端给的原始序列)和 `platforms`,**只有真正编辑了平台结构才重算 `flat`**。打开一条链直接保存,顺序一个字节都不变。
|
|
62
|
+
|
|
63
|
+
**路由能选到扫码登录渠道**
|
|
64
|
+
|
|
65
|
+
之前候选只来自本插件自己的两个目录(池名册 + 聚合注册表),而扫码登录渠道是宿主注册的 provider,两个都没有 —— 所以只有一行。现在接上宿主渠道,成员 id 形式 `<channel>:<model>`,执行走 shim 本来就有第五条 lane。`host` 与 `aggregate` 严格分开(凭据、错误词汇、代码路径都不同)。
|
|
66
|
+
|
|
67
|
+
**看板认得渠道了**
|
|
68
|
+
|
|
69
|
+
`UsageCall` 原本只有 `region`(cn/global),而这是池专有属性,所以每行都写「国内版」。现在 `channel` 进了 `UsageCall` **并进了两个聚合表的分组键** —— 同一模型 id 可挂多家,混成一行会把一家 token 记到另一家头上。三张表首列都改成渠道。
|
|
70
|
+
|
|
71
|
+
**聚合渠道支持多把 Key**
|
|
72
|
+
|
|
73
|
+
`ProviderSetting.apiKeys` + `distribution`;`appendApiKey` 是**指令**而非存储字段(读取路由从不回显 Key,只报 `keyCount`,所以浏览器发整份列表只能用占位符拼,会把看不见的 Key 冲掉)。轮转只对「这把 Key 的问题」重试(429/401),400/404/402/5xx 换 Key 只会倍增等待。策略控件**只在 `keyCount > 1` 时出现** —— 一把 Key 时它是个只有一个选项的开关。
|
|
74
|
+
|
|
75
|
+
### 五、我引入并修掉的三处
|
|
76
|
+
|
|
77
|
+
**lane 选择极性反转** —— `laneAllowedIds` 返回白名单,而调用点当黑名单用,于是勾 3/16 露出的是另外 13 个。这段代码从 2.5.0 起就是反的,只因当时 lane 没有发布选择(`allow === undefined` 短路)而一直没显形。修正为对着名册取补集。
|
|
78
|
+
|
|
79
|
+
**两套 tsconfig 判据不一** —— host 没开 `exactOptionalPropertyTypes`,client 开了,且 TypeScript 会顺 import 把 host 文件拉进 client 程序,于是同一文件「一套配置绿、另一套红」。现在两边都开,9 处一并修好(其中 3 处顺带暴露了真实的重复计算)。
|
|
80
|
+
|
|
81
|
+
**`source` 在死区被读取** —— 上一版给 10 个调用点一刀切加 `, source`,但 5 个适配器的名册变量叫 `all`,另有 1 个声明在调用之后。thunk 只延后一次调用、不延后一行,所以那一处改成了局部换序。改写脚本改为逐行扫描 + 每步断言。
|
|
82
|
+
|
|
83
|
+
### 六、其它
|
|
84
|
+
|
|
85
|
+
- 看板数字列的表头与数据对齐(`.dsm-xdpool-table th` 优先级高于 `.dsm-xdpool-num`,表头一直左对齐)
|
|
86
|
+
- 链成员有了 180 秒自己的超时(调用方 signal 只覆盖「用户取消」,不覆盖「供应商攥着连接不放」)
|
|
87
|
+
- `REASON_STATUS` 表:cooling/session_dead/reserve/disabled/empty 各有状态码,不再一律 401
|
|
88
|
+
- 过期不再显示成「长期有效」,单位降到小时/分钟
|
|
89
|
+
- 渠道池 `provider.status` 加 30 秒缓存(一次请求数 13 个渠道的账号,成本是十三个的和)
|
|
90
|
+
- 交流群弹窗改成双码(微信机器人 + QQ 群),README 顶部同步;README 下载徽章改读新包实时统计
|
|
91
|
+
- 链的每次跳过记录 `成员 → 原因 (状态码)`,全败时把整条轨迹写进错误消息
|
|
92
|
+
- 按渠道分组的下拉、同模型线路按钮在两级结构落地后移除(分组已结构化,再套一层 optgroup 是把卡片说过的话再说一遍)
|
|
93
|
+
|
|
94
|
+
## 2.5.1 — 六张 issue、一个交流群入口,外加拿掉 billion-context
|
|
95
|
+
|
|
96
|
+
> 2.5.0 之后收到的反馈集中在两类:**看得见却点不动的界面**(链不显示、单选互顶、卡片空白),和**说错话的报错**(额度已用尽、密钥无效、为预留让你调低预留)。这一版把这两类都按「根因 + 可复现断言」的方式收掉,同时按你的要求移除了 billion-context 那一页,并在「点Star」旁边加了「交流群」。
|
|
97
|
+
|
|
98
|
+
### 修掉六张 issue
|
|
99
|
+
|
|
100
|
+
**#99 路由页有链却不显示,保存还会把链删掉**
|
|
101
|
+
|
|
102
|
+
`setDrafts(prev => seeded.current ? prev : …)` 把守卫放进了函数式更新回调,紧接着一行同步 `seeded.current = true`。React 的回调在提交阶段才跑,那时标志位已经是 `true`,于是恒走 `prev` 分支 —— 初始值 `[]` 原样返回。列表恒空,而保存提交的是整张表,**第一次保存就把服务端那条链覆盖成空**。
|
|
103
|
+
|
|
104
|
+
改成同步判断再置位(与同项目 `GatewayPage.tsx` 同形)。回归用例现在连「形状」一起锁:不许再出现 `setDrafts(prev => seeded …)`。
|
|
105
|
+
|
|
106
|
+
**#101 国内版/国际版的「1M」互相顶掉**
|
|
107
|
+
|
|
108
|
+
两张区域卡同时挂载(折叠面板用 `hidden`,不是卸载),预算单选 `name` 只用了 `budget-${model.id}`,同名即同组,浏览器只保留最后一个 `checked`。后渲染的国际版把国内版的黑点顶掉,表现为「点了没保存」。用 `useId()` 给每一行实例加作用域 —— 只加 region 不够,设置页与侧栏可能同时挂载同一区域。
|
|
109
|
+
|
|
110
|
+
**#102 切回账号池就重拉全部数据(2–4 秒空白)**
|
|
111
|
+
|
|
112
|
+
页签正文是三选一表达式,切页即卸载,`useState` 随之清零;而且 `load()` 把 `account.list` / `model.list` / `credits.balances` / `credits.status` 四合一一 `await Promise.all`,让整张卡等唯一走网络的余额查询。
|
|
113
|
+
|
|
114
|
+
- 快照提到模块作用域,且**写在 `mountedRef` 判据之前**:已经发出去的结果即便在卸载后才回来,仍然落进快照
|
|
115
|
+
- 拆两波:wave1 只问内存里的三项,先把卡画全(余额格写 `…`);wave2 每渠道各自回填
|
|
116
|
+
- `balancePending` 原来被硬编成 `false`,让渲染层那条 `…` 分支成了死代码 —— 现在真正用上了
|
|
117
|
+
- 每次加载带单调序号,旧答案盖不掉新答案
|
|
118
|
+
|
|
119
|
+
**#95 扫码渠道卡整片空白,且不报错**
|
|
120
|
+
|
|
121
|
+
`if (entries.length === 0 && error === undefined) return <></>`。而 RPC 桥解析失败时 `provider.status` 回 `ok: false`、映射出空 map、`entries` 为空、`error` 仍是 `undefined` —— **「桥断了」和「没有扫码账号」渲染成同一片空气**。
|
|
122
|
+
|
|
123
|
+
改成三态:读取中一行字、失败写明原因、成功但确实没有账号才保持安静。
|
|
124
|
+
|
|
125
|
+
**#98 自动化三处**
|
|
126
|
+
|
|
127
|
+
- 「体验XX专家」任务族(`expert_use_maidehao` / `douyinyin` / `shangjia_xuanchuan` / `bowangwang`,加同族的 `WorkBuddy_Valorant`)不在 `EVENT_CHAIN_BUILDERS` 里,所以 accept 和 claim 都正常、进度永远 0/1。这批专家**不在市场列表里**,expertId 只存在于任务自己的 `jump_url` 里(percent-encoded deeplink),因此新增 `expertIdFromJumpUrl()`:先解 `deeplink` 参数、再读内层 `expertId`。use 事件保持默认 `craft` 模式 —— `LOCAL`/零成本是 lighthouse 的专属判据。
|
|
128
|
+
- `unavailableReason()` 遇到第一个低于预留的账号就 `return reserve`,后面账号根本没检查。一张 5 账号池里只要有一个长期低于预留线,任何失败都会被归因成 402「调低预留」。改为计数式:`dead`/`cooling`/`disabled` 先报(这些改数字改不好),只有**无可用账号且全部被预留挡住**才报 `reserve`。
|
|
129
|
+
- `automationEarnings` 写入是 fire-and-forget,领取完成到进程退出的窗口里丢账(实测领了 21 个任务,落盘仍是 `credit: 0`)。`persistEarnings()` 改为返回 promise,`runJob` 收尾 `await this.flushEarnings()`。
|
|
130
|
+
|
|
131
|
+
**#96 免密 lane 全失败,却报「额度已用尽」**
|
|
132
|
+
|
|
133
|
+
403 指纹拒绝被渲染成宿主自己的措辞,指向「等待」;真正该做的是「升级插件」。新增 `withFreeTierHint()`:先说指纹失配、明确「等待无用,请更新」,再保留 per-conversation 配额这一可能(两者从外部无法区分,不自作聪明)。429 仍走原有的会话配额提示。
|
|
134
|
+
|
|
135
|
+
### 新增:「交流群」
|
|
136
|
+
|
|
137
|
+
- 卡片右上角「点Star」旁边多一个「交流群」按钮,点开在原位弹层显示微信群码
|
|
138
|
+
- 底部导航网格从 `1fr auto` 扩成 `1fr auto auto`,否则第二个按钮会掉到标签栏下面
|
|
139
|
+
- 二维码以 data URI 内嵌进 `lib/client.js`:客户端是宿主加载的单个脚本,解析不了包内相对路径,而 `<img>` 加载失败是**静默**的
|
|
140
|
+
- Esc 与点击遮罩都能关;`alt` 写的是操作指引(读屏用户扫不了码)
|
|
141
|
+
- 同一张图放在 `README.md` 与 `README.en.md` 第 13 行(标题与徽章之后),过期了换 `assets/community-qr.png` 并重跑 `tools/make-community-qr.mjs`
|
|
142
|
+
|
|
143
|
+
### 移除:billion-context
|
|
144
|
+
|
|
145
|
+
那一页只读观测另一个插件的回环代理。连同 `src/billion.ts`、`src/billion-mount.ts`、`src/client/BillionPage.tsx`、`/plugins/dsh-xdpool/billion` 路由、`POOL_BILLION_PATH` 与两个文档类型、84 个 `billion.*`/`shell.tabBillion` 语言键、`BILLION_CARD_CSS`、`optionalDependencies.billion-context`,以及 `cordis.patch.yml` 里那行长期 `disabled: true` 的条目一起删掉。README 的页面表随之从七页改回六页。
|
|
146
|
+
|
|
147
|
+
### 一并发布的两个既有改动
|
|
148
|
+
|
|
149
|
+
- **CodeArts 的输出上限是上限,不是默认值** —— `listModels()` 报 `maxTokens`、`resolveModel()` 报 `defaultMaxTokens`、线上 `max_tokens` 做 `Math.min` clamp。原先 `?? 65536` 只兜底不设界,宿主把别的 provider 的 384000 原样递过来就触发 HTTP-200 的 SSE 错误帧。见 #83 / #69。
|
|
150
|
+
- **第三条内容指纹** —— 「Relative paths resolve from the workspace root」改成过去分词形式,池车道与渠道车道同步。见 #77 / #79。
|
|
151
|
+
|
|
152
|
+
### 验证
|
|
153
|
+
|
|
154
|
+
- 全套 **83 文件 1057 用例全绿**;host 侧 `tsc --noEmit` 干净
|
|
155
|
+
- 新增 6 个测试文件:`billion-removed` / `card-shell`(交流群)/ `channel-pool-loading` / `expert-task-family` / `free-lane-refusal` / `reserve-floor-scope`
|
|
156
|
+
- 交互验证不只做源码断言:`tools/probe-card-render.mjs` 用最小 hook 调度器驱动真实 `PoolShell`,完成「点击 → 重渲染 → 弹层出现 → 二维码 8666 字符 data URI → 遮罩关闭」整条链路
|
|
157
|
+
|
|
158
|
+
Refs #95 #96 #98 #99 #101 #102。
|
|
159
|
+
|
|
160
|
+
## 附:CodeArts 的输出上限是上限,不是默认值(细节,已并入 2.5.1)
|
|
4
161
|
|
|
5
162
|
## 2.5.0 — 十张 issue 一起收:失效账号、第三条指纹、CodeArts 上限、保存回滚、侧栏开关
|
|
6
163
|
|
|
@@ -109,6 +266,7 @@ TRAE 与 Cline 早就这么做了(`clampTraeMaxTokens` / `clampClineMaxTokens`
|
|
|
109
266
|
|
|
110
267
|
Refs #83, #69。
|
|
111
268
|
|
|
269
|
+
## 附:第三条内容指纹 —— 文件引用指引里的 “resolve from the workspace root”(细节,已并入 2.5.1)
|
|
112
270
|
### 详情:第三条内容指纹:文件引用指引里的 “resolve from the workspace root”
|
|
113
271
|
|
|
114
272
|
> 2.4.1/2.4.2 修好的两个指纹管了一周,10 月 28 日又整片 400/11128。这次被点名的不是产品名,而是一句普通说明。
|
package/README.en.md
CHANGED
|
@@ -2,13 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://www.npmjs.com/package/dsh-xdpool"><img src="https://img.shields.io/npm/v/dsh-xdpool?style=flat-square&label=npm&color=cb3837" alt="npm version"></a>
|
|
5
|
-
<a href="https://www.npmjs.com/package/dsh-
|
|
5
|
+
<a href="https://www.npmjs.com/package/dsh-xdpool"><img src="https://img.shields.io/npm/dm/dsh-xdpool?style=flat-square&label=downloads&color=cb3837" alt="npm downloads"></a>
|
|
6
6
|
<a href="LICENSE"><img src="https://img.shields.io/github/license/XDTrees/dsh-xdpool?style=flat-square" alt="MIT license"></a>
|
|
7
7
|
<a href="https://github.com/XDTrees/dsh-xdpool/stargazers"><img src="https://img.shields.io/github/stars/XDTrees/dsh-xdpool?style=flat-square" alt="GitHub stars"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
+
## Join the group
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="assets/community-qr-wechat.jpg" width="240" alt="WeChat bot code: scan to add the bot, then send XD to be pulled into the group">
|
|
14
|
+
|
|
15
|
+
<img src="assets/community-qr-qq.jpg" width="240" alt="QQ group code: scan it to join the XD community group">
|
|
16
|
+
<br>
|
|
17
|
+
<b>Left: WeChat (bot)</b> — scanning only adds the bot. <b>Send “XD”</b> and it pulls you into the group; scanning alone does nothing.<br>
|
|
18
|
+
<b>Right: QQ group</b> — scan and you are in. Group number 1103463688.
|
|
19
|
+
<br>
|
|
20
|
+
<sub>Both groups are live; use whichever you prefer. If a code stops working, say so in <a href="https://github.com/XDTrees/dsh-xdpool/issues">issues</a> and it will be refreshed.</sub>
|
|
21
|
+
<br>
|
|
22
|
+
<sub>The 交流群 button next to “Star” in the card's top-right corner opens these same two codes — no need to come back to the README.</sub>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
10
25
|
<p align="center">
|
|
11
|
-
<sub>
|
|
26
|
+
<sub>The downloads badge reads <code>dsh-xdpool</code>'s own live npm stats now, not the pre-rename snapshot.</sub>
|
|
12
27
|
</p>
|
|
13
28
|
|
|
14
29
|
English | [中文](./README.md)
|
|
@@ -17,7 +32,7 @@ English | [中文](./README.md)
|
|
|
17
32
|
|
|
18
33
|
It started as one thing: every account you've signed into the WorkBuddy desktop app, merged into one auto-failing-over pool. An account gets rate-limited or runs out of credits, and the request moves to the next one that works. No picking favourites, no manual import.
|
|
19
34
|
|
|
20
|
-
Then it grew into
|
|
35
|
+
Then it grew into six pages. Beyond the account pool: sign in to thirteen vendors' free models by web or QR, aggregate **76 vendors'** free quotas into one lane, read a usage ledger, chain models together, and expose the pool as a local OpenAI-compatible gateway.
|
|
21
36
|
|
|
22
37
|
| Page | What it does |
|
|
23
38
|
| --- | --- |
|
|
@@ -25,7 +40,6 @@ Then it grew into seven pages. Beyond the account pool: sign in to thirteen vend
|
|
|
25
40
|
| **Login channels** | Thirteen vendors that sign in by web or QR — once, and their free models join the picker |
|
|
26
41
|
| **Aggregate** | 76 vendors' free quotas into one pool (none on by default; a vendor lights up when it has a key) |
|
|
27
42
|
| **Dashboard** | Today's turns, calls, failures, failover rescues, tokens, cache hits, speed |
|
|
28
|
-
| **billion-context** | Read-only view of the local billion-context compressor |
|
|
29
43
|
| **Routing** | Chain several models, in order or round-robin |
|
|
30
44
|
| **Gateway** | Expose the pool as a local OpenAI-compatible endpoint, optionally to your LAN |
|
|
31
45
|
|
package/README.md
CHANGED
|
@@ -2,13 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://www.npmjs.com/package/dsh-xdpool"><img src="https://img.shields.io/npm/v/dsh-xdpool?style=flat-square&label=npm&color=cb3837" alt="npm version"></a>
|
|
5
|
-
<a href="https://www.npmjs.com/package/dsh-
|
|
5
|
+
<a href="https://www.npmjs.com/package/dsh-xdpool"><img src="https://img.shields.io/npm/dm/dsh-xdpool?style=flat-square&label=downloads&color=cb3837" alt="npm downloads"></a>
|
|
6
6
|
<a href="LICENSE"><img src="https://img.shields.io/github/license/XDTrees/dsh-xdpool?style=flat-square" alt="MIT license"></a>
|
|
7
7
|
<a href="https://github.com/XDTrees/dsh-xdpool/stargazers"><img src="https://img.shields.io/github/stars/XDTrees/dsh-xdpool?style=flat-square" alt="GitHub stars"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
+
## 先加群
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="assets/community-qr-wechat.jpg" width="240" alt="微信机器人二维码:扫码添加后发送 XD 拉你进群">
|
|
14
|
+
|
|
15
|
+
<img src="assets/community-qr-qq.jpg" width="240" alt="QQ 群二维码:直接扫码加入 XD 交流群">
|
|
16
|
+
<br>
|
|
17
|
+
<b>左:微信(机器人)</b> —— 扫码添加机器人后<b>发送「XD」</b>,它才会拉你进群;只扫码不加不发是不会有反应的。<br>
|
|
18
|
+
<b>右:QQ 群</b> —— 直接扫码即可加入,群号 1103463688。
|
|
19
|
+
<br>
|
|
20
|
+
<sub>两个群都在,哪个方便用哪个。二维码失效了在 <a href="https://github.com/XDTrees/dsh-xdpool/issues">issues</a> 说一声会换新。</sub>
|
|
21
|
+
<br>
|
|
22
|
+
<sub>卡片右上角「点Star」旁边的「交流群」按钮打开的是同样这两张码 —— 不用回头找 README。</sub>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
10
25
|
<p align="center">
|
|
11
|
-
<sub
|
|
26
|
+
<sub>下载量徽章读的是 npm 上 <code>dsh-xdpool</code> 自己的实时统计,不再是改名前的快照。</sub>
|
|
12
27
|
</p>
|
|
13
28
|
|
|
14
29
|
[English](./README.en.md) | 中文
|
|
@@ -17,7 +32,7 @@
|
|
|
17
32
|
|
|
18
33
|
它从一件事开始——把本机 WorkBuddy 桌面 App 里登录过的**所有账号**合成一个自动容错的池子,哪个号被限流了、积分用光了,请求自动换到下一个能用的号上去。你不用挑号,不用手动导入。
|
|
19
34
|
|
|
20
|
-
|
|
35
|
+
然后它长成了六页:账号池之外,还能扫码登录十三家厂商的免费模型、把 **76 家**厂商的免费额度聚合成一条通道、看用量账本、把几个模型串成链、把池子开成一个本地 OpenAI 兼容网关。
|
|
21
36
|
|
|
22
37
|
| 页面 | 干什么 |
|
|
23
38
|
| --- | --- |
|
|
@@ -25,7 +40,6 @@
|
|
|
25
40
|
| **扫码登录** | 十三家支持网页 / 扫码登录的厂商,登一次,它们的免费模型就进选择器 |
|
|
26
41
|
| **聚合渠道** | 76 家厂商的免费额度接进同一个池(默认一家都不开,填了 key 才亮) |
|
|
27
42
|
| **数据看板** | 今天的轮次、调用、失败、换号救回、token、缓存命中、速度 |
|
|
28
|
-
| **billion-context** | 只读观测本机 billion-context 压缩器的运行状态 |
|
|
29
43
|
| **路由** | 把多个模型串成一条链,按顺序或轮换使用 |
|
|
30
44
|
| **网关** | 把池子开成本地 OpenAI 兼容接口,可转发给局域网其它设备 |
|
|
31
45
|
|
|
@@ -38,7 +52,7 @@
|
|
|
38
52
|
|
|
39
53
|
## 先看几张图
|
|
40
54
|
|
|
41
|
-
**账号池(卡片首页:品牌栏 +
|
|
55
|
+
**账号池(卡片首页:品牌栏 + 六个页面标签,顶部就是用量)**
|
|
42
56
|
|
|
43
57
|

|
|
44
58
|
|
|
Binary file
|
|
Binary file
|
package/cordis.patch.yml
CHANGED
|
@@ -4,45 +4,21 @@
|
|
|
4
4
|
- insert:
|
|
5
5
|
- id: llm-xdpool
|
|
6
6
|
name: dsh-xdpool
|
|
7
|
-
# billion-context is deliberately NOT mounted by this layer.
|
|
8
7
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
# in
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
# 1. Addressability. `disabled: true` keeps the row's id resolvable, so a
|
|
27
|
-
# profile that wants to flip it on can do so with one edit instead of
|
|
28
|
-
# inventing a row.
|
|
29
|
-
# 2. It states the decision where the old attempt lived, where the next person
|
|
30
|
-
# to wonder "why doesn't the pool bring up the compressor?" will look.
|
|
31
|
-
# 3. It keeps `bili-native` (billion-context's own row) as the ONLY mount of
|
|
32
|
-
# that module, which is the arrangement that actually works.
|
|
33
|
-
#
|
|
34
|
-
# CONSEQUENCE, STATED PLAINLY
|
|
35
|
-
#
|
|
36
|
-
# A profile that has not installed billion-context sees the billion card report
|
|
37
|
-
# "not installed". That is the honest reading of the facts, and it is already a
|
|
38
|
-
# first-class state on that page — the page distinguishes not-installed from
|
|
39
|
-
# no-answer from ready precisely so this case reads as information rather than
|
|
40
|
-
# as a bug. Installing billion-context remains a decision the user makes; the
|
|
41
|
-
# pool no longer makes it for them.
|
|
42
|
-
#
|
|
43
|
-
# `src/billion-mount.ts` no longer calls `create()` for the same reason: with
|
|
44
|
-
# this row disabled, a runtime create would fight the very row it sits beside.
|
|
45
|
-
# The function still runs — it is what lets the card distinguish
|
|
46
|
-
# already-installed from not-installed — it just never mounts anything.
|
|
47
|
-
- id: billion-context-xdpool
|
|
48
|
-
disabled: true
|
|
8
|
+
# billion-context is gone from this plugin, and so is the row that used to sit
|
|
9
|
+
# here (`billion-context-xdpool`, kept disabled).
|
|
10
|
+
#
|
|
11
|
+
# 2.0.0 inserted that row so a profile without the compressor would get one for
|
|
12
|
+
# free. Measured against a profile that had ALREADY installed billion-context —
|
|
13
|
+
# the normal state for anyone using it, since `bili-native` comes from that
|
|
14
|
+
# plugin's own `dsh.bundle.patch.yml` — the host did not disable the duplicate
|
|
15
|
+
# and did not resolve it to a no-op: it ran the fiber to `failed`, because the
|
|
16
|
+
# plugin registers a cordis service under its own name and a second registration
|
|
17
|
+
# is refused outright (`service "…" has been registered at <…>`). Every user who
|
|
18
|
+
# had installed it got a permanently failed entry, unexplained, pointing at us.
|
|
19
|
+
#
|
|
20
|
+
# The follow-up kept the row, disabled, "for addressability". That was the wrong
|
|
21
|
+
# trade: it left a name in this file for a feature the plugin no longer has, and
|
|
22
|
+
# the page that read it (`billion-context`) is deleted too. Installing the
|
|
23
|
+
# compressor is its own decision, made by installing it — which is the
|
|
24
|
+
# arrangement that always worked.
|