@dsh-plugins/dsh-llm-hub 1.9.8 → 1.10.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 +14 -0
- package/assets/01-family-dock.svg +19 -41
- package/icon.svg +23 -0
- package/lib/client.js +45 -81
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +8 -4
- package/scripts/npm-products.json +26 -0
- package/scripts/pre-commit-all.sh +14 -0
- package/scripts/prepublish-gate.mjs +35 -2
- package/scripts/readme-gate.mjs +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [Semantic Versioning](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [1.10.0](https://github.com/webkubor/dsh-llm-hub/compare/v1.9.9...v1.10.0) (2026-11-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features
|
|
9
|
+
|
|
10
|
+
* **meta:** 补齐插件管理器标题、简介与图标;样式随插件停用移除 ([05c0df7](https://github.com/webkubor/dsh-llm-hub/commit/05c0df71c24a9916eb965a694e362c9f7388a281))
|
|
11
|
+
|
|
12
|
+
## [1.9.9](https://github.com/webkubor/dsh-llm-hub/compare/v1.9.8...v1.9.9) (2026-10-29)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **ui:** restore model overview styles and retire obsolete suite cards ([15b1c23](https://github.com/webkubor/dsh-llm-hub/commit/15b1c2345a6c3bc9a02c2ac68b97b7789442f9da))
|
|
18
|
+
|
|
5
19
|
## [1.9.8](https://github.com/webkubor/dsh-llm-hub/compare/v1.9.7...v1.9.8) (2026-10-28)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="230" viewBox="0 0 640 230" font-family="-apple-system, 'SF Pro Text', 'PingFang SC', system-ui, sans-serif">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
|
|
4
4
|
<stop offset="0%" stop-color="#1f1d2b"/>
|
|
@@ -15,65 +15,43 @@
|
|
|
15
15
|
<filter id="blur"><feGaussianBlur stdDeviation="6"/></filter>
|
|
16
16
|
</defs>
|
|
17
17
|
|
|
18
|
-
<rect width="640" height="
|
|
19
|
-
<rect x="0" y="0" width="640" height="
|
|
18
|
+
<rect width="640" height="230" fill="url(#bg)"/>
|
|
19
|
+
<rect x="0" y="0" width="640" height="230" fill="#000" opacity="0.0"/>
|
|
20
20
|
<circle cx="80" cy="60" r="120" fill="#7c3aed" opacity="0.10" filter="url(#blur)"/>
|
|
21
|
-
<circle cx="560" cy="
|
|
21
|
+
<circle cx="560" cy="180" r="140" fill="#3b82f6" opacity="0.10" filter="url(#blur)"/>
|
|
22
22
|
|
|
23
23
|
<!-- panel container -->
|
|
24
|
-
<rect x="32" y="22" width="576" height="
|
|
24
|
+
<rect x="32" y="22" width="576" height="176" rx="12" fill="#1a1825" stroke="#2d2b3a" stroke-width="1"/>
|
|
25
25
|
|
|
26
26
|
<!-- head -->
|
|
27
27
|
<g transform="translate(48,46)">
|
|
28
28
|
<text x="0" y="14" font-size="14" font-weight="650" fill="#e5e7eb">🌟 Webkubor DSH 扩展家族</text>
|
|
29
|
-
<text x="
|
|
29
|
+
<text x="544" y="14" font-size="10" fill="#9ca3af" text-anchor="end">一键构建完整智能体开发环境</text>
|
|
30
30
|
</g>
|
|
31
31
|
|
|
32
|
-
<!--
|
|
32
|
+
<!-- 2 cards in 1 row, each 266x100 -->
|
|
33
33
|
<!-- card 1: Bloom Theme -->
|
|
34
|
-
<g transform="translate(48,
|
|
35
|
-
<rect width="266" height="
|
|
34
|
+
<g transform="translate(48,80)">
|
|
35
|
+
<rect width="266" height="100" rx="8" fill="url(#card)" stroke="#2d2b3a"/>
|
|
36
36
|
<text x="14" y="24" font-size="14">🌸</text>
|
|
37
37
|
<text x="34" y="26" font-size="12" font-weight="600" fill="#e5e7eb">Bloom Theme</text>
|
|
38
38
|
<text x="14" y="50" font-size="10.5" fill="#9ca3af">落霞 Bloom 极客质感毛玻璃主题与代码高亮</text>
|
|
39
|
-
<circle cx="14" cy="
|
|
40
|
-
<text x="24" y="
|
|
41
|
-
<text x="252" y="
|
|
39
|
+
<circle cx="14" cy="76" r="3.5" fill="url(#dot)"/>
|
|
40
|
+
<text x="24" y="80" font-size="10.5" font-weight="600" fill="#10b981">已激活</text>
|
|
41
|
+
<text x="252" y="80" font-size="10" fill="#6b7280" text-anchor="end">GitHub ↗</text>
|
|
42
42
|
</g>
|
|
43
43
|
|
|
44
44
|
<!-- card 2: LLM Hub -->
|
|
45
|
-
<g transform="translate(326,
|
|
46
|
-
<rect width="266" height="
|
|
45
|
+
<g transform="translate(326,80)">
|
|
46
|
+
<rect width="266" height="100" rx="8" fill="url(#card)" stroke="#2d2b3a"/>
|
|
47
47
|
<text x="14" y="24" font-size="14">🎛️</text>
|
|
48
48
|
<text x="34" y="26" font-size="12" font-weight="600" fill="#e5e7eb">LLM Hub</text>
|
|
49
49
|
<text x="14" y="50" font-size="10.5" fill="#9ca3af">多模型网关、余额配额、多 Key 轮换与极客大屏</text>
|
|
50
|
-
<circle cx="14" cy="
|
|
51
|
-
<text x="24" y="
|
|
52
|
-
<text x="252" y="
|
|
53
|
-
</g>
|
|
54
|
-
|
|
55
|
-
<!-- card 3: User Mirror -->
|
|
56
|
-
<g transform="translate(48,196)">
|
|
57
|
-
<rect width="266" height="104" rx="8" fill="url(#card)" stroke="#2d2b3a"/>
|
|
58
|
-
<text x="14" y="24" font-size="14">🪞</text>
|
|
59
|
-
<text x="34" y="26" font-size="12" font-weight="600" fill="#e5e7eb">User Mirror</text>
|
|
60
|
-
<text x="14" y="50" font-size="10.5" fill="#9ca3af">用户角色数字画像、习惯偏好与记忆网络</text>
|
|
61
|
-
<circle cx="14" cy="78" r="3.5" fill="url(#dot)"/>
|
|
62
|
-
<text x="24" y="82" font-size="10.5" font-weight="600" fill="#10b981">已激活</text>
|
|
63
|
-
<text x="252" y="82" font-size="10" fill="#6b7280" text-anchor="end">GitHub ↗</text>
|
|
64
|
-
</g>
|
|
65
|
-
|
|
66
|
-
<!-- card 4: Env Inspector -->
|
|
67
|
-
<g transform="translate(326,196)">
|
|
68
|
-
<rect width="266" height="104" rx="8" fill="url(#card)" stroke="#2d2b3a"/>
|
|
69
|
-
<text x="14" y="24" font-size="14">🖥️</text>
|
|
70
|
-
<text x="34" y="26" font-size="12" font-weight="600" fill="#e5e7eb">Env Inspector</text>
|
|
71
|
-
<text x="14" y="50" font-size="10.5" fill="#9ca3af">端口监听释放、CLI 工具链与环境大屏</text>
|
|
72
|
-
<circle cx="14" cy="78" r="3.5" fill="url(#dot)"/>
|
|
73
|
-
<text x="24" y="82" font-size="10.5" font-weight="600" fill="#10b981">已激活</text>
|
|
74
|
-
<text x="252" y="82" font-size="10" fill="#6b7280" text-anchor="end">GitHub ↗</text>
|
|
50
|
+
<circle cx="14" cy="76" r="3.5" fill="url(#dot)"/>
|
|
51
|
+
<text x="24" y="80" font-size="10.5" font-weight="600" fill="#10b981">已激活</text>
|
|
52
|
+
<text x="252" y="80" font-size="10" fill="#6b7280" text-anchor="end">GitHub ↗</text>
|
|
75
53
|
</g>
|
|
76
54
|
|
|
77
55
|
<!-- caption hint -->
|
|
78
|
-
<text x="320" y="
|
|
79
|
-
</svg>
|
|
56
|
+
<text x="320" y="218" font-size="9" fill="#6b7280" text-anchor="middle">设置 → 模型 → 底部「Webkubor DSH 扩展家族」</text>
|
|
57
|
+
</svg>
|
package/icon.svg
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="llmhub-bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#2f4f6f"/>
|
|
5
|
+
<stop offset="1" stop-color="#1f3346"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="64" height="64" rx="14" fill="url(#llmhub-bg)"/>
|
|
9
|
+
<g stroke="#9cc6e8" stroke-width="2.4" stroke-linecap="round">
|
|
10
|
+
<line x1="32" y1="32" x2="15" y2="17"/>
|
|
11
|
+
<line x1="32" y1="32" x2="49" y2="17"/>
|
|
12
|
+
<line x1="32" y1="32" x2="15" y2="47"/>
|
|
13
|
+
<line x1="32" y1="32" x2="49" y2="47"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g fill="#cfe5f6">
|
|
16
|
+
<circle cx="15" cy="17" r="4.5"/>
|
|
17
|
+
<circle cx="49" cy="17" r="4.5"/>
|
|
18
|
+
<circle cx="15" cy="47" r="4.5"/>
|
|
19
|
+
<circle cx="49" cy="47" r="4.5"/>
|
|
20
|
+
</g>
|
|
21
|
+
<circle cx="32" cy="32" r="8.5" fill="#fff"/>
|
|
22
|
+
<circle cx="32" cy="32" r="3.5" fill="#10b981"/>
|
|
23
|
+
</svg>
|
package/lib/client.js
CHANGED
|
@@ -548,16 +548,20 @@ window.__ModuleLoader__.load({
|
|
|
548
548
|
'box-shadow:0 0 5px rgba(239,68,68,.5)}',
|
|
549
549
|
'.dsh-llm-hub-dot-sep{opacity:.35;margin:0 1px}',
|
|
550
550
|
// harness
|
|
551
|
-
'.dsh-llm-hub-harness{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:
|
|
551
|
+
'.dsh-llm-hub-harness{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px;',
|
|
552
|
+
'padding:8px 12px;border-radius:8px;border:1px solid var(--bloom-hairline,rgba(255,255,255,.06));',
|
|
553
|
+
'background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.02));backdrop-filter:blur(8px);',
|
|
552
554
|
'font-size:11.5px;line-height:16px;color:var(--dsw-alias-label-secondary)}',
|
|
553
|
-
'.dsh-llm-hub-
|
|
554
|
-
'
|
|
555
|
-
'
|
|
555
|
+
'.dsh-llm-hub-harness__title{font-size:11px;font-weight:600;color:var(--dsw-alias-label-tertiary);letter-spacing:.2px;margin-right:2px}',
|
|
556
|
+
'.dsh-llm-hub-harness__chip{display:inline-flex;align-items:center;gap:5px;',
|
|
557
|
+
'padding:3px 9px;border-radius:6px;border:1px solid var(--dsw-alias-border-l1,rgba(255,255,255,.08));',
|
|
558
|
+
'background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.03));transition:all .15s ease}',
|
|
559
|
+
'.dsh-llm-hub-harness__chip:hover{border-color:var(--bloom-accent,#5fa8b2);background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}',
|
|
556
560
|
'.dsh-llm-hub-harness__chip--missing{opacity:.45}',
|
|
557
561
|
'.dsh-llm-hub-harness__dot{width:5px;height:5px;border-radius:50%;',
|
|
558
562
|
'background:var(--dsw-alias-label-secondary);flex:none}',
|
|
559
|
-
'.dsh-llm-hub-harness__dot--ready{background:var(--dsw-alias-state-success-primary,#10b981)}',
|
|
560
|
-
'.dsh-llm-hub-harness__name{color:var(--dsw-alias-label-primary)}',
|
|
563
|
+
'.dsh-llm-hub-harness__dot--ready{background:var(--dsw-alias-state-success-primary,#10b981);box-shadow:0 0 6px rgba(16,185,129,.6)}',
|
|
564
|
+
'.dsh-llm-hub-harness__name{color:var(--dsw-alias-label-primary);font-weight:550}',
|
|
561
565
|
'.dsh-llm-hub-harness__state{opacity:.75}',
|
|
562
566
|
// 目录选择器 Drawer
|
|
563
567
|
'.dsh-llm-hub-picker{margin-top:6px;padding:8px 10px;border-radius:6px;',
|
|
@@ -572,12 +576,13 @@ window.__ModuleLoader__.load({
|
|
|
572
576
|
'.dsh-llm-hub-picker__tag{font-size:10.5px;padding:0 4px;border-radius:3px;',
|
|
573
577
|
'color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-3)}',
|
|
574
578
|
// 页脚
|
|
575
|
-
'.dsh-llm-hub-foot{display:flex;align-items:center;gap:
|
|
576
|
-
'padding:2px 2px;font-size:11px;color:var(--dsw-alias-label-secondary)
|
|
577
|
-
'.dsh-llm-hub-foot__name{font-variant-numeric:tabular-nums;opacity:.
|
|
578
|
-
'.dsh-llm-hub-foot__link{color:var(--dsw-alias-label-
|
|
579
|
-
'border:
|
|
580
|
-
'
|
|
579
|
+
'.dsh-llm-hub-foot{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap;',
|
|
580
|
+
'padding:2px 2px;font-size:11px;color:var(--dsw-alias-label-secondary)}',
|
|
581
|
+
'.dsh-llm-hub-foot__name{font-variant-numeric:tabular-nums;opacity:.85;font-family:ui-monospace,monospace;font-size:10.5px}',
|
|
582
|
+
'.dsh-llm-hub-foot__link{color:var(--dsw-alias-label-secondary);text-decoration:none;',
|
|
583
|
+
'border:1px solid var(--dsw-alias-border-l1,rgba(255,255,255,.08));background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.02));',
|
|
584
|
+
'padding:3px 8px;border-radius:5px;font:inherit;font-size:10.5px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all .15s ease}',
|
|
585
|
+
'.dsh-llm-hub-foot__link:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--bloom-accent,#5fa8b2);background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08));text-decoration:none}',
|
|
581
586
|
'.dsh-llm-hub-chip{box-sizing:border-box;display:inline-flex;align-items:center;height:20px;padding:0 6px;',
|
|
582
587
|
'border-radius:10px;font-size:10.5px;line-height:14px;white-space:nowrap;',
|
|
583
588
|
'border:.5px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary)}',
|
|
@@ -654,51 +659,22 @@ window.__ModuleLoader__.load({
|
|
|
654
659
|
'.dsh-llm-hub-route__hint{font-size:10px;color:var(--dsw-alias-label-tertiary)}',
|
|
655
660
|
'.dsh-llm-hub-route__order{font-size:10px;color:var(--dsw-alias-label-secondary);',
|
|
656
661
|
'font-family:ui-monospace,SFMono-Regular,monospace;word-break:break-all;line-height:1.4}',
|
|
657
|
-
// 智能路由编辑器(设置页路由卡)
|
|
658
|
-
// 规则说明:去掉盒子背景,只留淡灰单行注脚,视觉权重要低于第 2 行「将路由到…」
|
|
659
|
-
'color:var(--dsw-alias-label-tertiary);padding:0}',
|
|
660
|
-
// 当前组:边框降一档 + 顶部 brand 细线高亮,替代原本的 warn 四边描边
|
|
661
|
-
'border:.5px solid var(--dsw-alias-border-l1);border-radius:4px;background:transparent;cursor:pointer;',
|
|
662
|
-
'font:inherit;font-size:11px;line-height:1;color:var(--dsw-alias-label-secondary);white-space:nowrap;transition:all .15s ease}',
|
|
663
|
-
'border:0;background:transparent;padding:0;cursor:pointer;font:inherit;font-size:12px;line-height:1;',
|
|
664
|
-
'color:var(--dsw-alias-label-tertiary);border-radius:3px;transition:all .15s ease}',
|
|
665
|
-
// 折叠行(1.6.2):组名 + 「将路由到 X」+ 主力 + 兜底条数,一行读完。
|
|
666
|
-
// 组名给固定宽度,与下面展开态的 label 输入框同宽 —— 收起/展开时这一列不跳。
|
|
667
|
-
'white-space:nowrap;font-size:11.5px;font-weight:600;color:var(--dsw-alias-label-primary)}',
|
|
668
|
-
'border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);',
|
|
669
|
-
'font:inherit;font-size:11px;outline:none;transition:border-color .15s ease}',
|
|
670
|
-
// 允许换行,不允许截断(1.6.2 浏览器实测后改的)。设置内容区只有 564px,
|
|
671
|
-
// 扣掉序号/组名/两个按钮,摘要只剩 ~210px;而真实数据的 provider/model
|
|
672
|
-
// 要 200-215px —— 差的这几十像素,省不掉,只能换行。之前用 nowrap+ellipsis
|
|
673
|
-
// 把「→ modelgo-gateway/claude-sonnet-5」砍成「→ modelgo-gatewa…」,
|
|
674
|
-
// 砍掉的正好是判断路由结果最需要的那段:看不出是 sonnet-5 还是别的。
|
|
675
|
-
// 组头因此高一行,是「读得全」该付的代价。
|
|
676
|
-
'color:var(--dsw-alias-label-secondary);display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px}',
|
|
677
|
-
// 断行点放在 provider 与 model 之间的斜杠上:读起来是两条完整信息,
|
|
678
|
-
// 而不是把一个词从中间劈开。break-all 是兜底 —— provider id 里也有长词。
|
|
679
|
-
'min-width:0;word-break:break-word;overflow-wrap:anywhere}',
|
|
680
|
-
// 可用/总:紧跟在「将路由到」后面,且**不参与压缩** —— 压它等于把
|
|
681
|
-
// 「还剩几个能兜」这个答案藏掉,而它只要 30px。
|
|
682
|
-
'color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums}',
|
|
683
|
-
// 1.7.0 路由编辑器:序号徽标、编辑按钮、原地下拉、备注、放大的操作按钮、自动保存状态
|
|
684
|
-
'padding:0 6px;font-size:10.5px;font-weight:600;background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,.08));color:var(--dsw-alias-label-secondary)}',
|
|
685
|
-
// 全组共用一张网格:行与 pick 都是 display:contents,列宽由整组一起决定 ——
|
|
686
|
-
// 各行自成网格时,右侧标签列按本行内容伸缩,模型下拉的右边缘每行都不一样(浏览器实测 908 vs 845px)。
|
|
687
|
-
// 标签区给固定宽度并靠右:有无「思考/图像」标签的行,备注框都一样宽,右边缘对齐。
|
|
688
|
-
// 半可用单独一色:全绿和全红之间还有「还剩几个」这个状态,
|
|
689
|
-
// 混成全绿会让人以为不用管,混成全红会误报故障。
|
|
690
|
-
// 同理固定宽度:主力行没有「设为主力」,按钮区只有 77px(其余 141px),备注右边缘会错开 64px。
|
|
691
|
-
'border:.5px solid var(--dsw-alias-border-l1);background:transparent;color:var(--dsw-alias-label-secondary);',
|
|
692
|
-
'font:inherit;font-size:10.5px;flex:1 1 120px;min-width:90px;max-width:260px;outline:none;transition:border-color .15s ease}',
|
|
693
|
-
// 候选区是纵向 flex:note 的 flex-basis 120px 在这里会变成「高 120px」,组备注必须脱离 flex 伸缩。
|
|
694
|
-
'background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:11px;max-width:170px;outline:none;',
|
|
695
|
-
'transition:border-color .15s ease;cursor:pointer}',
|
|
696
|
-
'color:var(--dsw-alias-state-success-primary,#10b981)}',
|
|
697
662
|
// Hero 全景统计大横条
|
|
698
|
-
'.dsh-llm-hub-hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(
|
|
699
|
-
'.dsh-llm-hub-hero__card{display:flex;flex-direction:column;gap:
|
|
700
|
-
'
|
|
701
|
-
'.
|
|
663
|
+
'.dsh-llm-hub-hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:8px;margin:16px 0 10px 0}',
|
|
664
|
+
'.dsh-llm-hub-hero__card{position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:4px;padding:10px 12px;',
|
|
665
|
+
'border-radius:9px;border:1px solid var(--bloom-hairline,rgba(255,255,255,.08));background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.03));',
|
|
666
|
+
'backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);box-shadow:0 2px 10px rgba(0,0,0,.08);',
|
|
667
|
+
'transition:all .2s cubic-bezier(0.16,1,0.3,1);overflow:hidden}',
|
|
668
|
+
'.dsh-llm-hub-hero__card:hover{transform:translateY(-1px);border-color:var(--bloom-accent,var(--dsw-alias-brand-primary,#5fa8b2));box-shadow:0 4px 16px rgba(0,0,0,.16)}',
|
|
669
|
+
'.dsh-llm-hub-hero__card::before{content:"";position:absolute;top:0;left:0;right:0;height:1.5px;',
|
|
670
|
+
'background:linear-gradient(90deg,transparent,var(--bloom-accent,rgba(255,255,255,.2)),transparent);opacity:.65}',
|
|
671
|
+
'.dsh-llm-hub-hero__num{font-size:16px;font-weight:750;color:var(--dsw-alias-label-primary);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:-0.3px;line-height:1.2;display:flex;align-items:center;gap:4px}',
|
|
672
|
+
'.dsh-llm-hub-hero__card--providers .dsh-llm-hub-hero__num{color:var(--bloom-accent,var(--dsw-alias-brand-primary,#5fa8b2))}',
|
|
673
|
+
'.dsh-llm-hub-hero__card--latency.is-fast .dsh-llm-hub-hero__num{color:var(--dsw-alias-state-success-primary,#10b981)}',
|
|
674
|
+
'.dsh-llm-hub-hero__card--latency.is-normal .dsh-llm-hub-hero__num{color:var(--dsw-alias-state-warn-primary,#eab308)}',
|
|
675
|
+
'.dsh-llm-hub-hero__card--latency.is-slow .dsh-llm-hub-hero__num{color:var(--dsw-alias-state-error-primary,#ef4444)}',
|
|
676
|
+
'.dsh-llm-hub-hero__card--security .dsh-llm-hub-hero__num{color:var(--dsw-alias-state-success-primary,#10b981)}',
|
|
677
|
+
'.dsh-llm-hub-hero__label{font-size:10.5px;font-weight:550;color:var(--dsw-alias-label-secondary);opacity:.85;letter-spacing:.2px}',
|
|
702
678
|
// 添加提供方草稿卡上的匹配提示(1.6.0)
|
|
703
679
|
'.dsh-llm-hub-preset-hint{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:0 0 8px;padding:6px 10px;border-radius:6px;',
|
|
704
680
|
'border:.5px solid var(--dsw-alias-border-l1);font-size:11px;line-height:1.5}',
|
|
@@ -727,7 +703,7 @@ window.__ModuleLoader__.load({
|
|
|
727
703
|
'.dsh-suite-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;flex-wrap:wrap;gap:8px}',
|
|
728
704
|
'.dsh-suite-title{font-size:12px;font-weight:650;color:var(--dsw-alias-label-primary);margin:0;display:flex;align-items:center;gap:6px}',
|
|
729
705
|
'.dsh-suite-desc{font-size:10.5px;color:var(--dsw-alias-label-tertiary);letter-spacing:.2px}',
|
|
730
|
-
'.dsh-suite-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(
|
|
706
|
+
'.dsh-suite-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}',
|
|
731
707
|
'.dsh-suite-card{display:flex;flex-direction:column;justify-content:space-between;padding:10px 12px;border-radius:8px;background:var(--dsw-alias-bg-layer-3,rgba(255,255,255,0.02));border:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,0.05));transition:all .2s cubic-bezier(0.16,1,0.3,1)}',
|
|
732
708
|
'.dsh-suite-card:hover{transform:translateY(-1px);border-color:var(--dsw-alias-brand-primary,#3b82f6);box-shadow:0 4px 14px rgba(0,0,0,0.15)}',
|
|
733
709
|
'.dsh-suite-card-top{display:flex;align-items:center;gap:6px;margin-bottom:4px}',
|
|
@@ -1523,7 +1499,7 @@ window.__ModuleLoader__.load({
|
|
|
1523
1499
|
if (list.length === 0) return null
|
|
1524
1500
|
ensureStyle()
|
|
1525
1501
|
return h('div', { className: 'dsh-llm-hub-harness' },
|
|
1526
|
-
h('span', { className: 'dsh-llm-hub-
|
|
1502
|
+
h('span', { className: 'dsh-llm-hub-harness__title' }, t('harnessTitle')),
|
|
1527
1503
|
list.map((item) => {
|
|
1528
1504
|
const state = item.registered === true
|
|
1529
1505
|
? { text: t('harnessReady'), hint: t('harnessHintReady').replace('%s', String(item.id).replace(/-/g, '_')), ready: true }
|
|
@@ -1633,17 +1609,19 @@ window.__ModuleLoader__.load({
|
|
|
1633
1609
|
|
|
1634
1610
|
ensureStyle()
|
|
1635
1611
|
|
|
1612
|
+
const latencyClass = minLatency === null ? '' : (minLatency < 300 ? ' is-fast' : (minLatency < 800 ? ' is-normal' : ' is-slow'))
|
|
1613
|
+
|
|
1636
1614
|
return h('div', { className: 'dsh-llm-hub-hero' },
|
|
1637
|
-
h('div', { className: 'dsh-llm-hub-hero__card' },
|
|
1615
|
+
h('div', { className: 'dsh-llm-hub-hero__card dsh-llm-hub-hero__card--providers' },
|
|
1638
1616
|
h('span', { className: 'dsh-llm-hub-hero__num' }, totalProviders > 0 ? `${readyProviders} / ${totalProviders}` : '—'),
|
|
1639
1617
|
h('span', { className: 'dsh-llm-hub-hero__label' }, t('heroProviders'))),
|
|
1640
|
-
h('div', { className: 'dsh-llm-hub-hero__card' },
|
|
1618
|
+
h('div', { className: 'dsh-llm-hub-hero__card dsh-llm-hub-hero__card--models' },
|
|
1641
1619
|
h('span', { className: 'dsh-llm-hub-hero__num' }, totalModels > 0 ? `${totalModels}` : '—'),
|
|
1642
1620
|
h('span', { className: 'dsh-llm-hub-hero__label' }, t('heroModels'))),
|
|
1643
|
-
h('div', { className: 'dsh-llm-hub-hero__card' },
|
|
1621
|
+
h('div', { className: 'dsh-llm-hub-hero__card dsh-llm-hub-hero__card--latency' + latencyClass },
|
|
1644
1622
|
h('span', { className: 'dsh-llm-hub-hero__num' }, minLatency !== null ? `${minLatency}ms` : '—'),
|
|
1645
1623
|
h('span', { className: 'dsh-llm-hub-hero__label' }, t('heroFastest'))),
|
|
1646
|
-
h('div', { className: 'dsh-llm-hub-hero__card' },
|
|
1624
|
+
h('div', { className: 'dsh-llm-hub-hero__card dsh-llm-hub-hero__card--security' },
|
|
1647
1625
|
h('span', { className: 'dsh-llm-hub-hero__num' }, '🛡️ 100%'),
|
|
1648
1626
|
h('span', { className: 'dsh-llm-hub-hero__label' }, t('heroSecSafe'))))
|
|
1649
1627
|
}
|
|
@@ -2138,24 +2116,6 @@ window.__ModuleLoader__.load({
|
|
|
2138
2116
|
desc: '多模型网关、余额配额、多Key轮换与极客大屏',
|
|
2139
2117
|
repo: 'https://github.com/webkubor/dsh-llm-hub',
|
|
2140
2118
|
pkg: '@dsh-plugins/dsh-llm-hub'
|
|
2141
|
-
},
|
|
2142
|
-
{
|
|
2143
|
-
id: '@dsh-plugins/dsh-user-mirror',
|
|
2144
|
-
aliases: ['dsh-user-mirror', 'dsh-mirror', '@dsh-plugins/dsh-user-mirror'],
|
|
2145
|
-
name: 'User Mirror',
|
|
2146
|
-
icon: '🪞',
|
|
2147
|
-
desc: '用户角色数字画像、习惯偏好与记忆网络',
|
|
2148
|
-
repo: 'https://github.com/webkubor/dsh-mirror',
|
|
2149
|
-
pkg: '@dsh-plugins/dsh-user-mirror'
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
id: '@dsh-plugins/dsh-env-inspector',
|
|
2153
|
-
aliases: ['dsh-env-inspector', '@dsh-plugins/dsh-env-inspector'],
|
|
2154
|
-
name: 'Env Inspector',
|
|
2155
|
-
icon: '🖥️',
|
|
2156
|
-
desc: '端口监听释放、CLI工具链与环境大屏',
|
|
2157
|
-
repo: 'https://github.com/webkubor/dsh-env-inspector',
|
|
2158
|
-
pkg: '@dsh-plugins/dsh-env-inspector'
|
|
2159
2119
|
}
|
|
2160
2120
|
]
|
|
2161
2121
|
|
|
@@ -2338,7 +2298,11 @@ window.__ModuleLoader__.load({
|
|
|
2338
2298
|
* @param ctx - 插件上下文。
|
|
2339
2299
|
*/
|
|
2340
2300
|
function apply(ctx) {
|
|
2341
|
-
ensureStyle
|
|
2301
|
+
// 样式标签由 ensureStyle 懒插入;挂在 effect 上,插件停用/卸载时一并移除,不留残留。
|
|
2302
|
+
ctx.effect(() => {
|
|
2303
|
+
ensureStyle()
|
|
2304
|
+
return () => { document.getElementById('dsh-llm-hub-style')?.remove() }
|
|
2305
|
+
}, 'dsh-llm-hub: styles')
|
|
2342
2306
|
ctx.effect(() => ctx.locale.register(NS, LOCALES), 'dsh-llm-hub: dictionaries')
|
|
2343
2307
|
const t = ctx.locale.bind(NS)
|
|
2344
2308
|
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plugins/dsh-llm-hub",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "DSH 模型管理层:网关可达性探测、模型目录拉取、DeepSeek + MiniMax/智谱/Moonshot/StepFun 余额与配额、本月用量统计、余额预警、Provider 健康看板,再把本机装好的 codex / claude / agy 注册成子代理(装了才出现)。零运行时依赖,不改动 DSH 安装。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"./client": {
|
|
14
14
|
"default": "./lib/client.js"
|
|
15
15
|
},
|
|
16
|
-
"./package.json": "./package.json"
|
|
16
|
+
"./package.json": "./package.json",
|
|
17
|
+
"./locale/*.json": "./locale/*.json",
|
|
18
|
+
"./icon": "./icon.svg"
|
|
17
19
|
},
|
|
18
20
|
"dsh": {
|
|
19
21
|
"bundle": {
|
|
@@ -78,9 +80,11 @@
|
|
|
78
80
|
"cordis.patch.yml",
|
|
79
81
|
"lib",
|
|
80
82
|
"scripts",
|
|
81
|
-
"types"
|
|
83
|
+
"types",
|
|
84
|
+
"locale/*.json",
|
|
85
|
+
"icon.svg"
|
|
82
86
|
],
|
|
83
87
|
"devDependencies": {
|
|
84
|
-
"@deepseek-ai/schemastery": "3.18.
|
|
88
|
+
"@deepseek-ai/schemastery": "3.18.5"
|
|
85
89
|
}
|
|
86
90
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": [
|
|
3
|
+
"npm 产品定位台账 —— prepublish-gate 契约 0 的唯一判据。真源在 CortexOS,由 check-release-gate-sync.mjs --fix 分发到各仓 scripts/npm-products.json,各仓拷贝不许手改(sha 漂移会被查出来)。",
|
|
4
|
+
"上 npm 是业务 / 产品定位决策,不是发版流程能顺手做的事:一个包要进 products,必须说清「给谁用、为什么非 npm 不可」,并由 owner 拍板。",
|
|
5
|
+
"agent 不得为了让门禁通过而自行往 products 里加条目 —— 这等于替 owner 做了定位决策。新包要上 npm,先问 owner。",
|
|
6
|
+
"notOnNpm:owner 明确判过「不是 npm 产品」的项目,走 git 分发。命中直接拒发,并给出原因。",
|
|
7
|
+
"2026-11-04 建立:起因是 agent 把 facet(排版工具)、reel-kit(视频合成工具)当 npm 包去发版 / 绑 OIDC,owner 叫停。"
|
|
8
|
+
],
|
|
9
|
+
"products": {
|
|
10
|
+
"ai-orb": { "for": "外部前端项目的 AI 光球组件(库)", "since": "npm 已有 OIDC 发布" },
|
|
11
|
+
"ai-sse-kit": { "for": "外部项目的 AI 流式接收库,modelgo-console-web 生产在用,月下载 ~200", "since": "2026-11-04 owner 确认发版" },
|
|
12
|
+
"im-notify-kit": { "for": "IM 通知库,被多个自家项目当依赖", "since": "npm 已有 OIDC 发布" },
|
|
13
|
+
"device-passport": { "for": "设备指纹库", "since": "npm 已发布" },
|
|
14
|
+
"dsh-bloom-theme": { "for": "DSH 主题插件,按 npm 包分发", "since": "npm 已有 OIDC 发布" },
|
|
15
|
+
"@dsh-plugins/dsh-llm-hub": { "for": "DSH 插件,按 npm 包分发", "since": "npm 已发布" },
|
|
16
|
+
"@dsh-plugins/dsh-museav-assets": { "for": "DSH 插件,按 npm 包分发", "since": "npm 已发布" },
|
|
17
|
+
"vite-plugin-agent-eyes": { "for": "Vite 插件,业务仓当依赖装", "since": "npm 已有 OIDC 发布" },
|
|
18
|
+
"vite-plugin-refresh-guard": { "for": "Vite 插件,5 个业务仓当依赖装", "since": "npm 已有 OIDC 发布" },
|
|
19
|
+
"museav-cli": { "for": "MUSE AV 中台 CLI,租户用户 npm 安装", "since": "npm 已有自动发布" },
|
|
20
|
+
"cs-mcp": { "for": "主分发为单文件二进制(npm 包已标不维护);release.yml 仍跑三道门禁,故登记以免误拦", "since": "既有" }
|
|
21
|
+
},
|
|
22
|
+
"notOnNpm": {
|
|
23
|
+
"@webkubor/facet": "owner 2026-11-04:排版工具,不是为 npm 做的产物。git 分发:npm i -g github:webkubor/facet",
|
|
24
|
+
"@kubor/reel-kit": "owner 2026-11-04:视频合成工具,不是 npm 库、不维护 npm。git 分发:npm i -g github:webkubor/reel-kit"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# 仓库级 pre-commit 门禁(由全局 ~/.config/git/hooks/pre-commit 调用)。
|
|
3
|
+
# 只快检:产物语法 + DSH 宿主契约(真 cordis 内核试跑 apply,约 3 秒)。
|
|
4
|
+
# 2026-10-30 加:起因是 bloom 分支产物让桌面端起不来,见 ../SOP.md「部署门禁」。
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
cd "$(git rev-parse --show-toplevel)"
|
|
7
|
+
|
|
8
|
+
for f in lib/*.js; do node --check "$f"; done
|
|
9
|
+
|
|
10
|
+
if git diff --cached --name-only | grep -qE '^(lib/|package\.json$)'; then
|
|
11
|
+
node ../scripts/dsh-dev.mjs check
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
echo "✓ pre-commit checks passed"
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* 10MB,正确修法是换成图床直链而不是把 10MB 塞进每个安装包)。共同点是
|
|
14
14
|
* 「约定没做成门禁」,所以把判据做成能跑的:
|
|
15
15
|
*
|
|
16
|
+
* 契约 0 产品定位 —— 包名必须登记在 npm-products.json 的 products 里(owner 拍板的
|
|
17
|
+
* 「这是 npm 产品」);命中 notOnNpm 或未登记 → 拒发。无逃生舱。
|
|
18
|
+
* 2026-11-04 加:facet / reel-kit 不是 npm 产品却被当成 npm 包去发。
|
|
16
19
|
* 契约 1 产物完整性 —— package.json 必须在;`files` 里每个字面量条目至少命中一个文件;
|
|
17
20
|
* main / types / exports / dsh 引用的相对路径文件必须存在。
|
|
18
21
|
* 契约 2 图片引用 —— README 里以**相对路径**引用的 assets/* 必须在 tarball 里。
|
|
@@ -33,7 +36,7 @@ import { tmpdir } from 'node:os'
|
|
|
33
36
|
import { createHash } from 'node:crypto'
|
|
34
37
|
import { EXCLUDE, isRuntime, collectAllFiles, detectChangedRuntime, packEntry } from './gate-lib.mjs'
|
|
35
38
|
|
|
36
|
-
const GATE_VERSION =
|
|
39
|
+
const GATE_VERSION = 2
|
|
37
40
|
|
|
38
41
|
const here = dirname(fileURLToPath(import.meta.url))
|
|
39
42
|
const pkgRoot = dirname(here)
|
|
@@ -42,6 +45,36 @@ const pkg = JSON.parse(readFileSync(join(pkgRoot, 'package.json'), 'utf8'))
|
|
|
42
45
|
const version = pkg.version
|
|
43
46
|
const errors = []
|
|
44
47
|
|
|
48
|
+
// ── 契约 0 产品定位(业务拦截,先于一切机械检查)─────────────────────────
|
|
49
|
+
// 上 npm 是产品定位决策:得有人说清「给谁用、为什么非 npm 不可」。
|
|
50
|
+
// 判据只有一个 —— owner 维护的台账 npm-products.json(真源在 CortexOS,
|
|
51
|
+
// 由 check-release-gate-sync --fix 分发到本目录)。不在台账里 = 没被批准成 npm 产品。
|
|
52
|
+
// 不设逃生舱:能被环境变量绕过的定位拦截等于没有。要上 npm,去台账登记(owner 拍板)。
|
|
53
|
+
// 2026-11-04 起因:facet(排版工具)、reel-kit(视频合成工具)被 agent 当 npm 包去发版。
|
|
54
|
+
{
|
|
55
|
+
const ledgerPath = join(here, 'npm-products.json')
|
|
56
|
+
if (!existsSync(ledgerPath)) {
|
|
57
|
+
console.error(`[prepublish-gate] ✖ 契约 0 产品定位: 缺台账 scripts/npm-products.json`)
|
|
58
|
+
console.error(` → 在 CortexOS 跑 node scripts/check-release-gate-sync.mjs --fix 分发台账;不要手写一份`)
|
|
59
|
+
process.exit(1)
|
|
60
|
+
}
|
|
61
|
+
const ledger = JSON.parse(readFileSync(ledgerPath, 'utf8'))
|
|
62
|
+
const denied = ledger.notOnNpm?.[pkg.name]
|
|
63
|
+
if (denied) {
|
|
64
|
+
console.error(`[prepublish-gate] ✖ 契约 0 产品定位: ${pkg.name} 已被判定为「不是 npm 产品」,拒绝发布`)
|
|
65
|
+
console.error(` → ${denied}`)
|
|
66
|
+
console.error(` → 建议 package.json 设 "private": true,并删掉 publish workflow / 发布脚本`)
|
|
67
|
+
process.exit(1)
|
|
68
|
+
}
|
|
69
|
+
if (!ledger.products?.[pkg.name]) {
|
|
70
|
+
console.error(`[prepublish-gate] ✖ 契约 0 产品定位: ${pkg.name} 不在 npm 产品台账里,拒绝发布`)
|
|
71
|
+
console.error(` → 上 npm 是产品定位决策,不是发版流程能顺手做的。先问 owner:给谁用?为什么非 npm 不可?`)
|
|
72
|
+
console.error(` → owner 同意后在 CortexOS scripts/release-gate/npm-products.json 的 products 里登记,再 --fix 分发`)
|
|
73
|
+
console.error(` → agent 不得为了过门禁自行登记`)
|
|
74
|
+
process.exit(1)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
45
78
|
// ── 0. 打包清单 ────────────────────────────────────────────────────────────
|
|
46
79
|
let packFiles
|
|
47
80
|
try {
|
|
@@ -250,7 +283,7 @@ if (errors.length > 0) {
|
|
|
250
283
|
process.exit(1)
|
|
251
284
|
}
|
|
252
285
|
|
|
253
|
-
console.log(`[prepublish-gate] ✓ ${pkg.name}@${version}
|
|
286
|
+
console.log(`[prepublish-gate] ✓ ${pkg.name}@${version} 五条契约通过(gate v${GATE_VERSION})`)
|
|
254
287
|
console.log(`[prepublish-gate] · tarball ${packFiles.length} 个文件;运行期载荷 ${packFiles.filter(isRuntime).length} 个`)
|
|
255
288
|
if (referencedAssets.size > 0) console.log(`[prepublish-gate] · README 引用的 ${referencedAssets.size} 个 assets 均在包内`)
|
|
256
289
|
console.log(`[prepublish-gate] · CHANGELOG 含当前版本段`)
|
package/scripts/readme-gate.mjs
CHANGED
|
@@ -109,13 +109,23 @@ if (!hasWhyTable) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// ── 4. 英文 README ─────────────────────────────────────────────────────────
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
// 两种合规形态:
|
|
113
|
+
// A. 有独立英文文件(README.en.md 等)—— 主流约定
|
|
114
|
+
// B. README.md 本身就是英文、中文另放 README_CN.md —— 「英文为默认入场券」
|
|
115
|
+
// 同样合规:npm 包页展示的就是 README.md,它已经是英文了。
|
|
116
|
+
// (device-passport 就是这种结构;硬造一份 README.en.md 去复制 README.md
|
|
117
|
+
// 是重复文件,将来两边改一处漏一处,反而更容易不一致。)
|
|
118
|
+
const enFiles = ['README.en.md', 'README.en-US.md', 'README.en_US.md']
|
|
119
|
+
const hasEnFile = enFiles.some((f) => existsSync(join(pkgRoot, f)))
|
|
120
|
+
const hasCnAlt = existsSync(join(pkgRoot, 'README_CN.md')) || existsSync(join(pkgRoot, 'README.zh-CN.md'))
|
|
121
|
+
const readmeIsEn = readme.slice(0, 400).trim().length > 0
|
|
122
|
+
const hasEn = hasEnFile || (hasCnAlt && readmeIsEn)
|
|
114
123
|
|
|
115
124
|
if (!hasEn) {
|
|
116
125
|
errors.push(
|
|
117
126
|
'缺少英文 README(README.en.md)\n' +
|
|
118
|
-
' → dsh-plugin 生态面向全球,英文是默认入场券;中文 README 首行加上 [English](README.en.md) |
|
|
127
|
+
' → dsh-plugin 生态面向全球,英文是默认入场券;中文 README 首行加上 [English](README.en.md) | 中文\n' +
|
|
128
|
+
' → 或者反过来:README.md 就写英文、中文另放 README_CN.md(同样合规)'
|
|
119
129
|
)
|
|
120
130
|
}
|
|
121
131
|
|