dsh-doctor
asdf17128
Find what your DeepSeek Harness (dsh) patches silently broke — dead patches, config fields dropped by whole-config repla…
PROJECT TOPICS
PROJECT README
An experimental Git worktree Session Target plugin for DeepSeek Harness. It ports Domi's hardened checkout/apply engine and adapts the product flow to Harness's authoritative Workspace/Session cwd model.
Current scope: real isolated Sessions, a Harness-native Session Target/Worktree Console, reversible Local Preview, accept/rollback/direct-finish flows, a project-scoped acceptance slot, durable recovery receipts, retention, crash recovery, fingerprint CAS, and conservative cleanup. It is not yet Domi's cross-project global Worktree Manager.
worktree_create ToolView. The former project-scoped Worktree tab is temporarily not mounted while the primary flow is stabilised.worktree_ready_for_review as its final model action.| Tool | Purpose |
|---|---|
worktree_create |
Reserve a unique Worktree and distinct owner Session; does not mutate the current Session cwd |
worktree_list |
List only Worktrees owned or created by the current Session in the original project |
worktree_ready_for_review |
Persist the delivery report and stop for explicit human acceptance |
Apply, Finish, Discard, and Remove are intentionally not model tools. A model parameter is not trusted user authorization.
The Client mounts the package-owned strict Typert Remote contribution through the official Gateway. A blank Local Session gets a compact Worktree switch in Harness's public composer tool row. Clicking it opens a confirmation dialog; only confirmation prepares the Host-allocated target and transfers the unsent text/image draft before navigation. The normal Harness Send path remains the only prompt path. Every persisted Session gets a read-only target capsule. When Ready, conversation.input.dock shows one compact acceptance strip with a single primary action and a More menu; the historical ToolView stays compact and replayable. The advanced WorktreeConsoleView, Host control plane, and strict Remote methods remain available internally, but the project-scoped conversation.view tab is intentionally not mounted in v0.2.0. List rows remain path-free; authorized paths are returned only by current, create, or inspect.
/worktree status
/worktree list
/worktree finalize [cleanup|retain_24h|retain_3d|retain_manual]
/worktree finish <custom commit message>
/worktree discard
/worktree remove <checkoutId>
The Client uses strict Remote preflight, preview, rollbackPreview, and finalizePreview; finalize is reserved for an explicitly selected direct-finish shortcut. Every path carries the exact review ID/revision, and commit paths also carry the user-confirmed 1–500 character Commit Message plus retention. The Host revalidates caller, project, managed cwd, review identity, HEAD/fingerprint, and Local CAS; stale cards, post-review edits, and Local drift fail closed.
<repo>--worktrees/<repo>--<checkout-short>--worktree; identity expands on collision instead of overwriting unknown paths. Unsafe siblings fall back to <stateDir>/worktrees/<repository-key>/, while legacy registry paths remain manageable.ownerSessionId is never used as authorization by itself.# npm (recommended)
dsh plugin --profile web add dsh-git-worktree
# Git source (prepare builds Host + Client bundles)
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.2.0
On pnpm >= 10, Git installs may require dsh-git-worktree: true under allowBuilds in the profile's pnpm-workspace.yaml before retrying the add command.
Requires the DeepSeek Harness 0.1.0-rc.6 package line and the Web client for interactive ToolViews.
For repeated iterations, run this from any current checkout, including a Domi managed Worktree:
pnpm run dev:dsh
The command runs typecheck/build, packs the current checkout snapshot into a local tarball under the OS temporary directory, installs it into the web profile, checks the composed config, creates or reuses a marker-protected disposable Git fixture, and finally starts dsh web from that fixture cwd (default http://127.0.0.1:3081). If a DeepSeek/deepseek-harness source checkout is found in the same development tree, it is preferred for launching DSH while the Session workspace remains the fixture; DSH_HARNESS_ROOT or --harness <path> can override it. The installed dsh on PATH is used only when no source checkout is available. The workflow never runs npm publish, pushes Git refs, or creates tags, and it does not leave a symlink pointing at a cleaned managed Worktree. The tarball currently referenced by the profile is retained; older local snapshots are cleaned after a successful install.
Useful entry points:
# Install and verify the current snapshot without starting Web
pnpm run dev:dsh:install
# Check the already-installed profile only
pnpm run dev:dsh:smoke
# Use an existing Git repository or another port/profile
pnpm run dev:dsh -- --repo G:/path/to/repo --port 4090 --profile web
# Explicitly uninstall from the profile and clear local development tarballs
pnpm run dev:dsh:remove
The default fixture is dsh-git-worktree-dev/fixture under the OS temporary directory. The workflow initializes only an absent or empty directory. Reuse requires its plugin marker, the exact Git-root identity, a clean status, and no leftover linked Worktrees. Unknown files, dirty state, symlinks, or retained Worktrees fail closed; the script never resets or deletes repository content. An explicit --repo must already be a Git root and is validated without initialization or rewriting.
worktree_apply surface remains disabled; public delivery is limited to explicit user Preview/rollback/finalize/direct-finish actions.conversation.view tab is temporarily not mounted.agent({ isolation }); Harness still defers that option.See docs/PORTING.md for the Domi-to-Harness boundary and docs/RELEASE.md for release gates.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。