DeepSeek Harness plugin

dsh-ptc-cordis-preset

DSH plugin: a Creation-mode preset built on top of PTC mode — every capability of PTC (Code Mode SDK tool presentation), plus the self-referential Cordis toolset, runtime inspection, dynamic-plugin

Jump to install

Source facts

Repository
KannaKuron/dsh-ptc-cordis-preset
Latest update
Aug 20, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/KannaKuron/dsh-ptc-cordis-preset
Plugin: dsh-ptc-cordis-preset
Author: KannaKuron

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-ptc-cordis-preset

> PTC 模式基础上的创造模式 —— 给 DeepSeek Harness (DSH) 补上第四种组合:Code Mode 工具编排 × 创造能力

DSH 内置四个 preset:标准(standard)、PTC(code,标准之上用 Code Mode SDK 把工具呈现为一个 TypeScript 程序)、极简(minimal)、创造(cordis,标准之上叠加自引用 Cordis 工具与 preset 创作指导)。

内置的创造模式建立在标准模式之上。本插件提供缺失的那一格:PTC 创造模式(ptc-cordis)—— PTC 模式的全部能力原样保留(包括 tool-presentation 的 Code Mode 呈现),叠加创造模式的全部增量:

  • 🧬 自引用 Cordis 工具cordis_inspect / cordis_define / cordis_run / cordis_stop / cordis_undefine:读运行时、定义/运行/停止动态插件包
  • 📐 双平面创作指导 persona — 主机组合 vs Agent preset 的取舍规则,外加 Code Mode 下的组合方式(把 cordis 工具当 SDK 函数写进 run_code 程序)
  • 📚 composition 创作技能随行editing-cordis-compositions / cordis-plugin-development 两个 skill 跟着 preset 走

也就是说:在 PTC 创造模式的会话里,你可以让模型一边用 Code Mode 单程序组合多步操作,一边检查活运行时、试验动态插件、创作新的 agent preset

安装

dsh plugin --profile web add KannaKuron/dsh-ptc-cordis-preset
# 或完整地址
dsh plugin --profile web add https://github.com/KannaKuron/dsh-ptc-cordis-preset

本插件是纯 JS、零构建、零依赖,安装不触发 pnpm 构建脚本,无需 allowBuilds 放行。装完重启 DSH(host 半变更),新建会话时在模式选择器里选 「PTC 创造模式」 即可。

工作原理

DSH 的 preset roster(agentPresets 服务)每次 list() 都重扫各根目录——进程运行中落盘的 preset 立即可见。本插件在启动时把 ptc-cordis preset 物化到第一个 user 信任根(默认 ~/.dsh/.agent-presets/ptc-cordis/):

┌────────────────┐  启动时物化   ┌─────────────────────────────┐
│  dsh 插件       │ ───────────▶ │ ~/.dsh/.agent-presets/       │
│ (host 半)      │              │ └─ ptc-cordis/               │
└───────┬────────┘              │    ├─ agent.cordis.yml  合成组合 │
        │                       │    ├─ preset.yml         显示名  │
        │ skills/ 从本机已装的    │    ├─ skills/            创作技能 │
        │ cordis preset 现场拷贝  │    └─ .plugin-managed.json 标记 │
        └──────────────────────▶└─────────────────────────────┘
                 roster 下一次 list() 即刻可见 → 出现在模式选择器
  • 合成组合:assets/agent.cordis.yml = 内置 code preset 原封不动 + cordis preset 的增量(persona / tool-cordis / customSkillDirs)
  • 技能随部署走:skills/ 不是仓库里的快照,而是从本机已安装的内置 cordis preset 现场拷贝,DSH 升级后重新物化即跟随更新
  • 用户优先,哈希标记:.plugin-managed.json 记录物化时每个文件的 sha256。未改动 → 插件升级时原位刷新;你改过任何文件 → 插件从此不再碰它(启动不覆盖、卸载不删除);一个没有标记的 ptc-cordis 目录是你自己建的 → 插件完全不接管
  • 安静启动(v0.2.1 起):目录未改动、插件版本未变、且本机 cordis preset 的 skills 源哈希一致 → 启动不重写任何文件、不打印任何日志。一行物化日志只在首次安装、插件升级或 skills 源变化(如 DSH 升级)时出现;例行的「已是最新」降级为 cordis logger 的 debug 级(ptc-cordis 命名空间)

