tju-llm-dsh 1.0.1 → 1.0.2

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/FAQ.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## 配置写入
4
4
 
5
+ ### Q: 我完全没用过 dsh,怎么开始?
6
+
7
+ 先装 DeepSeek Harness(官方开源项目):
8
+
9
+ 1. 装 Node.js ≥ 18([nodejs.org](https://nodejs.org/) 下载 LTS,Windows 可 `winget install OpenJS.NodeJS.LTS`);
10
+ 2. `npm install -g @deepseek-ai/dsh`;
11
+ 3. 终端跑 `dsh web`——首次运行自动初始化 profile 并生成 `~/.dsh/` 目录,按输出地址打开浏览器(一般是 `http://127.0.0.1:3080`)确认能访问。
12
+
13
+ 然后回来照 README「三步接入」走即可。用 DeepSeek 桌面版的话,`desktop` profile 同样被本工具支持。
14
+
5
15
  ### Q: 工具到底改了哪两个文件?
6
16
 
7
17
  1. `~/.dsh/profiles/<profile>/cordis.patch.yml` — 顶层补丁数组中加入/合并 `llm-pi-ai` 插件条目,provider 名为 `tju`。
package/README.md CHANGED
@@ -14,10 +14,31 @@
14
14
  - **数据不出校**:请求直接发往校内网关,不经过第三方
15
15
  - **模型新**:DeepSeek / Qwen 系列最新模型,最高 512K 上下文
16
16
 
17
+ ## 从零开始:先装 DeepSeek Harness(没用过 dsh?看这里)
18
+
19
+ dsh 是 DeepSeek 官方的开源 agent 入口([deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness))。从未接触过的话,三步装好:
20
+
21
+ 1. **装 Node.js ≥ 18**(还没有的话):去 [nodejs.org](https://nodejs.org/) 下载 LTS 版安装,Windows 也可以在 PowerShell 里执行 `winget install OpenJS.NodeJS.LTS`。装完在终端跑 `node --version` 能看到版本号即可。
22
+ 2. **装 dsh**:
23
+
24
+ ```powershell
25
+ npm install -g @deepseek-ai/dsh
26
+ ```
27
+
28
+ 3. **跑一次**:
29
+
30
+ ```powershell
31
+ dsh web
32
+ ```
33
+
34
+ 首次运行会自动初始化 Web profile 并生成 `~/.dsh/` 配置目录(Windows 即 `%USERPROFILE%\.dsh`);按终端输出的本地地址打开浏览器即可使用(一般是 `http://127.0.0.1:3080`)。确认页面能打开后 Ctrl+C 停掉,回到下面的接入步骤。
35
+
36
+ > 用 DeepSeek 桌面版的同学:它使用的 `desktop` profile 本工具同样支持,装好本工具直接配置即可。
37
+
17
38
  ## 前置条件
18
39
 
19
40
  1. **Node.js ≥ 18**(dsh 用户天然满足)
20
- 2. **已安装并运行过一次 dsh**(`npm i -g @deepseek-ai/dsh`,跑一次让它生成 `~/.dsh/profiles/`)
41
+ 2. **已安装并运行过一次 dsh**(没装过?照上一节《从零开始》三步即可)
21
42
  3. **天大智算 API Key**(`tk-` 开头)——需要先申请开通服务,见[下一节](#如何获取-api-key)
22
43
 
23
44
  ## 如何获取 API Key(两步)
package/SKILL.md CHANGED
@@ -23,9 +23,10 @@ cd <安装目录> && npm install --omit=dev
23
23
  # 之后用 node bin/tju-dsh.mjs 代替 tju-dsh
24
24
  ```
25
25
 
26
- 前置检查:`node --version`(需 ≥ 18);目录 `~/.dsh/profiles/` 是否存在
27
- (Windows 为 `%USERPROFILE%\.dsh\profiles`)。不存在就先让用户安装并运行一次
28
- `dsh`(`npm i -g @deepseek-ai/dsh`),没有 dsh 就没有配置目标。
26
+ 前置检查:`node --version`(需 ≥ 18,没有就去 nodejs.org 装 LTS 或 `winget install OpenJS.NodeJS.LTS`);目录 `~/.dsh/profiles/` 是否存在
27
+ (Windows 为 `%USERPROFILE%\.dsh\profiles`)。不存在就让用户装 dsh 并跑一次:
28
+ `npm install -g @deepseek-ai/dsh` 然后 `dsh web`(首次运行自动生成 `~/.dsh/profiles/`,
29
+ 按输出地址打开浏览器确认能访问)。没有 dsh 就没有配置目标。
29
30
 
30
31
  ## 对话脚本(按顺序,不要跳步)
31
32
 
package/bin/tju-dsh.mjs CHANGED
@@ -193,7 +193,7 @@ async function pickProfile(opts, p) {
193
193
  return opts.profile;
194
194
  }
195
195
  if (profiles.length === 0) {
196
- die('没有找到任何 dsh profile。请先安装并运行一次 dsh(它会生成 ~/.dsh/profiles/),再运行本工具。');
196
+ die('没有找到任何 dsh profile。请先运行一次 dsh web(首次运行会自动生成 ~/.dsh/profiles/),再运行本工具。');
197
197
  }
198
198
  if (profiles.length === 1) {
199
199
  info(`使用唯一的 profile:${profiles[0]}`);
@@ -458,7 +458,7 @@ async function cmdSetup(opts) {
458
458
  console.log(c.cyan('\n== tju-dsh:把天津大学智算平台接入 DeepSeek Harness ==\n'));
459
459
 
460
460
  if (!existsSync(p.dshDir)) {
461
- die(`未找到 ${p.dshDir}。请先安装并运行一次 dsh(npm i -g @deepseek-ai/dsh 后执行 dsh),再运行本工具。`);
461
+ die(`未找到 ${p.dshDir}。若从未用过 dsh:先装 Node.js ≥ 18(nodejs.org),再执行 npm install -g @deepseek-ai/dsh,然后运行一次 dsh web(自动生成配置目录),最后重新运行本工具。`);
462
462
  }
463
463
 
464
464
  const profile = await pickProfile(opts, p);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tju-llm-dsh",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "把天津大学智算平台(ai.tju.edu.cn)接入 DeepSeek Harness(dsh)——社区工具,非官方",
5
5
  "type": "module",
6
6
  "bin": {