@norman-else/dsh-claude 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/INSTALL.md CHANGED
@@ -16,7 +16,7 @@ Stop if Doctor cannot find an authenticated local Claude Code installation. Do n
16
16
 
17
17
  ## 2. Link the bundle into the current Web profile
18
18
 
19
- The bundle retains its package-contained system preset and installs a protected compatibility copy at `$DSH_HOME/.agent-presets/claude` during Host activation. This works around supported DSH release-candidate builds replacing third-party preset roots. Existing user-modified files are preserved rather than overwritten.
19
+ The bundle keeps a protected compatibility preset at `$DSH_HOME/.agent-presets/claude`, because DSH Desktop 2.0.4 does not retain third-party preset roots from bundle patches. Its route uses the active profile package source to avoid duplicate client-module Loaders. User-modified preset files are preserved.
20
20
 
21
21
  ```sh
22
22
  dsh plugin --profile web add "link:$(pwd)"
package/README.md CHANGED
@@ -66,17 +66,126 @@ Preset cleanup removes only installer-managed content and refuses to delete user
66
66
 
67
67
  ## 3. Features
68
68
 
69
+ ### 3.1 Conversation
70
+
69
71
  - **Native Claude Code conversations** — Runs Claude Code as the main agent in a normal DSH conversation instead of wrapping it as a tool or secondary chat.
70
72
  - **Claude preset and model selection** — Adds a `Claude` Agent Preset and exposes Claude Code's `default`, `opus[1m]`, `fable`, `sonnet`, and `haiku` model choices.
71
73
  - **Local Claude environment compatibility** — Preserves the user's existing Claude Code authentication, settings, `CLAUDE.md`, Skills, Hooks, Plugins, tools, and MCP configuration.
72
74
  - **Real-time streaming and conversation continuity** — Streams Claude responses and tool activity into DSH while retaining multi-turn context and persisted Claude session resume.
73
75
  - **DSH permissions and questions** — Routes Claude tool permission requests through DSH approvals and Claude clarification prompts through DSH's native question forms.
74
- - **Managed process lifecycle** — Keeps one live Claude process per active session, serializes turns, evicts idle processes, and handles Stop, cancellation, restart, and process-tree cleanup.
76
+ - **Claude command bridge** — Publishes Claude Code's own command catalog into the DSH command palette, retrying with backoff while a fresh CLI finishes loading Skills and Plugins.
77
+ - **Message queue and steering** — Accepts further messages while a turn is running, and lets a queued message be edited, removed, or steered into the turn already in flight.
78
+ - **Rewind** — Drops a message and everything after it: Claude resumes from the kept turn's transcript anchor and genuinely forgets the discarded turns, the discarded rows are hidden from the append-only DSH log, and the original text returns to the composer for editing and resending.
79
+ - **Ask about a selection** — Answers a question about any selected text through a read-only side query limited to `Read`, `Grep`, and `Glob`, reusing the session's model and thinking mode, with the answer copyable or sendable into the main conversation.
75
80
  - **Redacted activity timeline** — Displays thinking summaries, tool calls and results, permission events, questions, status changes, usage, errors, and subagent activity without persisting credentials.
76
81
  - **Background task tracking** — Shows running and completed Claude subagents or background tasks with task status, recent tools, and expandable activity.
82
+ - **Context usage** — Tracks how much of the context window a session has consumed and surfaces it as a percentage in the conversation and on the session board.
83
+ - **Managed process lifecycle** — Keeps one live Claude process per active session, serializes turns, evicts idle processes, and handles Stop, cancellation, restart, and process-tree cleanup.
84
+ - **Bilingual interface** — Ships every user-facing string in both English and Chinese.
85
+
86
+ ### 3.2 Repository, worktrees, and pull requests
87
+
77
88
  - **Repository and worktree preparation** — Lets a user choose a branch before submitting, switch an eligible local branch, or create a dedicated Git worktree and DSH workspace while transferring the current draft and attachments, and removes a worktree's directory automatically once its workspace is deleted and the tree is clean.
89
+ - **Jira-driven sessions** — Connects to Jira Cloud and starts work from a ticket: the branch is named after the ticket key, the composer is seeded with the ticket brief, the ticket is assigned to the user once the worktree exists, and several tickets can be kicked off at once, each in its own worktree session.
78
90
  - **Repository and pull request status** — Shows the current repository, branch, worktree state, changed-line counts, unpushed commits, GitHub pull request, checks, review state, merge state, and blocking Claude rate limits near the composer.
79
- - **Diff viewer and review comments** Provides an expandable or maximized branch diff, including file statistics and line-level review comments that are attached to the next Claude message.
80
- - **Commit, push, and pull request actions** Supports Commit, Commit & Push, Push, and draft pull request creation, with repository snapshot validation and optional Claude-generated commit messages.
81
- - **Claude Code settings and Doctor** — Adds a Settings panel for runtime diagnostics, supported Claude settings, worktree branch prefix, process limits, authentication and handshake status, and safe npm update checks.
82
- - **Managed preset compatibility** — Installs an idempotent compatibility copy of the Claude preset for supported DSH builds without overwriting user-modified preset content.
91
+ - **Session board** Summarizes every Claude session in one place with its run state, branch, pull request, context usage, auto-fix state, and whether it is waiting on an approval or an answer.
92
+ - **Branch diff viewer** Provides an expandable or maximized branch diff with file statistics, expand-all and collapse-all, on-demand unmodified context, and comment-to-comment navigation.
93
+ - **Line-level review comments** — Records the user's own line or range comments against the diff and attaches them to the next Claude message.
94
+ - **GitHub review threads** — Reads, replies to, resolves, and unresolves pull request review threads inline, with `@` completion for repository members, bot authors marked as such, and a link back to the thread on GitHub.
95
+ - **Commit, push, merge, and pull request actions** — Supports Commit, Commit & Push, Push, draft pull request creation, and merging a pull request as a merge commit, squash, or rebase, with repository snapshot validation and optional Claude-generated commit messages.
96
+ - **Branch updates** — Updates the current branch from its base by rebase (pushed with `--force-with-lease`) or merge, and hands any resulting conflicts to Claude to resolve.
97
+ - **Pull request feedback handoff** — Expands failing check details and GitHub pull request comments and hands either of them to Claude as a fix request.
98
+ - **Auto fix** — Watches an open pull request for new review comments and failing checks, hands each new batch to Claude to fix, commit, and push, and keeps going until everything passes or the watcher is switched off.
99
+ - **Merged branch cleanup** — Removes the worktree and local branch, archives the workspace's sessions, and deletes the workspace; a plain checkout instead returns to the base branch and deletes the merged branch.
100
+ - **Open in an editor** — Opens the session's working directory in Cursor or IntelliJ IDEA from the session menu, trying each platform's launchers in turn and refusing paths the shell would re-interpret.
101
+
102
+ ### 3.3 Diagnostics, settings, and updates
103
+
104
+ - **Claude Code settings and Doctor** — Adds a Settings panel for runtime diagnostics, supported Claude settings, output style, worktree branch prefix, process limits, and authentication and handshake status.
105
+ - **Plan usage** — Reports the signed-in subscription's utilization windows — five-hour, weekly across all models, and weekly per model — with reset countdowns, degrading to unavailable rather than failing on API-key, Bedrock, and Vertex sessions.
106
+ - **Plugin updates** — Checks npm for new releases and updates in place, only when the installation is uniquely identified; local development links are never replaced.
107
+ - **Managed preset compatibility** — Installs a guarded Claude preset whose route reuses the active profile package source, preserving discovery on DSH Desktop 2.0.4 without duplicate client-module Loaders or overwriting user changes.
108
+
109
+ ## 4. Contributing
110
+
111
+ ### 4.1 The two contribution types
112
+
113
+ Every contribution to this repository is exactly one of two types. There is no third type.
114
+
115
+ | Type | Means | Examples |
116
+ | --- | --- | --- |
117
+ | `feature` | Behavior that does not exist yet | A new composer action, a new Settings field, support for a new Claude Code capability, a documented behavior that was never written down |
118
+ | `fix` | Behavior that already exists but is wrong | A crashing slot entry, a wrong token count, a preset that stops being discovered after a Desktop upgrade, a README statement that no longer matches the code |
119
+
120
+ Refactors, dependency bumps, test-only changes, and documentation edits are not separate types. File them as the type that matches their purpose: something that is wrong today is a `fix`, something that does not exist today is a `feature`. If you cannot decide which one applies, that is a signal the issue is not scoped yet — open it as a question first and let the maintainer classify it.
121
+
122
+ ### 4.2 Required flow
123
+
124
+ An issue always comes first. Pull requests that arrive without one are closed unreviewed, regardless of the quality of the code.
125
+
126
+ 1. **Search existing issues.** If your problem or idea is already filed, comment there instead of opening a duplicate.
127
+ 2. **Open an issue** at https://github.com/Norman-else/dsh-claude/issues/new/choose and pick the **Feature** or **Fix** form. Choosing the form is how you declare the type: it sets the `[feature]` / `[fix]` title prefix and the matching label for you. Every field listed in §4.3 is required by the form, so an issue that does not explain why it is needed or in what environment it happens cannot be submitted. Blank issues are disabled — if you genuinely cannot tell which type applies, use the "Not sure whether it is a feature or a fix" link on that page and let the maintainer classify it rather than guessing a type to get past the form.
128
+ 3. **Wait for the issue to be accepted.** The maintainer confirms the type, the scope, and whether the change belongs in this plugin at all — several things that look like plugin bugs are DSH Host or Claude Code CLI behavior. Do not start implementation before this. Work done on a rejected issue cannot be merged.
129
+ 4. **Branch from `master`** using `feature/<issue-number>-<short-slug>` or `fix/<issue-number>-<short-slug>`.
130
+ 5. **Implement and verify** against the rules in §4.4.
131
+ 6. **Open a pull request** that declares its type and links its issue (§4.5).
132
+ 7. **Address review.** The maintainer reviews and approves; the maintainer merges. Contributors do not merge their own pull requests.
133
+
134
+ `master` is protected: direct pushes, force pushes, and branch deletion are blocked, and a pull request needs one approving review before it can merge. Pushing new commits to a pull request dismisses any existing approval, so expect to request review again after changes.
135
+
136
+ ### 4.3 What the issue must contain
137
+
138
+ Both types require enough detail for someone else to reproduce your situation without asking you follow-up questions.
139
+
140
+ **A `feature` issue must state:**
141
+
142
+ - **Motivation** — what a DSH user cannot do today, and why the current workaround is not good enough.
143
+ - **Proposed behavior** — what should happen, described from the user's side, naming the surface it belongs to (composer, hero repository controls, diff panel, activity timeline, Settings panel, Agent Preset picker, …).
144
+ - **Scope and non-goals** — what this explicitly does not cover, so the pull request can be reviewed against a fixed boundary.
145
+ - **Affected layer** — plugin server (`src/`), client (`src/client/`), managed preset (`preset/`), or a combination.
146
+ - **Compatibility** — the DSH Desktop and DSH package line it targets, and the Claude Code CLI version it relies on. Say so if it depends on a Claude Code capability that older CLI versions do not have.
147
+ - **Alternatives considered** — including "do nothing", and why they were rejected.
148
+ - **Whether you intend to implement it** — so the maintainer knows whether to assign it to you or to schedule it.
149
+
150
+ **A `fix` issue must state:**
151
+
152
+ - **Expected behavior vs. actual behavior** — two separate sentences, not one combined complaint.
153
+ - **Reproduction steps** — numbered, minimal, and starting from a clean state. Say whether it reproduces every time or intermittently.
154
+ - **Environment** — plugin version (the `version` field in `package.json`, or the version DSH shows), DSH Desktop version, Claude Code CLI version, operating system, and Node.js version if you installed from source.
155
+ - **Evidence** — the relevant redacted log lines, activity-timeline excerpt, or screenshot. Boot and slot failures surface in the DSH log as `dsh-claude client [boot-check]` and `[slot-entry-crashed]`; include those lines when the plugin fails to load.
156
+ - **Regression range** — the last plugin or DSH Desktop version where it worked, if you know it.
157
+
158
+ **Redact before you post.** Never paste Claude credentials, API keys, session tokens, private repository contents, or customer data into an issue, a pull request, a test fixture, or a log excerpt. This applies to attachments and screenshots as well. The plugin never asks for or stores Claude credentials, and neither should its issue tracker.
159
+
160
+ ### 4.4 Rules for the change itself
161
+
162
+ - **Stay out-of-tree.** Use only public DSH exports. Never patch the installed DSH checkout, and never depend on DSH internals that are not exported.
163
+ - **Respect the ownership split.** Claude Code owns its agent loop and tools; this plugin owns presentation, approval and question surfaces, and managed process lifetime. Changes that re-implement Claude Code behavior inside the plugin will be rejected.
164
+ - **Read the spec first** when you change runtime behavior: `docs/aegis/spec/2026-08-15-dsh-claude-spec.md` and the current plan under `docs/aegis/plan/` and `docs/aegis/plans/`. If you are reacting to a DSH Desktop upgrade, follow `docs/upgrading-dsh-desktop.md` — the Host ships no type declarations, so `pnpm typecheck` cannot see its API drift.
165
+ - **Never log, persist, render, or test with real credentials.** Redact before any durable event append.
166
+ - **Run `pnpm check`** — typecheck for both tsconfigs, the Vitest suite, and the build — and make sure it passes before you open the pull request. Do not claim a change works without it.
167
+ - **Cover behavior with tests** where the change is testable. A `fix` should come with a test that fails before the change and passes after it.
168
+ - **Keep one type per branch.** Do not mix a feature and a fix in the same pull request, even if you found them together — open two issues and two pull requests.
169
+ - **Leave releases alone.** Do not bump `version` in `package.json`, edit `scripts/publish.mjs`, or publish. Releases are maintainer-only via `pnpm release`.
170
+ - **Write commit subjects in the repository's existing style**: imperative mood, describing the intent rather than the mechanics, no `feat:` / `fix:` prefixes. See `git log` for the established pattern — for example, `Report the whole turn's output tokens, not the last call's`.
171
+
172
+ ### 4.5 Pull request requirements
173
+
174
+ Open the pull request against `master` and include all of the following:
175
+
176
+ - **A `Type:` line as the first line of the description** — either `Type: feature` or `Type: fix`. This is how the contribution type is declared; a pull request without it is not reviewed.
177
+ - **A closing reference to its issue** — `Closes #<issue-number>`. A pull request that closes no issue does not get merged.
178
+ - **The matching label** — `feature` or `fix`, the same one carried by the issue.
179
+ - **What changed and how you verified it** — including the `pnpm check` result, and the manual verification you performed in DSH Desktop for anything that touches the UI or the process lifecycle.
180
+ - **A README update** when the change adds or alters user-visible behavior. New features belong in the Features list in §3.
181
+
182
+ The type is declared through the label and the `Type:` line rather than a title prefix so that squashed commit subjects stay in the repository's plain imperative style.
183
+
184
+ ### 4.6 What gets rejected
185
+
186
+ - A pull request with no accepted issue behind it, or with no declared type.
187
+ - A feature and a fix bundled into one pull request.
188
+ - Changes that patch DSH, reach into non-public DSH APIs, or re-implement Claude Code's agent loop.
189
+ - A failing or unrun `pnpm check`.
190
+ - Anything that logs, persists, or renders credentials, including in tests and fixtures.
191
+ - Version bumps, release script edits, or publish attempts from a contribution branch.
package/lib/bin.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-CVdbU87E.mjs";
2
+ import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-BY4846KK.mjs";
3
3
  import { access } from "node:fs/promises";
