dsh-deeptutor 0.1.9 → 0.1.10
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/{skills → .agents/skills}/html-doc/scripts/md-to-html.js +3 -3
- package/README.md +11 -8
- package/README.zh.md +3 -3
- package/lib/index.d.ts +2 -1
- package/package.json +10 -7
- package/scripts/install-profile.mjs +3 -3
- package/scripts/md-to-html.js +3 -3
- package/scripts/sync-skills.mjs +7 -6
- package/src/index.ts +2 -1
- /package/{skills → .agents/skills}/deeptutor/README.md +0 -0
- /package/{skills → .agents/skills}/deeptutor/SKILL.md +0 -0
- /package/{skills → .agents/skills}/html-doc/SKILL.md +0 -0
- /package/{skills → .agents/skills}/html-doc/assets/template.html +0 -0
|
@@ -349,11 +349,11 @@ function main() {
|
|
|
349
349
|
: "";
|
|
350
350
|
|
|
351
351
|
const generated = new Date().toISOString().slice(0, 10);
|
|
352
|
-
// The same converter ships in two locations (skills/html-doc/scripts/
|
|
353
|
-
// package-root scripts/ copy); resolve the template wherever we are.
|
|
352
|
+
// The same converter ships in two locations (.agents/skills/html-doc/scripts/
|
|
353
|
+
// and a package-root scripts/ copy); resolve the template wherever we are.
|
|
354
354
|
const templateCandidates = [
|
|
355
355
|
path.join(import.meta.dirname, "..", "assets", "template.html"),
|
|
356
|
-
path.join(import.meta.dirname, "..", "skills", "html-doc", "assets", "template.html"),
|
|
356
|
+
path.join(import.meta.dirname, "..", ".agents", "skills", "html-doc", "assets", "template.html"),
|
|
357
357
|
];
|
|
358
358
|
const templatePath = templateCandidates.find((p) => fs.existsSync(p));
|
|
359
359
|
if (!templatePath) {
|
package/README.md
CHANGED
|
@@ -54,8 +54,10 @@ study page, then archived to a notebook):
|
|
|
54
54
|
|
|
55
55
|
## Requirements
|
|
56
56
|
|
|
57
|
-
- A working DeepSeek Harness (dsh) install.
|
|
58
|
-
|
|
57
|
+
- A working DeepSeek Harness (dsh) install, 0.1.0-rc.6 or any 0.2.x release
|
|
58
|
+
(compatibility re-verified on dsh 0.2.1-rc.2 / 0.2.1-rc.3). Bundle
|
|
59
|
+
auto-registration via `dsh plugin add` is verified on dsh CLI 0.1.0-rc.6 +
|
|
60
|
+
pnpm 8.15.6.
|
|
59
61
|
- A DeepTutor deployment, either:
|
|
60
62
|
- **Local** — `deeptutor serve` running on this machine, or the `deeptutor`
|
|
61
63
|
CLI on `PATH` (used as fallback);
|
|
@@ -146,8 +148,8 @@ row; later patch layers can override or disable it by id.
|
|
|
146
148
|
|
|
147
149
|
## Skills
|
|
148
150
|
|
|
149
|
-
Two skills ship inside this package (
|
|
150
|
-
|
|
151
|
+
Two skills ship inside this package (`.agents/skills/deeptutor` and
|
|
152
|
+
`.agents/skills/html-doc`) and the bundled installer copies them to
|
|
151
153
|
`<DSH_HOME>/skills/<name>/` (auto-discovered by dsh) whenever it runs — so
|
|
152
154
|
`pnpm dlx dsh-deeptutor` installs the bundle **and** the skills in one shot:
|
|
153
155
|
|
|
@@ -159,9 +161,10 @@ Two skills ship inside this package (`skills/deeptutor` and
|
|
|
159
161
|
Installing a newer package version overwrites skill files in place; files not
|
|
160
162
|
shipped by the package are never deleted.
|
|
161
163
|
|
|
162
|
-
The files under
|
|
163
|
-
`TecFancy/pi-extensions` (single source of truth, agent-neutral).
|
|
164
|
-
after upstream edits with
|
|
164
|
+
The files under `.agents/skills/` are byte-identical copies of the same
|
|
165
|
+
skills in `TecFancy/pi-extensions` (single source of truth, agent-neutral).
|
|
166
|
+
Sync them after upstream edits with
|
|
167
|
+
`node scripts/sync-skills.mjs ../pi-extensions`.
|
|
165
168
|
|
|
166
169
|
## Configuration (env vars, agent-agnostic)
|
|
167
170
|
|
|
@@ -215,7 +218,7 @@ src/ # TypeScript sources (dev loading, typecheck)
|
|
|
215
218
|
lib/ # compiled ESM (published entry, from `npm run build`)
|
|
216
219
|
scripts/md-to-html.js # zero-dependency Markdown → HTML converter
|
|
217
220
|
scripts/install-profile.mjs # one-shot profile installer (exposed as the `dsh-deeptutor` binary)
|
|
218
|
-
skills/
|
|
221
|
+
.agents/skills/ # bundled skills: deeptutor/ + html-doc/ (installed to <DSH_HOME>/skills/)
|
|
219
222
|
cordis.yml # dev overlay: insert src/index.ts by absolute path
|
|
220
223
|
cordis.patch.yml # bundle patch: insert the package by name
|
|
221
224
|
```
|
package/README.zh.md
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
## 环境要求
|
|
41
41
|
|
|
42
|
-
- 可用的 DeepSeek Harness (dsh)
|
|
42
|
+
- 可用的 DeepSeek Harness (dsh) 安装,0.1.0-rc.6 或任意 0.2.x 版本(已在 dsh 0.2.1-rc.2 / 0.2.1-rc.3 上重新验证兼容性)。`dsh plugin add` 自动登记 bundle 已在 dsh CLI 0.1.0-rc.6 + pnpm 8.15.6 上验证。
|
|
43
43
|
- 一个 DeepTutor 部署,二选一:
|
|
44
44
|
- **本地** —— 本机运行 `deeptutor serve`,或 PATH 上有 `deeptutor` CLI(作为回退);
|
|
45
45
|
- **远程** —— DeepTutor 在服务器上,通过自动建立的 SSH 隧道访问(含 SSH CLI 回退)。
|
|
@@ -103,7 +103,7 @@ bundle 清单(`dsh.bundle.patch → cordis.patch.yml`)负责插入插件行;上
|
|
|
103
103
|
|
|
104
104
|
## Skills
|
|
105
105
|
|
|
106
|
-
本包携带两个 skill(
|
|
106
|
+
本包携带两个 skill(`.agents/skills/deeptutor` 与 `.agents/skills/html-doc`),随包安装器每次运行时都会把它们复制到 `<DSH_HOME>/skills/<name>/`(dsh 自动发现)—— 所以 `pnpm dlx dsh-deeptutor` 一次装齐插件 **和** skill:
|
|
107
107
|
|
|
108
108
|
- `deeptutor` — 面向 agent 的学习工作流(`~/.dsh/skills/deeptutor/SKILL.md`)
|
|
109
109
|
- `html-doc` — 将学习内容渲染为自包含 HTML 页面(`~/.dsh/skills/html-doc/`);`deeptutor_run` 传入 `html` 路径时,插件内部使用同一转换器(`scripts/md-to-html.js`)
|
|
@@ -158,7 +158,7 @@ src/ # TypeScript 源码(开发加载、类型检查)
|
|
|
158
158
|
lib/ # 编译产物(发布入口,由 npm run build 生成)
|
|
159
159
|
scripts/md-to-html.js # 零依赖 Markdown → HTML 转换器
|
|
160
160
|
scripts/install-profile.mjs # 一键 profile 安装器(以 `dsh-deeptutor` 二进制暴露)
|
|
161
|
-
skills/
|
|
161
|
+
.agents/skills/ # 随包 skill:deeptutor/ + html-doc/(安装到 <DSH_HOME>/skills/)
|
|
162
162
|
cordis.yml # 开发 overlay:按绝对路径插入 src/index.ts
|
|
163
163
|
cordis.patch.yml # bundle patch:按包名插入插件
|
|
164
164
|
```
|
package/lib/index.d.ts
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* automatically to reach the API; if the tunnel is unavailable, falls back to the SSH CLI.
|
|
15
15
|
*
|
|
16
16
|
* Env config (agent-agnostic): DEEPTUTOR_SSH_HOST / DEEPTUTOR_API_BASE / DEEPTUTOR_LOCAL_BIN /
|
|
17
|
-
* DEEPTUTOR_REMOTE_BIN / DEEPTUTOR_REMOTE_HOME — see src/config.ts and
|
|
17
|
+
* DEEPTUTOR_REMOTE_BIN / DEEPTUTOR_REMOTE_HOME — see src/config.ts and
|
|
18
|
+
* .agents/skills/deeptutor/SKILL.md.
|
|
18
19
|
*/
|
|
19
20
|
import type { Context } from "@deepseek-ai/cordis";
|
|
20
21
|
export declare const name = "dsh-deeptutor";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-deeptutor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Learning assistant extension for DeepSeek Harness (dsh): DeepTutor tutoring for your agent — deep explanations, self-test questions, learning paths, personal knowledge-base search (RAG), and note archiving (HTTP/WS first, CLI fallback; auto-adapts local/remote deployment).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"url": "https://github.com/TecFancy/dsh-deeptutor/issues"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=20.11"
|
|
24
|
+
"node": ">=20.11",
|
|
25
|
+
"dsh": "^0.1.0-rc.6 || ^0.2.0-rc.1"
|
|
25
26
|
},
|
|
26
27
|
"type": "module",
|
|
27
28
|
"main": "./lib/index.js",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
},
|
|
37
38
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
38
39
|
"./scripts/*": "./scripts/*",
|
|
39
|
-
"
|
|
40
|
+
"./.agents/skills/*": "./.agents/skills/*",
|
|
40
41
|
"./src/*": "./src/*",
|
|
41
42
|
"./package.json": "./package.json"
|
|
42
43
|
},
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"lib",
|
|
45
46
|
"src",
|
|
46
47
|
"scripts",
|
|
47
|
-
"skills",
|
|
48
|
+
".agents/skills",
|
|
48
49
|
"docs",
|
|
49
50
|
"cordis.patch.yml",
|
|
50
51
|
"README.md",
|
|
@@ -64,12 +65,14 @@
|
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
67
|
-
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6"
|
|
68
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.1-rc.1"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
71
|
-
"@deepseek-ai/dsh-tools": "^0.1
|
|
71
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
72
|
+
"@deepseek-ai/dsh-tools": "^0.2.1-rc.3",
|
|
72
73
|
"@types/node": "^24.0.0",
|
|
74
|
+
"@types/semver": "^7.8.0",
|
|
75
|
+
"semver": "^7.8.5",
|
|
73
76
|
"typescript": "^5.9.3"
|
|
74
77
|
}
|
|
75
78
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* -h, --help show this help
|
|
21
21
|
*
|
|
22
22
|
* Besides installing the bundle, the installer copies the package's bundled
|
|
23
|
-
* skills (
|
|
23
|
+
* skills (`.agents/skills/deeptutor`, `.agents/skills/html-doc`) into
|
|
24
24
|
* `<DSH_HOME>/skills/<name>/`, where dsh auto-discovers them. Existing files
|
|
25
25
|
* are overwritten; files not shipped by the package are never deleted.
|
|
26
26
|
*/
|
|
@@ -33,7 +33,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
33
33
|
const PKG = 'dsh-deeptutor';
|
|
34
34
|
const NAME = 'dsh-deeptutor-install';
|
|
35
35
|
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
36
|
-
const SKILLS_DIR = join(SCRIPT_DIR, '..', 'skills');
|
|
36
|
+
const SKILLS_DIR = join(SCRIPT_DIR, '..', '.agents', 'skills');
|
|
37
37
|
|
|
38
38
|
const USAGE = `usage: dsh-deeptutor [--profile <name>]
|
|
39
39
|
|
|
@@ -213,7 +213,7 @@ next steps:
|
|
|
213
213
|
*/
|
|
214
214
|
function installSkills() {
|
|
215
215
|
if (!existsSync(SKILLS_DIR)) {
|
|
216
|
-
console.error(`\n${NAME}: warning: no skills/ directory in this package — skill install skipped (old version?)`);
|
|
216
|
+
console.error(`\n${NAME}: warning: no .agents/skills/ directory in this package — skill install skipped (old version?)`);
|
|
217
217
|
return '';
|
|
218
218
|
}
|
|
219
219
|
const dshHome = process.env.DSH_HOME || join(homedir(), '.dsh');
|
package/scripts/md-to-html.js
CHANGED
|
@@ -349,11 +349,11 @@ function main() {
|
|
|
349
349
|
: "";
|
|
350
350
|
|
|
351
351
|
const generated = new Date().toISOString().slice(0, 10);
|
|
352
|
-
// The same converter ships in two locations (skills/html-doc/scripts/
|
|
353
|
-
// package-root scripts/ copy); resolve the template wherever we are.
|
|
352
|
+
// The same converter ships in two locations (.agents/skills/html-doc/scripts/
|
|
353
|
+
// and a package-root scripts/ copy); resolve the template wherever we are.
|
|
354
354
|
const templateCandidates = [
|
|
355
355
|
path.join(import.meta.dirname, "..", "assets", "template.html"),
|
|
356
|
-
path.join(import.meta.dirname, "..", "skills", "html-doc", "assets", "template.html"),
|
|
356
|
+
path.join(import.meta.dirname, "..", ".agents", "skills", "html-doc", "assets", "template.html"),
|
|
357
357
|
];
|
|
358
358
|
const templatePath = templateCandidates.find((p) => fs.existsSync(p));
|
|
359
359
|
if (!templatePath) {
|
package/scripts/sync-skills.mjs
CHANGED
|
@@ -16,14 +16,15 @@ const piRoot = resolve(process.argv[2] ?? join(here, "..", "pi-extensions"));
|
|
|
16
16
|
|
|
17
17
|
// [pi source, this-repo destination]
|
|
18
18
|
// The bundle uses the root scripts/ copy at runtime (src/html-render.ts);
|
|
19
|
-
// the skill copy ships inside the package. Both must
|
|
19
|
+
// the skill copy ships inside the package under .agents/skills/. Both must
|
|
20
|
+
// stay identical.
|
|
20
21
|
const FILES = [
|
|
21
|
-
["skills/deeptutor/SKILL.md", "skills/deeptutor/SKILL.md"],
|
|
22
|
-
["skills/deeptutor/README.md", "skills/deeptutor/README.md"],
|
|
23
|
-
["skills/html-doc/SKILL.md", "skills/html-doc/SKILL.md"],
|
|
24
|
-
["skills/html-doc/assets/template.html", "skills/html-doc/assets/template.html"],
|
|
22
|
+
["skills/deeptutor/SKILL.md", ".agents/skills/deeptutor/SKILL.md"],
|
|
23
|
+
["skills/deeptutor/README.md", ".agents/skills/deeptutor/README.md"],
|
|
24
|
+
["skills/html-doc/SKILL.md", ".agents/skills/html-doc/SKILL.md"],
|
|
25
|
+
["skills/html-doc/assets/template.html", ".agents/skills/html-doc/assets/template.html"],
|
|
25
26
|
["skills/html-doc/scripts/md-to-html.js", "scripts/md-to-html.js"],
|
|
26
|
-
["skills/html-doc/scripts/md-to-html.js", "skills/html-doc/scripts/md-to-html.js"],
|
|
27
|
+
["skills/html-doc/scripts/md-to-html.js", ".agents/skills/html-doc/scripts/md-to-html.js"],
|
|
27
28
|
];
|
|
28
29
|
|
|
29
30
|
let failures = 0;
|
package/src/index.ts
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* automatically to reach the API; if the tunnel is unavailable, falls back to the SSH CLI.
|
|
15
15
|
*
|
|
16
16
|
* Env config (agent-agnostic): DEEPTUTOR_SSH_HOST / DEEPTUTOR_API_BASE / DEEPTUTOR_LOCAL_BIN /
|
|
17
|
-
* DEEPTUTOR_REMOTE_BIN / DEEPTUTOR_REMOTE_HOME — see src/config.ts and
|
|
17
|
+
* DEEPTUTOR_REMOTE_BIN / DEEPTUTOR_REMOTE_HOME — see src/config.ts and
|
|
18
|
+
* .agents/skills/deeptutor/SKILL.md.
|
|
18
19
|
*/
|
|
19
20
|
import type { Context } from "@deepseek-ai/cordis";
|
|
20
21
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|