Conversation
- install.ps1: node 警告不再中止安装(EAP=Stop + 2>&1 把 native stderr 当致命 错误;Node >=22 的 MODULE_TYPELESS_PACKAGE_JSON 必现)——改为按退出码判定 - install.ps1/selfcheck.ps1: 反斜杠路径改嵌套 Join-Path(Linux 上反斜杠不是目录 分隔符,会造出名字里带 \ 的目录) - install.ps1: 新机器 ~/.dsh/skills 不存在时先建目录再通配符拷贝(PS 会把第一个 技能容器摊平成 ~/.dsh/skills/SKILL.md,实测 17 个技能只进去 1 个) - plugins/re-framework-tools.js: python 解析加 python3 回退(麒麟等发行版无裸 python,ref_status/ref_merge_index 全挂) - scripts/install.sh: 新增纯 bash 安装器(麒麟/Linux/macOS 无需 PowerShell) - README.md: 修正陈旧描述(5 工具→3、sync_skills.py 已退役)+ 补 Linux 安装 实测:Windows(PS 5.1 + Node 24)install.ps1 成功、selfcheck 四段全绿; Git Bash 端到端跑通 install.sh(17 技能 + preset 到位)。
dsh-persona 0.1.1-rc.2 的 schema 是 { text: required };缺 text 会报
$.text missing required value -> persona 行挂载失败 -> preset 挂载失败 ->
会话创建被回滚(表现为无法新建会话)。仓库此前为更新版 DSH 把字段改名
prefix,在旧版上反而挂不上。
schemastery 不拒绝未知键,因此两个字段都写可同时满足新旧 schema。已用宿主
自己的 dsh-persona.Config 实测:{prefix} 被拒、{text} 通过、{text,prefix} 通过。
全新项目里 knowledge/INDEX.md 还不存在(要先跑 ref_init 建骨架),但强初始化 STEP 1 直接 read 它,于是首次开会话就报: Error: cannot read "E:\programfile\location_camera\knowledge\INDEX.md": not found (实测:location_camera 工作区首次开 RE 会话即触发;该骨架随后才由 ref_init 建出) 修复:三处明确「文件不存在 = 项目未初始化 → 先 ref_init 建骨架再读,不得报错中断」: - dsh/preset/agent.cordis.yml(persona,text/prefix 两个副本) - dsh/SKILL-MAP.md 第〇节 STEP 1 - dsh/skills/core-knowledge/SKILL.md 触发场景
插件在 apply() 里一次性读 ctx.get('subprocess'),读不到就 return,但只声明了
inject: ['tools']。cordis 不保证服务按树序就绪(挂载是异步的),而 0.1.5 的
插件数从 ~200 涨到 520,挂载时序随之变化 —— subprocess 尚未 provide 时 apply
就已执行 → 早退且永不重试 → ref_* / anchorlaw_* 工具全部不注册(会话里看不到)。
实测证据(DSH 0.1.5-rc.2):
- 同一插件用 dev_inject_plugin 在运行时挂载(服务早已就绪)→ 立刻可用;
- 走 profile patch / preset 在启动时挂载 → 工具消失;
- 探针确认 ctx.get('subprocess') 等 7 个服务在运行时都存在。
修复:声明 inject: ['tools', 'subprocess'],让 loader 等服务就绪再挂载。
skills / fs / sandboxPolicy 是调用期读取的可选能力,保持不 inject。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
在 Windows(PowerShell 5.1 + Node 24)上从零安装本仓库的 DSH 适配层时,
install.ps1会在拷贝任何文件之前中止;绕过之后又发现新机器上 17 个技能只装进去 1 个。逐一定位后,本 PR 修复 4 个安装器缺陷 + 补齐 Linux/麒麟安装路径。修复
install.ps1$ErrorActionPreference='Stop'+node ... 2>&1把 native stderr 变成终止错误;Node ≥22 对无type的 ESM 插件必发MODULE_TYPELESS_PACKAGE_JSON→ 安装器在 schema 门禁处直接退出(门禁本身是通过的)$LASTEXITCODE判定;--no-warnings去掉误导性红字install.ps1/selfcheck.ps1Join-Path $dshHome '.agent-presets\re-framework'这类反斜杠拼接在 Linux 上不会转成目录分隔符,会造出名字里带\的目录Join-Path(平台无关)install.ps1~/.dsh/skills不存在时,Copy-Item 'skills\*' -Destination $userSkills会把第一个技能容器摊平成~/.dsh/skills/SKILL.md(实测 17 → 1)New-Item -ItemType Directory $userSkillsplugins/re-framework-tools.jsresolveExecutable('python');麒麟等发行版只有python3→ref_status/ref_merge_index全挂python→python3,全失败才报错(错误信息含两者)scripts/install.sh(新增)install.ps1同语义:schema 门禁 → 幂等清理 legacy 全局工具行 → preset/插件/技能双路径README.mdsync_skills.py(v2.2 已随 Reasonix 归档退役)dsh/skills/单一事实源),并补 Linux 安装段验证
powershell -File dsh/scripts/install.ps1→ 17 技能 + preset 就位;selfcheck.ps1四段全绿(工具链 / 技能 manifest / 安装产物 / 插件 schema)install.sh:Git Bash 端到端跑通(schema 门禁通过、17 个技能目录 + preset + 插件就位、无告警噪音)git show HEAD:dsh/scripts/install.sh确认 blob 为 LF(Linux 可直接执行)诚实声明
install.sh只在 Git Bash(Windows)上端到端验证过;真麒麟/真 Linux 未实测(本机无可用 Linux 环境)。脚本只用cp/mkdir/rm/find/grep+python3,无 GNU 专属参数,但请在麒麟机上跑一次确认。SKIP_SCHEMA_CHECK=1可绕过(不推荐——该门禁存在的原因是扁平 schema 会崩掉所有会话)。