dsh-plugin-git-tree-viz

中文文档
0.1.2发布于 2026/11/03MITTypeScriptES Module零依赖

Native Git history explorer for DeepSeek Harness: graphs, diffs, sorting, exports and safe local tags.

原始使用文档
文档目录7 节
  1. Features
  2. Compatibility
  3. Install
  4. Safety and semantics
  5. Development
  6. Known limitations
  7. License

Git Tree for DeepSeek Harness

Native Git history explorer for DeepSeek Harness. MIT licensed. No Python, extra server, iframe, or standalone port.

Features

  • Interactive SVG branch graph and commit details, with parent/child navigation and file diffs.
  • Chinese/English UI following the Harness language; light/dark presentation follows its theme.
  • Conversation tab alongside Chat, Trajectory and Context, automatically following that conversation's workspace and repository. Manual repository paths remain available.
  • Type filters, search, time/line-change/file-count sorting in both directions; non-time rankings omit graph edges.
  • Export any committed version as a file snapshot or independent Git repository, optionally on a new branch.
  • Read-only by default. Explicit warning confirmation enables local tags and one-click rollback of all unchanged app-created tags. Tags must be pushed manually.
  • Plugin-owned observers, subscriptions and RPC handlers are removed on unload. The view never changes the Harness URL, global document title or stylesheet.

Compatibility

This first version targets the DeepSeek Harness 0.2.2-alpha.2 native Client/Connection APIs and Node.js 24.9+. Harness APIs are pre-stable; earlier published component versions are not assumed compatible. A recent system Git is required. The package's engines.dsh enforces the supported range.

Install

Install into the profile you actually use:

dsh plugin --profile web add dsh-plugin-git-tree-viz

For a local package, build and pack, then install the resulting tarball:

npm ci --ignore-scripts --legacy-peer-deps
npm run check
npm pack --ignore-scripts
dsh plugin --profile web add /absolute/path/dsh-plugin-git-tree-viz-0.1.2.tgz

Open a conversation and select Git history alongside Chat, Trajectory and Context. Its repository follows that conversation's workspace automatically, including workspaces inside a Git subdirectory. Changing the conversation or workspace resets the graph and write access. If needed, enter another repository path manually. The view keeps graph interactions inside its own ShadowRoot and uses the existing authenticated Connection carrier for all Git operations.

The package includes its built lib/ artifacts; installing a release or Git checkout does not need an install/prepare script. Development dependencies are not runtime dependencies.

Safety and semantics

Only the authenticated owner Peer can invoke the plugin channel. Source writes require a repository- and Peer-specific capability issued after the UI warning. The view returns to read-only on repository changes, remounts and Host generation changes. A read-only source can still be exported to another directory.

Tag and app-ownership refs are created atomically. Undo app tags removes only unchanged tags created by this app in the current repository, including earlier plugin sessions. Manual tags and subsequently moved tags are preserved. Ownership lives under refs/git-tree-viz/tags/*, which is excluded from the visible history. These are local operations; remote tags require manual pushes.

Exports require an absent or empty destination outside the source repository, with an existing parent directory. Output is built in a sibling staging directory and moved into place only on success. Snapshots read committed object bytes, including export-ignore files, and exclude dirty/untracked files. Git copies do not borrow objects through hardlinks or alternates and do not execute checkout hooks. Submodules are left empty; LFS pointer files are retained without downloading objects. External snapshot symlinks are rejected; Windows may represent internal links as target text.

Accepted mutations settle before Host teardown; ordinary reads are cancellable. An interrupted or failed export removes only its own staging directory and does not overwrite a nonempty destination.

Development

npm ci --ignore-scripts --legacy-peer-deps
npm run check

Tests use temporary real Git repositories and a DOM environment; no model API key is required. src/engine.ts owns Node operations, src/index.ts the authenticated Cordis channel, src/client/ native navigation/lifecycle, and src/ui/ the maintained interface derived from git-tree-viz. The build compiles that interface into a scoped function; it does not evaluate source strings at runtime.

Deployment settings in cordis.patch.yml: gitTimeoutMs (120000), maxOutputBytes (134217728) and maxPatchCharacters (200000). Invalid settings fail at activation.

Known limitations

  • Local repository operations only; no GitHub API or automatic push.
  • Whole-history metadata is read before layout; only nearby graph rows are drawn.
  • Source worktree changes are not shown, and submodule/LFS downloads are not performed.
  • Native Client compatibility must be checked for every supported Harness API release.

License

MIT © 2026 YzK0741. The SVG interface derives from the same author's MIT-licensed standalone Git Tree.

版本与发布记录

dsh-plugin-git-tree-viz 共发布 2 个版本,首次发布于 2026/11/03;过去 12 个月发布了 2 个版本。

版本发布日期距今
0.1.2latest2026/11/03今天
0.0.0-stage2026/11/03今天

关于 dsh-plugin-git-tree-viz 的常见问题

dsh-plugin-git-tree-viz 是什么?

用于DeepSeek Harness的本机Git历史资源管理器:图形、差异、排序、导出和安全的本地标签。

如何安装 dsh-plugin-git-tree-viz?

在项目目录运行 npm install dsh-plugin-git-tree-viz,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@deepseek-ai/cordis(^4.0.5 || ^4.0.6-alpha.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

dsh-plugin-git-tree-viz 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

dsh-plugin-git-tree-viz 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

dsh-plugin-git-tree-viz 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24.9.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

dsh-plugin-git-tree-viz 可以商用吗?

dsh-plugin-git-tree-viz 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

dsh-plugin-git-tree-viz 还在维护吗?

最新版本 0.1.2 发布于 2026/11/03(今天);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/11/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。