@liangjiehappy/dsh-deepseekbase 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +134 -2
- package/README.zh.md +135 -0
- package/cordis.patch.yml +6 -0
- package/lib/index.js +232 -0
- package/package.json +62 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 deepseekbase
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,135 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @liangjiehappy/dsh-deepseekbase
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
**DeepSeek prices, plugin discovery and model specs inside DeepSeek Harness.**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
dsh plugin --profile web add github:moldkey/dsh-deepseekbase
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## The part that matters: we test plugins for free
|
|
14
|
+
|
|
15
|
+
Most plugin directories tell you a plugin **exists**.
|
|
16
|
+
|
|
17
|
+
None tell you whether it **installs on your version of Harness**.
|
|
18
|
+
|
|
19
|
+
So we run real sandbox installs on every DSH plugin we index — **for free, forever**:
|
|
20
|
+
|
|
21
|
+
| Stage | What we do |
|
|
22
|
+
|---|---|
|
|
23
|
+
| 1 | Install it in a clean container (`dsh plugin add`) |
|
|
24
|
+
| 2 | Confirm it shows up in `dsh plugin list` |
|
|
25
|
+
| 3 | Confirm it mounts in the composed profile tree |
|
|
26
|
+
| 4 | Boot the profile and check it stays alive |
|
|
27
|
+
|
|
28
|
+
Stages 2–4 run with **`--network none`**, so even a malicious plugin has nowhere to send data.
|
|
29
|
+
Containers are destroyed after each run.
|
|
30
|
+
|
|
31
|
+
**Results so far: of the top 120 plugins, 13% cannot be installed at all on DSH 0.2.2-rc.1.**
|
|
32
|
+
Eight fail on `engines.dsh` version ranges, five are not on npm anymore.
|
|
33
|
+
|
|
34
|
+
Full results, updated as we test more:
|
|
35
|
+
|
|
36
|
+
**→ [deepseekbase.com/ecosystem/plugin-tests](https://deepseekbase.com/ecosystem/plugin-tests/)**
|
|
37
|
+
|
|
38
|
+
No sign-up. No API key. No rate limit on reading the results.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## What the plugin gives you
|
|
43
|
+
|
|
44
|
+
| Tool | What it answers |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `deepseekbase_price` | What does DeepSeek cost, and which provider is cheapest? |
|
|
47
|
+
| `deepseekbase_plugin` | Which plugin does X, how popular, how risky? |
|
|
48
|
+
| `deepseekbase_specs` | How big is the model, what context length, does it fit? |
|
|
49
|
+
| `deepseekbase_trend` | How much is DeepSeek actually used? |
|
|
50
|
+
|
|
51
|
+
### Example
|
|
52
|
+
|
|
53
|
+
> **You:** compare DeepSeek V4.1 Flash prices across providers
|
|
54
|
+
>
|
|
55
|
+
> **Tool returns:**
|
|
56
|
+
> ```
|
|
57
|
+
> Official: off-peak in $0.15 / out $0.60 per 1M tokens
|
|
58
|
+
> Cheapest third party: Particle AI — in $0.025 / out $0.25
|
|
59
|
+
> ```
|
|
60
|
+
> That is a 6x spread on the same model.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
dsh plugin --profile web add github:moldkey/dsh-deepseekbase
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Restart Harness. Four tools become available.
|
|
71
|
+
|
|
72
|
+
From npm (once published):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
dsh plugin --profile web add @liangjiehappy/dsh-deepseekbase
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Permissions
|
|
81
|
+
|
|
82
|
+
This plugin:
|
|
83
|
+
|
|
84
|
+
- makes **outbound HTTPS requests** to `deepseekbase.com` only
|
|
85
|
+
- does **not** read or write your files
|
|
86
|
+
- does **not** read credentials or environment variables
|
|
87
|
+
- does **not** execute shell commands
|
|
88
|
+
|
|
89
|
+
The whole implementation is `lib/index.js` — one file, zero runtime dependencies.
|
|
90
|
+
You can audit it in five minutes.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Data sources
|
|
95
|
+
|
|
96
|
+
| Endpoint | Used for |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `POST https://deepseekbase.com/mcp` | prices, plugins, specs |
|
|
99
|
+
| `GET https://deepseekbase.com/data/openrouter-tokens.json` | token trend |
|
|
100
|
+
|
|
101
|
+
Everything is also browsable at <https://deepseekbase.com>.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## What is deepseekbase
|
|
106
|
+
|
|
107
|
+
A third-party index of the DeepSeek ecosystem. Not affiliated with DeepSeek.
|
|
108
|
+
|
|
109
|
+
| | |
|
|
110
|
+
|---|---|
|
|
111
|
+
| **283 pages** | pricing, providers, 7,164 derived models, 8,559 plugins, industry kits |
|
|
112
|
+
| **21 open datasets** | every figure carries its source and verification date |
|
|
113
|
+
| **Free plugin testing** | real sandbox installs, results published |
|
|
114
|
+
| **MCP server** | `https://deepseekbase.com/mcp` for any MCP client |
|
|
115
|
+
|
|
116
|
+
We label measurement bases explicitly. Where sources disagree, we say so instead of picking
|
|
117
|
+
the flattering number.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Contributing
|
|
122
|
+
|
|
123
|
+
Found a bug? [Open an issue](https://github.com/moldkey/dsh-deepseekbase/issues).
|
|
124
|
+
|
|
125
|
+
Maintain a plugin that failed our test? The error message tells you exactly why —
|
|
126
|
+
take it and fix it. We are recording a fact, not judging your code.
|
|
127
|
+
|
|
128
|
+
Want your plugin tested? It is free:
|
|
129
|
+
<https://deepseekbase.com/ecosystem/plugin-tests/>
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Licence
|
|
134
|
+
|
|
135
|
+
MIT. Compiled data is attributed per entry on the website.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# @liangjiehappy/dsh-deepseekbase
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
**把 DeepSeek 的價格、插件、模型參數和三調用量接進 DeepSeek Harness。**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
dsh plugin --profile web add github:moldkey/dsh-deepseekbase
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 最重要的一點:我們免費測插件
|
|
14
|
+
|
|
15
|
+
大部分插件目錄只告訴你「這個插件存在」。
|
|
16
|
+
|
|
17
|
+
**沒有人告訴你「它在你這個版本上裝得上嗎」。**
|
|
18
|
+
|
|
19
|
+
所以我們對索引的每個 DSH 插件做真實沙箱安裝測試 —— **免費,永久**:
|
|
20
|
+
|
|
21
|
+
| 階段 | 做什麼 |
|
|
22
|
+
|---|---|
|
|
23
|
+
| 1 | 在乾淨容器裡安裝(`dsh plugin add`)|
|
|
24
|
+
| 2 | 確認它出現在 `dsh plugin list` |
|
|
25
|
+
| 3 | 確認它掛載進組合後的配置樹 |
|
|
26
|
+
| 4 | 啟動 profile,確認進程存活 |
|
|
27
|
+
|
|
28
|
+
第 2-4 階段完全無網絡(`--network none`),所以即使插件有惡意行為也無處可去。
|
|
29
|
+
容器跑完即毀。
|
|
30
|
+
|
|
31
|
+
**目前的結果:頭部 120 個插件裡,13% 在 DSH 0.2.2-rc.1 上根本裝不上。**
|
|
32
|
+
8 個栽在 `engines.dsh` 版本範圍,5 個在 npm 上已經不存在了。
|
|
33
|
+
|
|
34
|
+
完整結果,隨測試持續更新:
|
|
35
|
+
|
|
36
|
+
**→ [deepseekbase.com/ecosystem/plugin-tests](https://deepseekbase.com/ecosystem/plugin-tests/)**
|
|
37
|
+
|
|
38
|
+
不用註冊、不需要 API Key、讀結果不限次數。
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 這個插件給你什麼
|
|
43
|
+
|
|
44
|
+
| 工具 | 回答什麼 |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `deepseekbase_price` | DeepSeek 多少錢?哪家服務商最便宜? |
|
|
47
|
+
| `deepseekbase_plugin` | 哪個插件能做 X?多少人用?風險多大? |
|
|
48
|
+
| `deepseekbase_specs` | 模型多大?上下文多長?裝得下嗎? |
|
|
49
|
+
| `deepseekbase_trend` | DeepSeek 到底被用了多少? |
|
|
50
|
+
|
|
51
|
+
### 例子
|
|
52
|
+
|
|
53
|
+
> **你:** 比較一下 DeepSeek V4.1 Flash 各家服務商的價格
|
|
54
|
+
>
|
|
55
|
+
> **工具返回:**
|
|
56
|
+
> ```
|
|
57
|
+
> 官方:離峰 輸入 $0.15 / 輸出 $0.60 每百萬 token
|
|
58
|
+
> 最便宜第三方:Particle AI —— 輸入 $0.025 / 輸出 $0.25
|
|
59
|
+
> ```
|
|
60
|
+
> 同一個模型,價差 6 倍。
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 安裝
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
dsh plugin --profile web add github:moldkey/dsh-deepseekbase
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
重啟 Harness,四個工具就可用。
|
|
71
|
+
|
|
72
|
+
從 npm 安裝(發布後):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
dsh plugin --profile web add @liangjiehappy/dsh-deepseekbase
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 權限
|
|
81
|
+
|
|
82
|
+
這個插件:
|
|
83
|
+
|
|
84
|
+
- 只對 `deepseekbase.com` 發出 **HTTPS 請求**
|
|
85
|
+
- **不**讀寫你的文件
|
|
86
|
+
- **不**讀憑證或環境變量
|
|
87
|
+
- **不**執行 shell 命令
|
|
88
|
+
|
|
89
|
+
整個實現就是 `lib/index.js` —— 一個文件、零運行時依賴。
|
|
90
|
+
五分鐘可以審完。
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 數據來源
|
|
95
|
+
|
|
96
|
+
| 端點 | 用於 |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `POST https://deepseekbase.com/mcp` | 價格、插件、模型參數 |
|
|
99
|
+
| `GET https://deepseekbase.com/data/openrouter-tokens.json` | token 走勢 |
|
|
100
|
+
|
|
101
|
+
全部也可以在 <https://deepseekbase.com> 瀏覽。
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## deepseekbase 是什麼
|
|
106
|
+
|
|
107
|
+
一個 DeepSeek 生態的第三方索引站。不隸屬於 DeepSeek 官方。
|
|
108
|
+
|
|
109
|
+
| | |
|
|
110
|
+
|---|---|
|
|
111
|
+
| **287 頁** | 價格、服務商、7,164 個衍生模型、8,559 個插件、行業套件 |
|
|
112
|
+
| **21 份開放數據集** | 每個數字都帶來源和驗證日期 |
|
|
113
|
+
| **免費插件測試** | 真實沙箱安裝,結果公開 |
|
|
114
|
+
| **MCP Server** | `https://deepseekbase.com/mcp`,任何 MCP 客戶端可用 |
|
|
115
|
+
| **插件開發指南** | 十章,含我們自己踩的坑 |
|
|
116
|
+
|
|
117
|
+
我們會明確標註統計口徑。來源互相矛盾時,我們說出來,而不是挑好看的那個數字。
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 貢獻
|
|
122
|
+
|
|
123
|
+
發現 bug?[提 issue](https://github.com/moldkey/dsh-deepseekbase/issues)。
|
|
124
|
+
|
|
125
|
+
你的插件沒通過我們的測試?錯誤信息會告訴你具體原因 —— 拿去修就行。
|
|
126
|
+
我們記錄的是一個事實,不是評價你的代碼質量。
|
|
127
|
+
|
|
128
|
+
想讓你的插件被測試?免費:
|
|
129
|
+
<https://deepseekbase.com/zh/ecosystem/plugin-tests/>
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 許可
|
|
134
|
+
|
|
135
|
+
MIT。匯編的數據在網站上逐條標註來源。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Your patch layer for this dsh profile, applied after every bundle layer:
|
|
2
|
+
# a top-level YAML array of loader patch entries (id-targeted config
|
|
3
|
+
# overrides, disables, and insert lists; `!!js` expressions allowed).
|
|
4
|
+
- insert:
|
|
5
|
+
- id: dsh-deepseekbase
|
|
6
|
+
name: '@liangjiehappy/dsh-deepseekbase'
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-deepseekbase
|
|
3
|
+
*
|
|
4
|
+
* Brings deepseekbase.com data into DeepSeek Harness.
|
|
5
|
+
*
|
|
6
|
+
* Tools:
|
|
7
|
+
* deepseekbase_price — official + third-party provider prices
|
|
8
|
+
* deepseekbase_plugin — plugin search WITH sandbox test results
|
|
9
|
+
* deepseekbase_specs — model technical specs
|
|
10
|
+
* deepseekbase_trend — weekly token volume trend
|
|
11
|
+
*
|
|
12
|
+
* Data comes from the public MCP endpoint at https://deepseekbase.com/mcp
|
|
13
|
+
* (JSON-RPC 2.0 over HTTP). Read-only, no API key required.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
17
|
+
|
|
18
|
+
const MCP_ENDPOINT = "https://deepseekbase.com/mcp";
|
|
19
|
+
const TIMEOUT_MS = 15000;
|
|
20
|
+
|
|
21
|
+
/** Call one tool on the deepseekbase MCP server. */
|
|
22
|
+
async function callMcp(toolName, args, signal) {
|
|
23
|
+
const controller = new AbortController();
|
|
24
|
+
const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
|
|
25
|
+
// Abort if the harness cancels us first.
|
|
26
|
+
if (signal) {
|
|
27
|
+
if (signal.aborted) controller.abort();
|
|
28
|
+
else signal.addEventListener("abort", () => controller.abort(), { once: true });
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const res = await fetch(MCP_ENDPOINT, {
|
|
32
|
+
method: "POST",
|
|
33
|
+
headers: { "Content-Type": "application/json" },
|
|
34
|
+
body: JSON.stringify({
|
|
35
|
+
jsonrpc: "2.0",
|
|
36
|
+
id: 1,
|
|
37
|
+
method: "tools/call",
|
|
38
|
+
params: { name: toolName, arguments: args || {} },
|
|
39
|
+
}),
|
|
40
|
+
signal: controller.signal,
|
|
41
|
+
});
|
|
42
|
+
if (!res.ok) {
|
|
43
|
+
return `deepseekbase MCP returned HTTP ${res.status}. Try https://deepseekbase.com/data/ for the raw datasets.`;
|
|
44
|
+
}
|
|
45
|
+
const body = await res.json();
|
|
46
|
+
if (body.error) {
|
|
47
|
+
return `deepseekbase MCP error: ${body.error.message || JSON.stringify(body.error)}`;
|
|
48
|
+
}
|
|
49
|
+
const content = body.result && body.result.content;
|
|
50
|
+
if (Array.isArray(content) && content.length > 0) {
|
|
51
|
+
return content.map((c) => c.text || "").join("\n");
|
|
52
|
+
}
|
|
53
|
+
return "deepseekbase MCP returned an empty result.";
|
|
54
|
+
} catch (err) {
|
|
55
|
+
const reason = err && err.name === "AbortError" ? "timed out" : String(err);
|
|
56
|
+
return `Could not reach deepseekbase (${reason}). The site may be temporarily unreachable.`;
|
|
57
|
+
} finally {
|
|
58
|
+
clearTimeout(timer);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Shared output shape: a single text block. */
|
|
63
|
+
const TEXT_OUTPUT = {
|
|
64
|
+
schema: {
|
|
65
|
+
type: "object",
|
|
66
|
+
additionalProperties: false,
|
|
67
|
+
properties: {
|
|
68
|
+
text: { type: "string", required: true },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
render: (_args, value) => [
|
|
72
|
+
{ type: "text", text: (value && value.text) || "" },
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const name = "dsh-deepseekbase";
|
|
77
|
+
|
|
78
|
+
export const inject = ["tools", "systemPrompt"];
|
|
79
|
+
|
|
80
|
+
export function apply(ctx) {
|
|
81
|
+
ctx.systemPrompt.section({
|
|
82
|
+
name: "tool:deepseekbase",
|
|
83
|
+
order: 120,
|
|
84
|
+
text:
|
|
85
|
+
"Use the deepseekbase_* tools for DeepSeek pricing, plugin discovery with sandbox " +
|
|
86
|
+
"test results, model specs and token-volume trends. Data is a third-party index " +
|
|
87
|
+
"(deepseekbase.com), not official DeepSeek output — cite it as such.",
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// ── 1. Prices ────────────────────────────────────────────────────────────
|
|
91
|
+
ctx.tools.register(
|
|
92
|
+
defineTool({
|
|
93
|
+
name: "deepseekbase_price",
|
|
94
|
+
description:
|
|
95
|
+
"Query DeepSeek model prices. Returns the official price table plus third-party " +
|
|
96
|
+
"provider quotes per 1M tokens, sorted cheapest first, with quantization notes. " +
|
|
97
|
+
"Use this when asked what DeepSeek costs or which provider is cheapest.",
|
|
98
|
+
parameters: {
|
|
99
|
+
model: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "Model id or keyword, e.g. v4.1-flash. Omit for an overview.",
|
|
102
|
+
},
|
|
103
|
+
limit: {
|
|
104
|
+
type: "number",
|
|
105
|
+
description: "Maximum provider quotes to return. Defaults to 8.",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
output: TEXT_OUTPUT,
|
|
109
|
+
isConcurrencySafe: () => true,
|
|
110
|
+
async execute(args, exec) {
|
|
111
|
+
const text = await callMcp(
|
|
112
|
+
"price_query",
|
|
113
|
+
{ model: args.model || "", limit: Math.min(Number(args.limit) || 8, 30) },
|
|
114
|
+
exec && exec.signal,
|
|
115
|
+
);
|
|
116
|
+
return { text };
|
|
117
|
+
},
|
|
118
|
+
}),
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
// ── 2. Plugins with sandbox test results ─────────────────────────────────
|
|
122
|
+
ctx.tools.register(
|
|
123
|
+
defineTool({
|
|
124
|
+
name: "deepseekbase_plugin",
|
|
125
|
+
description:
|
|
126
|
+
"Search DeepSeek Harness plugins. Returns name, category, downloads, stars, security " +
|
|
127
|
+
"risk level, permissions and any known red lines. This index also runs real sandbox " +
|
|
128
|
+
"install tests, so check /ecosystem/plugin-tests/ on deepseekbase.com for whether a " +
|
|
129
|
+
"plugin actually installs on the current DSH version.",
|
|
130
|
+
parameters: {
|
|
131
|
+
query: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Keyword matched against name, description and repository.",
|
|
134
|
+
},
|
|
135
|
+
max_risk: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: "Only return plugins at or below this risk: low, medium or high.",
|
|
138
|
+
},
|
|
139
|
+
limit: {
|
|
140
|
+
type: "number",
|
|
141
|
+
description: "Maximum results. Defaults to 8.",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
output: TEXT_OUTPUT,
|
|
145
|
+
isConcurrencySafe: () => true,
|
|
146
|
+
async execute(args, exec) {
|
|
147
|
+
const text = await callMcp(
|
|
148
|
+
"plugin_search",
|
|
149
|
+
{
|
|
150
|
+
query: args.query || "",
|
|
151
|
+
max_risk: args.max_risk || "",
|
|
152
|
+
limit: Math.min(Number(args.limit) || 8, 40),
|
|
153
|
+
},
|
|
154
|
+
exec && exec.signal,
|
|
155
|
+
);
|
|
156
|
+
return { text };
|
|
157
|
+
},
|
|
158
|
+
}),
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
// ── 3. Model specs ───────────────────────────────────────────────────────
|
|
162
|
+
ctx.tools.register(
|
|
163
|
+
defineTool({
|
|
164
|
+
name: "deepseekbase_specs",
|
|
165
|
+
description:
|
|
166
|
+
"Get DeepSeek model technical specs (layers, hidden size, context length, vocab, " +
|
|
167
|
+
"MoE or Dense). Use when asked about model size, context window or VRAM fit.",
|
|
168
|
+
parameters: {
|
|
169
|
+
model: {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "Model name keyword, e.g. V4-Flash.",
|
|
172
|
+
},
|
|
173
|
+
limit: {
|
|
174
|
+
type: "number",
|
|
175
|
+
description: "Maximum rows. Defaults to 8.",
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
output: TEXT_OUTPUT,
|
|
179
|
+
isConcurrencySafe: () => true,
|
|
180
|
+
async execute(args, exec) {
|
|
181
|
+
const text = await callMcp(
|
|
182
|
+
"model_specs",
|
|
183
|
+
{ model: args.model || "", limit: Math.min(Number(args.limit) || 8, 25) },
|
|
184
|
+
exec && exec.signal,
|
|
185
|
+
);
|
|
186
|
+
return { text };
|
|
187
|
+
},
|
|
188
|
+
}),
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// ── 4. Token volume trend ────────────────────────────────────────────────
|
|
192
|
+
ctx.tools.register(
|
|
193
|
+
defineTool({
|
|
194
|
+
name: "deepseekbase_trend",
|
|
195
|
+
description:
|
|
196
|
+
"Get the weekly token volume trend for DeepSeek models on OpenRouter, with derived " +
|
|
197
|
+
"per-day and per-second rates. Use when asked how much DeepSeek is actually used.",
|
|
198
|
+
parameters: {},
|
|
199
|
+
output: TEXT_OUTPUT,
|
|
200
|
+
isConcurrencySafe: () => true,
|
|
201
|
+
async execute(_args, exec) {
|
|
202
|
+
const text = await callMcp("official_resources", { kind: "sources" }, exec && exec.signal);
|
|
203
|
+
// The trend lives in a dataset rather than an MCP tool; fetch it directly
|
|
204
|
+
// and fall back to the official sources listing if that fails.
|
|
205
|
+
try {
|
|
206
|
+
const res = await fetch("https://deepseekbase.com/data/openrouter-tokens.json", {
|
|
207
|
+
headers: { Accept: "application/json" },
|
|
208
|
+
signal: exec && exec.signal,
|
|
209
|
+
});
|
|
210
|
+
if (res.ok) {
|
|
211
|
+
const d = await res.json();
|
|
212
|
+
const series = (d.series || [])
|
|
213
|
+
.map((p) => `${p.week_of}: ${p.tokens_trillion}T`)
|
|
214
|
+
.join("\n");
|
|
215
|
+
const der = d.derived || {};
|
|
216
|
+
return {
|
|
217
|
+
text:
|
|
218
|
+
"DeepSeek weekly token volume on OpenRouter\n" +
|
|
219
|
+
`Latest: ${der.latest_trillion}T/week (${der.per_second_tokens} tokens/sec)\n` +
|
|
220
|
+
`Growth since first point: ${der.growth_since_first_pct}%\n\n` +
|
|
221
|
+
`Series:\n${series}\n\n` +
|
|
222
|
+
`Source: ${d.source || "OpenRouter"} · collected ${d.verified_at || "unknown"}`,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
} catch {
|
|
226
|
+
/* fall through to the MCP sources listing */
|
|
227
|
+
}
|
|
228
|
+
return { text };
|
|
229
|
+
},
|
|
230
|
+
}),
|
|
231
|
+
);
|
|
232
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liangjiehappy/dsh-deepseekbase",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "DeepSeek prices, plugins with sandbox test results, model specs and token trends inside DeepSeek Harness — powered by deepseekbase.com",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"deepseek-harness",
|
|
7
|
+
"dsh",
|
|
8
|
+
"dsh-plugin",
|
|
9
|
+
"deepseek",
|
|
10
|
+
"pricing",
|
|
11
|
+
"plugin-discovery",
|
|
12
|
+
"model-specs",
|
|
13
|
+
"ecosystem"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://deepseekbase.com",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/moldkey/dsh-deepseekbase/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/moldkey/dsh-deepseekbase.git"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "deepseekbase",
|
|
26
|
+
"url": "https://deepseekbase.com"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "lib/index.js",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"default": "./lib/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./package.json": "./package.json"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"lib",
|
|
38
|
+
"cordis.patch.yml",
|
|
39
|
+
"README.md",
|
|
40
|
+
"README.zh.md"
|
|
41
|
+
],
|
|
42
|
+
"dsh": {
|
|
43
|
+
"bundle": {
|
|
44
|
+
"patch": "./cordis.patch.yml"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"dsh": ">=0.2.0-rc.2"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@deepseek-ai/cordis": "*",
|
|
52
|
+
"@deepseek-ai/dsh-tools": "*"
|
|
53
|
+
},
|
|
54
|
+
"peerDependenciesMeta": {
|
|
55
|
+
"@deepseek-ai/cordis": {
|
|
56
|
+
"optional": true
|
|
57
|
+
},
|
|
58
|
+
"@deepseek-ai/dsh-tools": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
}
|
|
6
65
|
}
|