@norman-else/dsh-claude 0.1.40 → 0.1.42
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/README.md +7 -3
- package/lib/bin.mjs +1 -1
- package/lib/client.d.ts +47 -1
- package/lib/client.js +2192 -523
- package/lib/client.js.map +1 -1
- package/lib/{events-OhBoFNKO.mjs → events-oovRTmX7.mjs} +10 -2
- package/lib/events-oovRTmX7.mjs.map +1 -0
- package/lib/index.d.mts +56 -3
- package/lib/index.mjs +1424 -202
- package/lib/index.mjs.map +1 -1
- package/lib/{presenters-BBoM1Ju1.mjs → presenters-BVWj7u0a.mjs} +21 -2
- package/lib/{presenters-BBoM1Ju1.mjs.map → presenters-BVWj7u0a.mjs.map} +1 -1
- package/lib/{preset-installer-loenwnLS.mjs → preset-installer-JUktnfwS.mjs} +2 -2
- package/lib/{preset-installer-loenwnLS.mjs.map → preset-installer-JUktnfwS.mjs.map} +1 -1
- package/lib/preset-route.mjs +2 -2
- package/package.json +1 -1
- package/lib/events-OhBoFNKO.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -74,16 +74,19 @@ Preset cleanup removes only installer-managed content and refuses to delete user
|
|
|
74
74
|
- **Local Claude environment compatibility** — Preserves the user's existing Claude Code authentication, settings, `CLAUDE.md`, Skills, Hooks, Plugins, tools, and MCP configuration.
|
|
75
75
|
- **Real-time streaming and conversation continuity** — Streams Claude responses and tool activity into DSH while retaining multi-turn context and persisted Claude session resume.
|
|
76
76
|
- **DSH permissions and questions** — Routes Claude tool permission requests through DSH approvals and Claude clarification prompts through DSH's native question forms.
|
|
77
|
+
- **Plan review** — Under read-only access Claude works in plan mode, and the plan it hands back is read in a plugin-owned panel in the details column, rendered as Markdown under the prose palette chosen in this plugin's settings. The approval itself stays with DSH: its dialog names the decision and points at the panel instead of pasting the plan into a plain-text modal, and it is asked even under Full access — that setting waives actions, not the decision the plan was written to put in front of the user. Full access silences approvals outright (`approval/policy: never`, answered before any surface is shown), so the ask is un-silenced for as long as the plan is open and the session's own policy is put back afterwards. Approving and rejecting are the only answers the dialog has, and neither is "change this", so the panel adds the third: select a passage, write what should change, and send the plan back — the notes reach Claude as the reason it was refused, and the dialog closes itself. A session that proposes more than once keeps every plan: the panel heading becomes a picker listing each with its own decision, and a fresh proposal awaiting approval takes the panel back. The Session header carries a plan toggle, dotted while a plan is still waiting on its decision, and the turn's tool card carries the same plan.
|
|
77
78
|
- **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.
|
|
79
|
+
- **Prompt snippets** — Keeps the half-written messages a user retypes every day as ordinary Markdown files in `~/.claude/prompts`, one per file, and offers them as a second `/` group beside the Claude command catalog. Picking one drops its text into the composer instead of sending it, so the draft stays editable — a snippet is a message the user finishes, not a command that runs. A control in the composer's own tool row, beside the attach and access controls, saves the current draft as a new snippet: it offers the draft's opening line as the file name and names the file it wrote. It costs the layout nothing — a docked row would move the composer on every keystroke — and an existing name is never overwritten. The derived name is only the starting point: a Claude Haiku call names the snippet properly and replaces it when it lands, unless the user has already started typing, and a failed or slow suggestion is a non-event because a working name was there from the first frame. That call runs with extended thinking off, which is what keeps it around three seconds rather than ten.
|
|
80
|
+
- **Rewrite a draft with AI** — A second control in the same tool row hands the current draft to Claude Haiku and replaces it with a version an agent can act on without asking follow-up questions, keeping every concrete detail the original carried. `SessionInput.setDraft` merges into the editor's undo history rather than adding a step to it, so Ctrl/Cmd+Z would not bring the original back: the button holds it instead, and offers it back for as long as the rewrite is still on screen unedited. The rewrite is told to leave every reference to a person as written — asked to rewrite "assign it to me", the model otherwise reaches into Claude Code's ambient context and substitutes the operator's real email address. Editing, renaming, and deleting happen in the user's own editor, and a file added there shows up in the menu without a reload.
|
|
78
81
|
- **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.
|
|
79
|
-
- **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.
|
|
82
|
+
- **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. Every turn is admitted against a captured working tree, so the same rewind optionally puts the checkout back to where the discarded turns found it — files created since are removed, changed files are restored, and files `.gitignore` covers are left alone.
|
|
80
83
|
- **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.
|
|
81
84
|
- **Redacted activity timeline** — Displays thinking summaries, tool calls and results, permission events, questions, status changes, usage, errors, and subagent activity without persisting credentials.
|
|
82
85
|
- **Selectable AI output renderer** — Draws Claude's output either with this plugin's own transcript (interleaved prose, grouped tool cards, activity rows) or with DSH's native conversation renderer, where prose arrives as ordinary assistant text blocks, thinking as reasoning blocks, and root Claude tools as native tool cards (terminal, diff, search, read). Chosen in Settings and applied from the next turn; the plugin transcript remains the default, and turns already recorded keep the renderer that drew them.
|
|
83
86
|
- **Background task tracking** — Shows running and completed Claude subagents or background tasks with task status, recent tools, and expandable activity.
|
|
84
87
|
- **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.
|
|
85
88
|
- **Turn accounting** — Closes each turn the plugin transcript drew with the footer DSH gives only its own messages: tokens, cache hit rate, wall time, time to first token, and cumulative cost. The timings are measured as the turn runs, because activity records carry no clock of their own.
|
|
86
|
-
- **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.
|
|
89
|
+
- **Managed process lifecycle** — Keeps one live Claude process per active session, serializes turns, evicts idle processes, queues user turns FIFO when every process slot is busy, converges safely after the limit is lowered, and handles Stop, cancellation, restart, and process-tree cleanup.
|
|
87
90
|
- **Bilingual interface** — Ships every user-facing string in both English and Chinese.
|
|
88
91
|
|
|
89
92
|
### 3.2 Repository, worktrees, and pull requests
|
|
@@ -93,6 +96,7 @@ Preset cleanup removes only installer-managed content and refuses to delete user
|
|
|
93
96
|
- **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.
|
|
94
97
|
- **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.
|
|
95
98
|
- **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.
|
|
99
|
+
- **Session alerts** — Raises a desktop notification when a session the user is not looking at starts waiting on an approval or an answer, or finishes its turn; clicking it brings that session up. The session on screen never raises one, a prompt is announced once, and the whole thing is switched off from Settings.
|
|
96
100
|
- **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.
|
|
97
101
|
- **Line-level review comments** — Records the user's own line or range comments against the diff and attaches them to the next Claude message.
|
|
98
102
|
- **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.
|
|
@@ -105,7 +109,7 @@ Preset cleanup removes only installer-managed content and refuses to delete user
|
|
|
105
109
|
|
|
106
110
|
### 3.3 Diagnostics, settings, and updates
|
|
107
111
|
|
|
108
|
-
- **Claude Code settings and Doctor** — Adds a Settings panel for runtime diagnostics, supported Claude settings, output style, AI output renderer, worktree branch prefix, process limits, and authentication and handshake status.
|
|
112
|
+
- **Claude Code settings and Doctor** — Adds a Settings panel for runtime diagnostics, supported Claude settings, output style, AI output renderer, session alerts, worktree branch prefix, process limits, and authentication and handshake status.
|
|
109
113
|
- **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.
|
|
110
114
|
- **Bounded requests and a rationed connection pool** — Caps the plugin's share of the browser's per-origin connections so its own panels can never starve each other or the Host, and gives every route a declared time budget — answers from memory, local Git work, and calls that reach the network each get their own — with the client waiting one round trip longer than the server, so a slow operation reports which budget elapsed instead of hanging in the browser's queue.
|
|
111
115
|
- **Plugin updates** — Checks npm for new releases and updates in place, only when the installation is uniquely identified; local development links are never replaced.
|
package/lib/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-
|
|
2
|
+
import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-JUktnfwS.mjs";
|
|
3
3
|
import { access } from "node:fs/promises";
|
|
4
4
|
import { delimiter, isAbsolute, join } from "node:path";
|
|
5
5
|
import { constants } from "node:fs";
|
package/lib/client.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ declare const en: {
|
|
|
58
58
|
readonly worktreeBranchPrefixEffect: "Prefix changes apply to subsequently generated Worktree branches. Explicit full branch names remain unchanged.";
|
|
59
59
|
readonly maxProcessesSetting: "Claude process limit";
|
|
60
60
|
readonly idleTimeoutSetting: "Idle timeout (minutes)";
|
|
61
|
-
readonly maxProcessesEffect: "
|
|
61
|
+
readonly maxProcessesEffect: "Saving immediately reclaims excess idle processes; running processes converge after they finish. New sessions wait for capacity while every process is busy. Blank or invalid values are rejected.";
|
|
62
62
|
readonly idleTimeoutEffect: "The idle timeout applies after the next completed turn. Blank or invalid values are rejected.";
|
|
63
63
|
readonly settingHint: "Show details";
|
|
64
64
|
readonly pluginUpdate: "Plugin updates";
|
|
@@ -191,10 +191,45 @@ declare const en: {
|
|
|
191
191
|
readonly yes: "Yes";
|
|
192
192
|
readonly no: "No";
|
|
193
193
|
readonly diffOpen: "View branch changes";
|
|
194
|
+
readonly planPanelTitle: "Plan";
|
|
195
|
+
readonly planClose: "Close plan panel";
|
|
196
|
+
readonly planOpen: "View plan";
|
|
197
|
+
readonly planMaximize: "Maximize plan panel";
|
|
198
|
+
readonly planRestore: "Restore plan panel";
|
|
199
|
+
readonly planNth: "{index} / {total}";
|
|
200
|
+
readonly planHistory: "Plans in this session";
|
|
201
|
+
readonly planNotePlaceholder: "What should change? Enter files a note, ⌘/Ctrl+Enter sends";
|
|
202
|
+
readonly planNoteQuotedPlaceholder: "What should change about the selected passage?";
|
|
203
|
+
readonly planNoteHint: "Select a passage above to quote it";
|
|
204
|
+
readonly planNoteRemove: "Remove this note";
|
|
205
|
+
readonly planQuoteClear: "Clear the quote";
|
|
206
|
+
readonly planSendForChanges: "Send for changes";
|
|
207
|
+
readonly planSending: "Sending…";
|
|
208
|
+
readonly planSettled: "This plan was already decided in the approval dialog; the notes were not sent.";
|
|
209
|
+
readonly planFeedbackFailed: "The notes could not be sent. Try again.";
|
|
210
|
+
readonly planPending: "Awaiting approval";
|
|
211
|
+
readonly planApproved: "Approved";
|
|
212
|
+
readonly planRejected: "Rejected";
|
|
213
|
+
readonly planEmpty: "This session has no plan to read yet.";
|
|
214
|
+
readonly planPendingHint: "Approve or reject this plan in the DSH approval dialog.";
|
|
194
215
|
readonly diffClose: "Close diff panel";
|
|
195
216
|
readonly sessionMenu: "Session menu";
|
|
196
217
|
readonly sessionMenuOpenIn: "Open in";
|
|
197
218
|
readonly sessionMenuOpenFailed: "Could not open: {message}";
|
|
219
|
+
readonly promptSource: "Prompts";
|
|
220
|
+
readonly promptSave: "Save as a prompt";
|
|
221
|
+
readonly promptSaveName: "Name";
|
|
222
|
+
readonly promptSaveNaming: "Naming it…";
|
|
223
|
+
readonly promptRefine: "Rewrite with AI";
|
|
224
|
+
readonly promptRefineBusy: "Rewriting…";
|
|
225
|
+
readonly promptRefineUndo: "Put the original back";
|
|
226
|
+
readonly promptRefineFailed: "Could not rewrite: {message}";
|
|
227
|
+
readonly promptSaveConfirm: "Save";
|
|
228
|
+
readonly promptSaveCancel: "Cancel";
|
|
229
|
+
readonly promptSaveDone: "Got it";
|
|
230
|
+
readonly promptSaved: "Saved as \"{name}\"";
|
|
231
|
+
readonly promptSaveExists: "A prompt with that name already exists. Try another.";
|
|
232
|
+
readonly promptSaveFailed: "Could not save: {message}";
|
|
198
233
|
readonly presetHeaderHint: "The agent preset this session runs";
|
|
199
234
|
readonly diffWorkingTree: "Branch changes";
|
|
200
235
|
readonly diffFiles: "{count} modified file(s)";
|
|
@@ -372,6 +407,17 @@ declare const en: {
|
|
|
372
407
|
readonly rewindFailed: "The rewind failed ({code}).";
|
|
373
408
|
readonly rewindBusy: "This session is running; wait for the turn to finish before rewinding.";
|
|
374
409
|
readonly rewindStale: "The Host process is still running the previous plugin build, which has no rewind route. Restart DSH and try again.";
|
|
410
|
+
readonly alerts: "Session alerts";
|
|
411
|
+
readonly alertsOff: "Off";
|
|
412
|
+
readonly alertsOn: "On";
|
|
413
|
+
readonly alertsEffect: "Raises a desktop notification when another Claude session needs you — waiting on an approval, waiting on an answer, or finished its turn. The session on screen never raises one. Clicking a notification brings that session up. The system asks for notification permission the first time; refusing it turns alerts off. Takes effect immediately.";
|
|
414
|
+
readonly alertNeedsPermission: "Waiting on your approval";
|
|
415
|
+
readonly alertNeedsAnswer: "Waiting on your answer";
|
|
416
|
+
readonly alertTurnFinished: "Finished its turn";
|
|
417
|
+
readonly alertFallbackTitle: "Claude session";
|
|
418
|
+
readonly rewindRestoreFiles: "Also put the files back to where this turn found them";
|
|
419
|
+
readonly rewindRestoreFilesHint: "The removed entries are hidden from this session and Claude forgets them, and the checkout returns to the state this turn started from — files created since are deleted, changed files are restored, and files ignored by .gitignore are left alone. The message text goes back to the composer so you can edit and resend it.";
|
|
420
|
+
readonly rewindFilesUnavailable: "The conversation was rewound, but the files were left alone: that turn recorded no working-tree snapshot.";
|
|
375
421
|
readonly turnUsage: "Turn usage";
|
|
376
422
|
readonly turnUsageTokens: "{count} tok";
|
|
377
423
|
readonly turnUsageCache: "Cache hit {percent}%";
|