@norman-else/dsh-claude 0.1.41 → 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 +3 -1
- package/lib/bin.mjs +1 -1
- package/lib/client.d.ts +15 -1
- package/lib/client.js +658 -8
- package/lib/client.js.map +1 -1
- package/lib/{events-B-FPMzI7.mjs → events-oovRTmX7.mjs} +5 -2
- package/lib/events-oovRTmX7.mjs.map +1 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.mjs +658 -40
- package/lib/index.mjs.map +1 -1
- package/lib/{presenters-BV42EKkB.mjs → presenters-BVWj7u0a.mjs} +2 -2
- package/lib/{presenters-BV42EKkB.mjs.map → presenters-BVWj7u0a.mjs.map} +1 -1
- package/lib/{preset-installer-yRGfkGjd.mjs → preset-installer-JUktnfwS.mjs} +2 -2
- package/lib/{preset-installer-yRGfkGjd.mjs.map → preset-installer-JUktnfwS.mjs.map} +1 -1
- package/lib/preset-route.mjs +2 -2
- package/package.json +1 -1
- package/lib/events-B-FPMzI7.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -76,6 +76,8 @@ Preset cleanup removes only installer-managed content and refuses to delete user
|
|
|
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
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.
|
|
78
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.
|
|
79
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.
|
|
80
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.
|
|
81
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.
|
|
@@ -84,7 +86,7 @@ Preset cleanup removes only installer-managed content and refuses to delete user
|
|
|
84
86
|
- **Background task tracking** — Shows running and completed Claude subagents or background tasks with task status, recent tools, and expandable activity.
|
|
85
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.
|
|
86
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.
|
|
87
|
-
- **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.
|
|
88
90
|
- **Bilingual interface** — Ships every user-facing string in both English and Chinese.
|
|
89
91
|
|
|
90
92
|
### 3.2 Repository, worktrees, and pull requests
|
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";
|
|
@@ -216,6 +216,20 @@ declare const en: {
|
|
|
216
216
|
readonly sessionMenu: "Session menu";
|
|
217
217
|
readonly sessionMenuOpenIn: "Open in";
|
|
218
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}";
|
|
219
233
|
readonly presetHeaderHint: "The agent preset this session runs";
|
|
220
234
|
readonly diffWorkingTree: "Branch changes";
|
|
221
235
|
readonly diffFiles: "{count} modified file(s)";
|