Introduction

DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. When the main Web interface cannot open due to plugin conflicts or corrupted client patches, an isolated environment is needed for system repair or basic operations. dsh-safe-tui aims to provide such an environment.

Positioning

This is a DeepSeek Harness Safe Mode / Repair Mode TUI, which can also be used as a “Console” tab in DSH Web.

Core features include:
* Environment isolation: No user plugins are loaded, and the Web UI is not loaded.
* Restricted interaction: Interaction only allows official system presets: minimal / standard / code / cordis. User-created presets are not discovered.
* History inheritance: Inherits historical sessions from ~/.dsh/sessions.
* File repair: Automatically repairs corrupted official client files from built-in pristine copies.

Positioning note: dsh-safe-tui is a Safe Mode/Repair-focused TUI. It does not load user plugins, does not load the Web UI, and only allows official system presets. It is used to repair the system when the main interface cannot open. It is not a daily experience-enhancing TUI (for example, ccch1mneyyy/dsh-TUI in the community); the two have different purposes and can complement each other.

Installation and Activation

The plugin itself is a self-contained DSH bundle that includes agent-presets + safe-tui, so there is no need to manually create a profile.

# 从 GitHub 安装并初始化 safe profile
dsh plugin --profile safe add github:aorucshiea/dsh-safe-tui#v0.4.16

You can then run it directly:

dsh --profile safe

Core Features

Safe Mode TUI

On desktop, two entries are typically created: “DeepSeek Harness Safe Mode” (opens the safe terminal) and “DeepSeek Harness Repair” (runs only the repair script and does not require DSH startup).

Web Console

Since v0.5.0, dsh-safe-tui provides Web Console mode.
* The “Console” tab is preserved in DSH Web’s “Conversation | Trajectory | Console” area.
* The panel contains a real xterm.js terminal, and the backend starts dsh --profile safe via node-pty.
* The behavior is consistent with PowerShell/terminal, and Safe TUI commands such as /sessions, /new, /preset, and /repair can be used in full.
* When a Web conversation cannot be loaded due to plugin errors, the left sidebar remains available, and you can switch directly to “Console” to continue operating DSH.
* Safe TUI automatically fixes duplicate session log seq entries caused by forced interruption.

In-Session Handoff

Since v0.6.0, the console by default continues the current Web session.
* When opening the right-side “Console” panel, the current sessionId is automatically attached, and the backend starts Safe TUI with dsh --profile safe --resume <sessionId>.
* After the Web service restarts, Safe TUI is hosted by an independent console-bridge process and does not exit together with the Web process.
* AI can autonomously perform handoff/configuration via tools:
* console_status — View the current session / model / preset / cwd.
* console_set_model — Switch the current conversation model.
* console_set_preset — Switch the current conversation preset.
* console_handoff — Hand off the current Web session to the right-side “Console” panel.
* console_return — Request from Safe TUI to close the console and return to the Web conversation.

Common Commands

Terminal Commands

dsh --profile safe "你的问题"       # 一次性问答
dsh --profile safe --list           # 列出会话
dsh --profile safe --resume <id>    # 恢复指定会话
dsh --profile safe --check          # 检查客户端状态
dsh --profile safe --repair         # 修复损坏文件

TUI Internal Commands

/help
/sessions
/sessions all
/new
/preset [minimal|standard|code|cordis]
/models
/models <provider/model>
/providers
/add-provider
/status
/repair
/clean
/check
/quit

Notes:
* /clean deletes all empty sessions that contain no AI-generated content.
* Model thinking and tool calls are collapsed into one line by default; press Ctrl+O to expand or collapse all details.
* You can switch the preset in an existing session (a prompt may warn that older tool calls may be incompatible).

Cautions

  1. Development stage: The plugin is still in development and may contain bugs. Use it at your own risk.
  2. Permissions: The plugin runs with the permissions of the current dsh process.
  3. Ecosystem context: The DSH philosophy is “everything is a plugin”; the community directory is an independent site and has no official affiliation with DeepSeek / High-Flyer.
  • GitHub: https://github.com/aorucshiea/dsh-safe-tui
  • Directory: https://www.skillhub.cn/plugins/aorucshiea/dsh-safe-tui