更新与卸载

  • 更新:市场页「更新」按钮或重跑安装命令 → 重启 DSH → 未改动的 preset 原位刷新为新版本
  • 市场页卸载:先删包再 dispose → 插件检测到包目录消失, preset 未被你改过 → 自动删除 preset;你改过 → 保留,交给你处理
  • 命令行卸载(dsh plugin --profile web remove dsh-ptc-cordis-preset):独立进程执行,disposer 不会运行,preset 会残留 —— 在设置页删除 ptc-cordis,或手动 rm -rf ~/.dsh/.agent-presets/ptc-cordis
  • 想基于它改出自己的模式?直接在设置页把它复制成新 preset 再改副本,或编辑它(编辑后本插件自动让位)

<details> <summary><b>市场页没出现「更新」按钮?</b></summary>

市场(dshmarket)对 git 安装的插件用「profile 锁文件里的 commit vs GitHub HEAD」检测更新,有三个已知的静默失败点:

1. 30 分钟 TTL 缓存——发布前刷过一次会缓存"无更新",期间再刷直接吃缓存。访问 /dsh-market/updates?force=1 强制刷新。 2. api.github.com 未认证限流(每 IP 60 次/小时)——市场每次检测对每个 git 安装的插件各打一次 API,装多个插件很容易耗尽配额;限流时检测静默失败、显示"已是最新"。等配额重置即恢复(按设备 IP 独立计算)。 3. 安装时机晚于最新发布——若你安装时 HEAD 已是最新 commit(版本号可在市场页或 node_modules/dsh-ptc-cordis-preset/package.json 里确认),没有更新按钮是正确行为。

自查已装版本与锁文件 commit:

grep '"version"' ~/.dsh/profiles/web/node_modules/dsh-ptc-cordis-preset/package.json
grep -o 'codeload.github.com/KannaKuron/dsh-ptc-cordis-preset/tar.gz/[0-9a-f]*' ~/.dsh/profiles/web/pnpm-lock.yaml

绕过检测直接更新(重新解析 HEAD):

dsh plugin --profile web add github:KannaKuron/dsh-ptc-cordis-preset

</details>

使用

1. 新建会话 → 模式选择器选 PTC 创造模式 2. 正常用 Code Mode(run_code 组合多步操作);cordis_inspect 等工具就在 SDK 里,和别的工具一样调用 3. 让它创作 preset / 试验动态插件时,它会自动加载随行的两个创作技能

> ⚠️ 信任边界与内置创造模式一致:cordis_define/cordis_run 会在活运行时上执行模型写的 JavaScript。把 PTC 创造模式的会话当作 shell 访问对待。

> ✅ 与内置创造模式同进程共存(v0.4.0 起):宿主面 runner 的 inspect 注册表遇重复 provider id 即抛错,是"一个进程只能开一个 cordis 模式会话"的唯一根源(v0.2.0 曾用 isolate realm 规避,代价是掐断浏览器桥,v0.3.0 移除)。v0.4.0 在插件启动时装一个兼容 shim:注册先走原路径,仅在撞"已注册"时改为替换条目(同包 manifest 等价,身份守卫 disposer 保持拆卸一致)—— 两个 preset 共用唯一宿主 runner,审批卡/Client Provider/Client 激活/动态工具全通(已实测:双模式同进程挂载 + 9 个 Provider 含 5 个 client 侧全部应答)。shim 是防御式的:形状探测不过即自动退回 v0.3.0 裸挂行为(仅打日志,不影响启动);上游若原生容忍重复注册,原路径自然成功,shim 成为 no-op。根治仍建议上游把 runner 按会话多实例化。

从源码构建与测试

git clone https://github.com/KannaKuron/dsh-ptc-cordis-preset.git
cd dsh-ptc-cordis-preset
npm test   # node --test,11 项冒烟测试(无网络、无构建)

本插件无构建步骤:src/index.jsassets/* 即发布产物。

致谢与许可

  • 合成组合与技能内容派生自 @deepseek-ai/dsh 内置 preset(MIT),运行时从本机安装拷贝,遵循其许可
  • 工程结构与分发方式参考 dsh-deepseek-vision-bridge
  • 本仓库代码:[MIT](./LICENSE)