Eleven-is-cool/dsh-worktree--packages-worktree0

@eleven-is-cool/dsh-worktree

Git worktree plugin for DeepSeek Harness: host Remote for worktree resolution/listing/creation plus the client assembly mounting the worktree namespace

包名
@eleven-is-cool/dsh-worktree
版本
0.1.0
许可证
MIT
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Eleven-is-cool/dsh-worktree#b99055eb91315c5668886aaf5437af16d662f71c&path:packages/worktree

@eleven-is-cool/dsh-worktree

Git worktree plugin for the dsh web surface. Two packages:

  • This package: the Host Remote service (worktree) that resolves repositories, lists worktrees and branches, and creates worktrees, plus the client assembly that mounts the worktree Remote namespace into the root scope (the api-remotes/ui-goal split: a consumer can only inject a namespace that a separate entry provides).
  • dsh-client-ui-worktree: the browser panel filling the workspace-row menu hole (sidebar.workspaces.workspaceMenu, declared by dsh-client-ui-workspace).

Shape

Host side — WorktreeRemoteService (ctx.worktree, Remote namespace worktree):

  • resolve({ path }) — resolves the repository root containing an absolute directory. A directory that is not a repository yields up to 50 repositories found directly inside it.
  • list({ root }) — parses git worktree list --porcelain into worktree records (path, branch, HEAD, detached/locked flags; the first record is primary).
  • branches({ root }) — local branch short names for the creation form.
  • create({ root, branch, newBranch, path? }) — runs git worktree add (with -b for a new branch); the target defaults to a sibling directory named - . Returns the new worktree record.

All git invocations use argument-list execFile (no shell) against the caller-supplied root; the service holds no state.

Client assembly — the dsh.client half mounts the worktree Remote contribution through ctx.remote.$mount and returns its disposer; the panel package consumes the mounted namespace.

Model Experience

None. The package registers no tools, injects no prompts, and writes no session events; it serves only the browser panel over the Remote namespace.

Known Limitations and Deferred Work

  • The panel resolves repositories from the Workspace directory only; worktrees outside that directory are not tracked.
  • No worktree removal, prune, or move operations (deferred until a consumer asks for them).
  • The typert artifacts (Client contribution remote/remote-client.js and host manifest lib/typert.host.js) are hand-maintained mirrors of the generator output; update both when Remote methods change.