4
4
  import { delimiter, isAbsolute, join } from "node:path";
5
+ import { constants } from "node:fs";
5
6
  import { homedir } from "node:os";
6
7
  import { scrubbedParentEnv } from "@deepseek-ai/dsh-subprocess";
7
- import { constants } from "node:fs";
8
8
  import { spawnSync } from "node:child_process";
9
9
  //#region src/bin.ts
10
10
  function option(name) {
package/lib/client.d.ts CHANGED
@@ -18,6 +18,9 @@ declare const en: {
18
18
  readonly toolInput: "Input";
19
19
  readonly toolOutput: "Output";
20
20
  readonly toolError: "Error";
21
+ readonly markdownCopy: "Copy";
22
+ readonly markdownCopied: "Copied";
23
+ readonly markdownFootnotes: "Footnotes";
21
24
  readonly tokens: "{count} tokens";
22
25
  readonly doctor: "Run Doctor";
23
26
  readonly refreshing: "Running Doctor…";
@@ -190,6 +193,12 @@ declare const en: {
190
193
  readonly diffTruncated: "The diff exceeds the safe display limit. Use the terminal to inspect the complete content.";
191
194
  readonly diffEmpty: "No tracked file changes to display";
192
195
  readonly diffMaximize: "Maximize diff panel";
196
+ readonly diffCommentPrevious: "Previous comment";
197
+ readonly diffCommentNext: "Next comment";
198
+ readonly diffCommentPosition: "Comment {index} of {total}";
199
+ readonly diffCommentCounter: "{index}/{total}";
200
+ readonly diffExpandAll: "Expand all files";
201
+ readonly diffCollapseAll: "Collapse all files";
193
202
  readonly diffRestore: "Restore diff panel";
194
203
  readonly diffCommit: "Commit";
195
204
  readonly diffCommitMenu: "Open commit actions";
@@ -200,7 +209,7 @@ declare const en: {
200
209
  readonly diffPushDescription: "Push local commits to the remote branch.";
201
210
  readonly diffPushAhead: "{count} unpushed commit(s)";
202
211
  readonly diffPushCompleted: "Pushed commit {commit}";
203
- readonly diffGeneratingMessage: "Reading the repository and generating a commit message…";
212
+ readonly diffGeneratingMessage: "Suggesting a commit message. It only fills the fields you leave empty.";
204
213
  readonly diffActionFailed: "Repository action failed.";
205
214
  readonly diffIncludeUnstaged: "Include unstaged and untracked changes";
206
215
  readonly diffCommitMessage: "Commit message";
@@ -218,8 +227,8 @@ declare const en: {
218
227
  readonly diffSubmitting: "Working…";
219
228
  readonly diffDone: "Done";
220
229
  readonly diffCommitCompleted: "Created commit {commit}";
230
+ readonly diffPrCompleted: "Created the pull request — open it from the repository bar.";
221
231
  readonly diffCommitPreserved: "Local commit {commit} was preserved.";
222
- readonly diffOpenPr: "Open pull request";
223
232
  readonly diffMergePr: "Merge";
224
233
  readonly repositoryMergeMenu: "Open merge options";
225
234
  readonly diffMerge_merge: "Create a merge commit";
@@ -314,6 +323,20 @@ declare const en: {
314
323
  readonly reviewCommentSubmit: "Comment";
315
324
  readonly reviewCommentCancel: "Cancel";
316
325
  readonly reviewCommentRemove: "Remove comment";
326
+ readonly reviewThreadReply: "Reply";
327
+ readonly reviewThreadBot: "Bot";
328
+ readonly reviewThreadAgo: "{age} ago";
329
+ readonly reviewThreadReplyTo: "Reply to @{author}";
330
+ readonly reviewThreadOpenOnGitHub: "Open on GitHub";
331
+ readonly reviewThreadSend: "Send reply";
332
+ readonly reviewThreadResolve: "Resolve";
333
+ readonly reviewThreadUnresolve: "Unresolve";
334
+ readonly reviewThreadResolved: "Resolved";
335
+ readonly reviewThreadOutdated: "Outdated";
336
+ readonly reviewThreadReplyPlaceholder: "Reply to this comment; type @ to mention someone";
337
+ readonly reviewThreadMention: "Mention a repository member";
338
+ readonly reviewThreadReplyFailed: "The reply could not be posted.";
339
+ readonly reviewThreadResolveFailed: "The thread could not be updated.";
317
340
  readonly reviewCommentFailed: "The comment could not be saved.";
318
341
  readonly reviewCommentsClear: "Clear all comments";
319
342
  readonly reviewCommentsSend: "Send comments";