[Plugin] dsh-bang-shell — 输入框以 ! 直接执行 Shell 命令(不经过模型) #6
ClausYang
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dsh-bang-shell
Repository: https://github.com/ClausYang/dsh-bang-shell
Package: @omdsh-dev/dsh-bang-shell
Description
dsh-bang-shell adds Claude-Code-style ! direct shell execution to the DeepSeek Harness Web composer: a message whose first non-whitespace character is ! runs as a shell command in the current session workspace — it is never sent to the model, spends zero tokens, and settles as a durable command card (stdout / stderr / timeout & signal markers / exit code) visible across tabs.
While typing, the composer switches to terminal colors from the first ! keystroke: an amber prompt glyph plus green command text, no background tint, light/dark theme aware.
It supports:
!command interception at Enter adjudication (leading-whitespace tolerant, inline ! never triggers)
Host execution through the session's ctx.shell executor (timeout + sandbox policy inherited)
Empty ! keeps the draft with an actionable error
Install
Requires a DSH core that includes the ! trigger extension (TriggerChar gains '!'; detectTrigger recognizes it; InputMachine routes ! drafts into adjudication — roughly 20 test-first lines in packages/client/ui-input-trigger and packages/client/ui-conversation).
dsh plugin --profile web add /path/to/dsh-bang-shell
Restart dsh web, then refresh the browser.
License
BSD-3-Clause.
Maintenance status
Actively maintained; initial release v0.1.0 (dual-face plugin: host /bang command + browser ! trigger source), 6/6 unit tests, verified end-to-end on a live dsh web at 127.0.0.1:3080.
Known risks / limitations
Depends on the core ! trigger extension; the browser half stays inert on DSH builds without it
Output renders through the generic command card; no dedicated terminal block yet
No shell history expansion (!!); the whole draft submits as one command line
Commands inherit the deployment's sandbox policy — a danger-full-access profile executes ! commands unsandboxed, same as the model's bash tool
All reactions