DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-input-light

l

dsh-input-light

Manifest valid

Input Light — Tab cycles the DSH permission preset (Read Only ⇄ Workspace Write), ⌘S resumes interrupted work with two-step confirm, and the permission chip is color-coded by preset. Client-only DSH p

UI (client)hasBundlePatch

dsh-input-light

English | 中文

License: MIT Release Tests

Composer-side conveniences for DeepSeek Harness (dsh): cycle the permission preset with Tab, resume interrupted work with two taps of ⌘S, and color-code the permission chip by preset. Client-only plugin, zero config, bilingual (en / zh).


What it does

FeatureTriggerBehaviour
Cycle permission presetsTabRead Only ⇄ Workspace Write — never auto-enters Full access / Auto
Resume interrupted work⌘S ×2, or the ↻ button next to the chip ×2Sends 你的工作中断了,请你继续。
Preset colorsautomaticRead Only = amber, Workspace Write = blue, Full access = red

1. Tab cycles the permission preset

Read Only  ⇄  Workspace Write

Why only two presets? As a command, /permission <preset> executes immediately, without confirmation (only picking through the visible control asks you to acknowledge risk). So the cycle deliberately stays inside the two safe presets — use the UI to reach Full access.

Pressing Tab while in a dangerous preset (Full access / Auto) falls back to Read Only.

2. ⌘S resumes interrupted work

Sends a fixed phrase: 你的工作中断了,请你继续。 ("Your work was interrupted, please continue.")

It submits through the host's own input surface, so it behaves exactly like pressing Enter:

ctx.sessions.binding(sessionId)          // → session binding
  → ctx.uiSession.sourceFor(binding)     // → that session's provide channel
  → .props.inputActions                  // → { setDraft, submit, … }
  → setDraft(RECOVERY_TEXT); submit();

The result is a real user/message in the session log (source.kind === "user"), not a call that resolves while nothing happens.

⚠️ Counter-example, for the record: ctx.remote.session.prompt(...) is an ACP protocol method. It resolves, but it does not produce a user message (0 entries in the session log, measured). Do not switch back to it.

Two-step confirmation (anti mis-tap) — shared by ⌘S and the button:

Step⌘SButtonEffect
Firsttap onceclick onceEnters confirm state: the button turns amber ✓, the tooltip becomes "press again to confirm" — nothing is sent
Second (within 3 s)tap againclick againSends
  • Both paths share one state machine, so "⌘S once, then click the button" also confirms.
  • The confirm window is 3 s; after that it reverts to the grey ↻.
  • The button carries a native tooltip showing the action and its shortcut (⌘ S keycaps).

3. The permission chip is color-coded

PresetColorHost theme variable
Read Onlyamber--dsw-alias-state-warn-primary
Workspace Writeblue--dsw-alias-state-business-primary
Full accessred--dsw-alias-state-error-primary

Theme variables (not hard-coded colors) ⇒ follows light/dark automatically. The chip's original inline styles are saved and fully restored on unload — no residue.


Rebinding

Both shortcuts are registered with the host shortcut service, so they appear in the shortcut panel (⌘/):

Command idDefaultAction
input-light.cycleModeTabCycle permission mode
input-light.recover⌘SResume interrupted work (press twice)

Change the keys in that panel — no code changes needed.


Install

plugin_manager action=install_bundle
                target=<path-to>/dsh-input-light

See INSTALL.md. In short: register the bundle in your DSH profile, then restart DSH (a newly added bundle is only picked up at startup; later code edits only need a page refresh).


Implementation constraints

Read index.md for the full engineering log. The four constraints that caused every rewrite along the way:

  1. External client plugins can only render into root-scoped slots. Seats like conversation.input.* are scope: "session": a plugin registration succeeds but never renders (5/5 seats measured mounted: false). This plugin uses shell.overlay (kind: "list", scope: "root").

  2. Shortcuts must go through ctx.shortcuts. Raw DOM keydown never sees Tab or ⌘S — the host's keyboard layer consumes them before the DOM (plain characters arrive; those two never do). Registration also requires regions: ['page', 'editable'], otherwise commands do not fire while the composer is focused.

  3. Cordis services and their sub-namespaces must be injected. Accessing an undeclared one throws (cannot get property "remote.commands" without inject).

  4. Registration must be idempotent. apply runs more than once; re-registering a command id throws Duplicate shortcut command, and when that happens before the second command is registered, neither is registered — silently breaking a shortcut that used to work.


Self-check

node test/logic.test.mjs     # 60 pure-logic cases, no DSH needed

In the browser console:

__dshInputLight.probe()        // { chipFound, preset, sessionId, tooltip }
__dshInputLight.state()        // result of the last cycle / recover
__dshInputLight.confirmStage() // 'idle' | 'confirm'
__dshInputLight.cycle()        // cycle once, manually
__dshInputLight.confirm()      // run the two-step confirm (same path as ⌘S)
__dshInputLight.send()         // send without confirming (self-check only)
__dshInputLight.restoreChip()  // restore the chip's original styling

License

MIT © 2026 luzonghao

Comments

Loading…

Similar plugins

dsh-approval-mode

by NEVSTOP-LAB

DSH 审批模式插件,在 DSH 窗口的权限下拉框(Read Only / Workspace Write / Full Access)旁边加一个「审批模式」按钮,在 Workspace Write 模式下工具调用自动放行

Security & AuditManifest valid

★ 7

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add dsh-approval-mode

by tianyaojiudi-prog

DSH(DeepSeek Harness) 插件:把一段可在设置页随时改写的文字,作为全局系统提示词段注入到所有会话,含子代理与工作流内部子代理;文本与开关即时生效,无需重启。

Tools & CapabilitiesManifest valid

★ 8

MIT

JavaScript

Oct 4, 2026

dsh plugin --profile web add dsh-djy-xttsc

by vollegrewar

Layered syntax highlighting for bash/pwsh command and read code output in the DSH web GUI (VS Code Dark+ palette: keywords/strings/numbers/functions/comments each get a color); colors only what it rec

UI & ExperienceDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 0

↓ 112/wk

MIT

JavaScript

Sep 1, 2026

dsh plugin --profile web add dsh-tool-highlight

by SanYe-SanJiu

Windows-only process control for the harness: a sidebar button that shuts DSH down through the host's own graceful exit path, an app-window / normal-tab switch on the Plugins card that rewrites the de

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-power-switch

by shuind

Compact Codex coding mode for DSH: light prompt guardrails against GPT over-explaining, with an editable prompt and native Codex-style tools.

Models & ProvidersManifest valid

★ 6

↓ 884/wk

MIT

TypeScript

Sep 21, 2026

dsh plugin --profile web add @shuind/dsh-codex-harness

by SiriLee

Per-edit approval gate for DeepSeek Harness — red/green line diff review before write/edit/stream operations · DSH 插件:逐操作审批门,write/edit/stream 执行前进行红绿行级 diff 审查

Security & AuditTools & CapabilitiesManifest valid

★ 3

↓ 197/wk

MIT

TypeScript

Sep 28, 2026

dsh plugin --profile web add dsh-edit-approval