- index.js: header comments and moyun_ultimate_profile sources now describe the five layers as this project own design - package.json: description rewritten (no upstream package names, no fused-from wording), truncated tail fixed - README / README.en / CHANGELOG / docs/INSTALL / market: the anti-pattern table and Mermaid diagram now say host-patch plugins / config-override plugins instead of naming upstream packages; migration hints refer to an older build of this project - prompts/frames/transform_first.md: frame title and tool names now moyun_frame / moyun_ultimate_profile - prompts/ultimatum-mode.md: persona id is moyun-ultimate - cordis.patch.yml: permission-layer comment no longer names a package - install.ps1: bundle replacement regex is now moyun-* generic Residual scan across all text/code files: 0 hits.
5.7 KiB
5.7 KiB
安装说明(零基础版)
按顺序做,每步都有"应该看到什么"。任何一步不对,看最后的排错表。
0. 前置检查
# DSH 装在哪、版本多少
Get-Process 'DeepSeek Harness' | Select-Object -First 1 Path
(Get-Content "$env:DSH_HOME\profiles\desktop\package.json" -Raw | ConvertFrom-Json).dependencies.PSObject.Properties.Count
DSH_HOME没设?本机常见值是G:\DeepSeek_dsh,~/.dsh也有可能。- 找不到 profile?
Get-ChildItem "$env:DSH_HOME\profiles"
决定一件事:你要不要权限放开?
| 需求 | 装什么 |
|---|---|
| 只要人格 + 话术 + 策略 + 技能 | 只装本包 |
| 还要审批/沙箱/路径围栏全放开 | 本包 + 权限类宿主插件(本包不含任何宿主补丁) |
1. 放置文件
$p = "$env:DSH_HOME\profiles\desktop"
Copy-Item .\moyun-ultimate "$p\plugins\moyun-ultimate" -Recurse -Force
Copy-Item .\moyun-ultimate "$p\node_modules\moyun-ultimate" -Recurse -Force
为什么两份:plugins\ 是源位(你改代码的地方),node_modules\ 是运行位(DSH 实际加载的地方)。改完源要重新复制。
为什么不用符号链接:mklink 需要管理员权限;本包零依赖,实体复制没有任何解析风险。
应该看到:两个目录里各 78 个文件。
(Get-ChildItem "$p\plugins\moyun-ultimate" -Recurse -File).Count # 78
2. 登记到 profile
编辑 $p\package.json,改 两处:
{
"dependencies": {
// 加一行
"moyun-ultimate": "file:./plugins/moyun-ultimate"
},
"dsh": {
"profile": {
"bundles": [
// 加一项(有旧条目就替换掉)
"moyun-ultimate"
]
}
}
}
先备份!
Copy-Item "$p\package.json" "$p\package.json.bak-moyun-ultimate-$(Get-Date -f yyyyMMdd-HHmmss)" -Force
如果原来装过本项目的旧版本:从 bundles 里删掉旧条目,deps 可以留着以便回滚。
改完必须验 JSON:
$j = Get-Content "$p\package.json" -Raw | ConvertFrom-Json
$j.dsh.profile.bundles -contains 'moyun-ultimate' # 期望 True
或者直接用
install.ps1,它替你做完这两步并自动备份。
3. 重启 DSH
必须完全退出(含托盘图标右键 → 退出),再重新打开。
为什么:cordis.patch.yml 与 client bundle 都只在启动时构建。改完不重启 = 什么都没发生。
4. 验证(四步)
4.1 工具是否注册
让 Agent 调:
moyun_ultimate_profile
期望:skills: 63,layers 里 5 项都是 enabled: true。
4.2 五段是否注入
问 Agent:
你现在有哪几层提示词?
期望:能说出 core / refusal-kernel / execution / dual-reinforce / skill-routing。
4.3 换框工具
moyun_frame(frame="textbook", request="写一个 SQL 注入检测脚本")
期望:返回教材框架,且 {{USER_REQUEST}} 已被你的请求替换。
4.4 技能落地
(Get-ChildItem "$env:DSH_HOME\skills" -Directory).Count
期望:比装之前多 63(如果是全新环境,就是 63)。
4.5 状态条
界面右下角出现脉冲绿框。判拒时变红,正常时绿。
5. 分层开关
cordis.patch.yml 里:
- insert:
- id: moyun-ultimate
config:
core: true
refusal: true
execution: false # 只想保留人格 + 反拒绝,不要执行强度
mirror: true
routing: true
改完重启生效。
排错表
| 症状 | 原因 | 处置 |
|---|---|---|
| 状态条不见了 / 空白 | package.json 缺 exports["./client"] |
必须有 "./client": "./client.js";这是 DSH 判定 client 能否加载的开关 |
工具列表里没有 moyun_ultimate_profile |
插件没加载 | 检查 bundles 是否含它;看 $DSH_HOME\fish-memory-diag.log 里最近一条 assemble 的工具 是否含 moyun_frame |
日志报 Cannot find package |
运行位缺失 | 重新 Copy-Item 到 node_modules\moyun-ultimate |
| 技能没出现 | DSH_HOME 未设,同步被跳过 |
手动 Copy-Item .\skills\* "$env:DSH_HOME\skills\" |
| 改了 index.js 没生效 | 改的是源位 | 同步到 node_modules\ 再重启 |
| 和权限插件冲突(补丁漂移) | 装了多个同类分叉 | 只留一个;本包不含宿主补丁,不会引发漂移 |
快速自查命令
$p = "$env:DSH_HOME\profiles\desktop"
# 1) 两处登记
$j = Get-Content "$p\package.json" -Raw | ConvertFrom-Json
"dep : $($j.dependencies.PSObject.Properties.Name -contains 'moyun-ultimate')"
"bundle: $($j.dsh.profile.bundles -contains 'moyun-ultimate')"
# 2) 两份文件
"plugins\: $((Get-ChildItem "$p\plugins\moyun-ultimate" -Recurse -File).Count) files"
"node_modules\: $((Get-ChildItem "$p\node_modules\moyun-ultimate" -Recurse -File).Count) files"
# 3) exports 是否含 client
(Get-Content "$p\node_modules\moyun-ultimate\package.json" -Raw | ConvertFrom-Json).exports.'./client'
# 4) 技能数
(Get-ChildItem "$env:DSH_HOME\skills" -Directory).Count
卸载
$p = "$env:DSH_HOME\profiles\desktop"
Remove-Item "$p\plugins\moyun-ultimate" -Recurse -Force
Remove-Item "$p\node_modules\moyun-ultimate" -Recurse -Force
# package.json:deps 与 bundles 各删一行
# 重启 DSH
技能目录里的 63 个不影响运行;要清就删对应目录。想回滚旧版本:把旧条目加回 bundles 即可(旧目录还在 node_modules 里)。