插件目录 / Developer / dsh-2origin
dsh-2origin
已验证 · 实测可装 dongsheng123132
功能简介
dsh-2origin — DSH 插件(工具)
可用 — 实测通过,早期项目
dsh-2origin — DSH 插件(工具) 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-2origin
Evidence-first 2Origin state projection, semantic diff and immutable freeze for DeepSeek Harness.
Chat history is not the handoff artifact. A task.origin.json state is. This plugin lets a DSH agent inspect that state, distinguish semantic content from provenance metadata, compare a complete candidate, and freeze the exact observed version with an optimistic-lock credential.
v0.2 is a formal Codex plugin with a separate proof-only MCP surface. It also removes the default export that made the real Cordis Loader discard namespace inject metadata, and carries a stock Web Loader regression smoke.
Install
dsh plugin --profile <name> add github:dongsheng123132/dsh-2origin
Configure the workspace explicitly:
- id: dsh-2origin
name: dsh-2origin
config:
workspaceRoot: C:/absolute/project/path
stateFile: demo/my-task/task.origin.json
freezeDir: .2origin/frozen
All configured file paths are relative to workspaceRoot. Traversal and symlink escape are refused.
DSH tools
dsh_2origin_status— compact projection, counts, verified-fact count, and recorded-vs-computed hash integrity.dsh_2origin_diff— read-only semantic diff against a complete candidate JSON document. Version, timestamp, actor and stored hash do not create fake content changes.dsh_2origin_freeze— requires the hash just observed from status, refuses stale state, creates a content-addressed snapshot with exclusive creation, and verifies it by reading it back. Repeating the identical request is idempotent.
CLI
dsh-2origin status --root C:/project --state demo/task/task.origin.json
dsh-2origin diff --root C:/project --state demo/task/task.origin.json --candidate next.json
dsh-2origin freeze --root C:/project --state demo/task/task.origin.json --expect <sha256>
The content hash is compatible with 2origin/0.2: SHA-256 over stable canonical JSON, excluding version, updated_at, content_hash, and actor.
Codex and MCP
The repository contains .codex-plugin/plugin.json and an independent stdio MCP server:
state_proofverifies one bounded inline state document and returns only integrity, hashes, counts and violations.state_diff_proofcompares two bounded inline documents and returns changed fields plus content-addressed value/item hashes.
The MCP server never reads or writes the filesystem, rejects secret-shaped keys, caps each document at 1 MiB, and does not echo state prose. It intentionally does not expose freeze: filesystem writes remain on the explicitly configured DSH/CLI surfaces.
Boundaries
The plugin deliberately does not update the live state. Freeze is the only write action and targets a separate snapshot directory. Live-state mutation needs schema and fact-lifecycle policy from its owning system; duplicating a weaker writer here would create a second truth.
This is not a general memory store, plugin trust scanner or activity logger. Tools such as Agent Passport, generic state files and workspace ledgers solve adjacent problems; dsh-2origin is narrowly the verification adapter for an existing 2origin/0.2 task-state document.
Verify
npm test
npm run check
npm run smoke:plugin
npm run smoke:mcp
python C:/Users/ZhuanZ/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-2origin」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:dongsheng123132/dsh-2origin Headless(CLI)profile:
dsh plugin --profile headless add github:dongsheng123132/dsh-2origin 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。