@norman-else/dsh-claude 0.1.52 → 0.1.54

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 CHANGED
@@ -76,6 +76,7 @@ Preset cleanup removes only installer-managed content and refuses to delete user
76
76
  - **Local Claude environment compatibility** — Preserves the user's existing Claude Code authentication, settings, `CLAUDE.md`, Skills, Hooks, Plugins, tools, and MCP configuration.
77
77
  - **Real-time streaming and conversation continuity** — Streams Claude responses and tool activity into DSH while retaining multi-turn context and persisted Claude session resume.
78
78
  - **DSH permissions and questions** — Routes Claude tool permission requests through DSH approvals and Claude clarification prompts through DSH's native question forms.
79
+ - **Claude Code permission modes** — Behind a **Permission selector** setting (Plugin, or DSH native to keep the Host's three-mode control and the plain sandbox mapping), replaces DSH's three-mode access selector, for Claude sessions only, with Claude Code's own modes in the same seat of the composer's tool row: Plan, Default, Accept edits, Don't ask, Auto, and Bypass permissions, each with its own glyph, bilingual name, and description; Auto is greyed out while the catalog says the session's model cannot run it, and an ask its classifier escalates reaches the DSH approval dialog with the classifier's reason under the title. The choice is the plugin's own per-session record and is what the next turn runs under; the DSH sandbox mode and approval policy are moved onto the preset that mode is carried on, so approvals and the sandbox follow without the Host learning any new modes. Bypass asks for an acknowledged confirmation first, the control locks while a turn is running, and a sandbox switched natively afterwards (the `/permission` command) wins over the recorded choice, so DSH's own knobs are never contradicted. The Host's selector is hidden with a scoped CSS rule rather than replaced, since it is not a slot; a Host that renames it simply shows both. A new Claude session starts in the **Default permission mode** from this plugin's Settings, Auto unless changed: the DSH access preset is moved onto the sandbox that mode needs as the session is created, so a Host whose own default preset is full access does not turn it into Bypass.
79
80
  - **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 a right-sidebar tab, 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.
80
81
  - **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.
81
82
  - **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.
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-Cj637ucf.mjs";
2
+ import { i as parseClaudeVersion, n as ensureManagedPreset, r as removeManagedPreset } from "./preset-installer-3CuT5Lrc.mjs";
3
3
  import { delimiter, isAbsolute, join } from "node:path";
4
4
  import { access } from "node:fs/promises";
5
5
  import { constants } from "node:fs";
package/lib/client.d.ts CHANGED
@@ -46,6 +46,12 @@ declare const en: {
46
46
  readonly globalSettingsNewSession: "Changes apply only to new Claude sessions.";
47
47
  readonly globalSettingsError: "Global settings save failed";
48
48
  readonly outputStyle: "Output Style";
49
+ readonly permissionSelector: "Permission selector";
50
+ readonly permissionSelectorPlugin: "Plugin (Claude Code permission modes)";
51
+ readonly permissionSelectorNative: "DSH native (three access modes)";
52
+ readonly permissionSelectorEffect: "Plugin: the composer shows this plugin's selector with every Claude Code permission mode, and new sessions start in the default mode below. DSH native: the Host's own read-only / workspace-write / full-access selector stays, and the mode follows the sandbox alone (read-only is Plan, workspace-write is Accept edits, full access is Bypass); per-session choices and the default mode are not consulted. Takes effect immediately; a running turn keeps its mode.";
53
+ readonly defaultPermissionMode: "Default permission mode";
54
+ readonly defaultPermissionModeEffect: "The Claude Code permission mode a new Claude session starts in; DSH's access preset is moved onto the sandbox that mode needs as the session is created. A session you have since changed with the composer's own selector runs its own choice. A sandbox switched natively (/permission) wins over the mode, and auto yields to Default on a model that cannot run it. Changes apply to sessions created from then on.";
49
55
  readonly renderer: "AI output renderer";
50
56
  readonly rendererPlugin: "Plugin renderer";
51
57
  readonly rendererNative: "DSH native renderer";
@@ -226,6 +232,30 @@ declare const en: {
226
232
  readonly promptSaved: "Saved as \"{name}\"";
227
233
  readonly promptSaveExists: "A prompt with that name already exists. Try another.";
228
234
  readonly promptSaveFailed: "Could not save: {message}";
235
+ readonly permissionMode: "Permission mode";
236
+ readonly permissionModeAria: "Permission mode: {name}";
237
+ readonly permissionModePlan: "Plan";
238
+ readonly permissionModePlanHint: "Read-only exploration; the plan comes back for your approval before anything runs";
239
+ readonly permissionModeDefault: "Default";
240
+ readonly permissionModeDefaultHint: "Every file edit and command asks first";
241
+ readonly permissionModeAcceptEdits: "Accept edits";
242
+ readonly permissionModeAcceptEditsHint: "File edits go through on their own; commands still ask";
243
+ readonly permissionModeDontAsk: "Don't ask";
244
+ readonly permissionModeDontAskHint: "Anything not pre-approved is refused instead of asked about";
245
+ readonly permissionModeAuto: "Auto";
246
+ readonly permissionModeAutoHint: "Claude Code's classifier approves on your behalf and asks you only when unsure";
247
+ readonly permissionModeAutoUnsupported: "The current model does not support auto mode";
248
+ readonly permissionModeBypass: "Bypass permissions";
249
+ readonly permissionModeBypassHint: "Skip every permission check";
250
+ readonly permissionModeLocked: "The permission mode cannot change while a turn is running";
251
+ readonly permissionModeFailed: "Could not switch the permission mode: {message}";
252
+ readonly permissionModeHostKept: "DSH kept its own access preset; Claude still runs the chosen mode";
253
+ readonly permissionBypassTitle: "Skip every permission check?";
254
+ readonly permissionBypassDescription: "Claude Code will run file edits and commands without asking for approval.";
255
+ readonly permissionBypassAcknowledge: "I understand the risk";
256
+ readonly permissionBypassCancel: "Cancel";
257
+ readonly permissionBypassClose: "Close";
258
+ readonly permissionBypassConfirm: "Enable";
229
259
  readonly presetHeaderHint: "The agent preset this session runs";
230
260
  readonly diffRepository: "Repository";
231
261
  readonly repositoryLinked: "Linked repository: changed by this session";
@@ -254,6 +284,9 @@ declare const en: {
254
284
  readonly diffPushAhead: "{count} unpushed commit(s)";
255
285
  readonly diffPushCompleted: "Pushed commit {commit}";
256
286
  readonly diffGeneratingMessage: "Suggesting a commit message. It only fills the fields you leave empty.";
287
+ readonly diffLoadingPreview: "Loading repository changes…";
288
+ readonly diffCommitMessagePlaceholder: "Describe what changed…";
289
+ readonly diffCommitMessageHint: "Start with a short summary. Add details after a blank line.";
257
290
  readonly diffActionFailed: "Repository action failed.";
258
291
  readonly diffIncludeUnstaged: "Include unstaged and untracked changes";
259
292
  readonly diffCommitMessage: "Commit message";