dsh-free-model 3.0.0 → 3.0.1

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/SECURITY-AUDIT.md CHANGED
@@ -12,12 +12,12 @@
12
12
  | --- | --- |
13
13
  | `index.js` | `a932bcb6bdeef608496071a60d1f9e8499997fca52765e0eb300171d8728aa57` |
14
14
  | `client.js` | `13332f9b4102e5cc7125998983126df7b50cfa6a32ef5e20aefc51aca0a5e820` |
15
- | `vendor/channel-pack/pack.js` | `9255642fdaf064b11e0f1e233b0d771419515e8803dbe0e173c0cb6a9f76bfba` |
15
+ | `vendor/channel-pack/pack.js` | `2f9a8d58007fcec287c5f9be484b79adbfea8ec332bddc1ba01d52acb5877c19` |
16
16
 
17
17
  ⚠️ `pack.js` 的指纹随每次「刷新模型数据 / 移植上游修复」而变(它是构建产物)。
18
- 上面的值对应**上游跟进第二批(2026-11-09:codearts UA/业务码 + zcode 3.17 身份块 + 第四条指纹 + cline 快照后缀)之后**的版本;
18
+ 上面的值对应**3.0.1(2026-11-09:目录刷新加账号闸门)之后**的版本;
19
19
  域名面结论未变,`scripts/egress-audit.mjs` 可随时重跑复验。
20
- (上一版 `b1d9d582…` 是目录自适应 + 12 项修复后的产物。)
20
+ (上一版 `9255642f…` 是上游第二轮跟进后的产物。)
21
21
 
22
22
  ## 结论
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-free-model",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "description": "dsh 插件(DeepSeek Harness / cordis bundle)· 模型接入 —— 把 CodeArts、CodeBuddy / WorkBuddy、LobsterAI、Qoder / Qoder CN、TRAE、Cline、Loomy、Raccoon、MiniMax Code、ZCode、Gemini、OfficeAce、Accio Work 十五个账号渠道接进 dsh 的模型选择器,并保留数据看板、运行日志与本地网关(含局域网中继)。上游 2.1.0 的匿名免费车道、EAC 协付车道、聚合渠道、省 Token、路由、公告/升级/热重载与独立 Web 产品已全部移除。",
6
6
  "main": "./index.js",
@@ -72651,6 +72651,28 @@ function makeReadImageRequest(ctx) {
72651
72651
  }
72652
72652
  };
72653
72653
  }
72654
+ function refreshCatalogsOnce(deps) {
72655
+ return (async () => {
72656
+ for (const [tag2, adapter] of Object.entries(deps.adapters)) {
72657
+ const refresh = adapter.refreshCatalog;
72658
+ if (typeof refresh !== "function") continue;
72659
+ if (deps.hasAccount !== void 0) {
72660
+ let has = false;
72661
+ try {
72662
+ has = await deps.hasAccount(tag2);
72663
+ } catch {
72664
+ has = false;
72665
+ }
72666
+ if (!has) continue;
72667
+ }
72668
+ try {
72669
+ await refresh.call(adapter);
72670
+ } catch (error) {
72671
+ deps.onError?.(tag2, error);
72672
+ }
72673
+ }
72674
+ })();
72675
+ }
72654
72676
  function apply(ctx, config = {}) {
72655
72677
  const network = createChannelFetch({ outlet: config.outlet });
72656
72678
  ctx.effect(() => () => {
@@ -73531,22 +73553,32 @@ function apply(ctx, config = {}) {
73531
73553
  ["accio", (p) => accio.refreshAll(p)]
73532
73554
  ];
73533
73555
  let catalogRefreshInFlight = false;
73556
+ async function hasCatalogAccount(provider) {
73557
+ const probe = pool.hasLoggedInAccount;
73558
+ if (typeof probe !== "function") return true;
73559
+ try {
73560
+ return await probe.call(pool, provider);
73561
+ } catch {
73562
+ return false;
73563
+ }
73564
+ }
73534
73565
  async function refreshAllCatalogs() {
73535
73566
  if (catalogRefreshInFlight) return;
73536
73567
  if (typeof modelAdapters === "undefined") return;
73537
73568
  catalogRefreshInFlight = true;
73538
73569
  try {
73539
- for (const [tag2, adapter] of Object.entries(modelAdapters)) {
73540
- const refresh = adapter.refreshCatalog;
73541
- if (typeof refresh !== "function") continue;
73542
- try {
73543
- await refresh.call(adapter);
73544
- } catch (error) {
73570
+ await refreshCatalogsOnce({
73571
+ adapters: modelAdapters,
73572
+ // ⚠️ 闸门:**没配账号的渠道不刷**(2026-11-09 用户报障:未配 cline 账号,
73573
+ // 却每 30 分钟刷「models.dev 拉取失败 / 无可用凭据」两条 warn)。
73574
+ // 判据是 `hasLoggedInAccount(provider)`;能力缺失时传 undefined ⇒ 照旧刷新。
73575
+ hasAccount: typeof pool.hasLoggedInAccount === "function" ? (provider) => hasCatalogAccount(provider) : void 0,
73576
+ onError: (tag2, error) => {
73545
73577
  ctx.logger?.warn?.(
73546
73578
  `[channel-pack] ${tag2} \u76EE\u5F55\u5237\u65B0\u5931\u8D25\uFF08\u4FDD\u7559\u65E7\u76EE\u5F55\uFF09\uFF1A${error instanceof Error ? error.message : String(error)}`
73547
73579
  );
73548
73580
  }
73549
- }
73581
+ });
73550
73582
  } finally {
73551
73583
  catalogRefreshInFlight = false;
73552
73584
  }
@@ -73839,6 +73871,7 @@ export {
73839
73871
  maybeClaimBonus,
73840
73872
  name,
73841
73873
  parseWindowsProxy,
73874
+ refreshCatalogsOnce,
73842
73875
  rewriteTencentContentFingerprints,
73843
73876
  serializeTraeMessagesForTest,
73844
73877
  stripClineSnapshotSuffix,