dsh-chief 1.6.0 → 1.7.0
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/CHANGELOG.md +31 -0
- package/README.en.md +277 -123
- package/README.md +283 -129
- package/api-routes.js +193 -2
- package/board-actions.js +1452 -2060
- package/board-handoff.js +709 -0
- package/board-schema.js +35 -2
- package/chief-approvals.js +6 -2
- package/chief-commands.js +1884 -3486
- package/chief-executor.js +6 -1
- package/chief-network.js +1098 -869
- package/chief-review.js +193 -3
- package/chief-state.js +1996 -3078
- package/chief-view.js +7 -4
- package/client.js +12237 -8021
- package/command-helpers.js +568 -0
- package/command-ops.js +1226 -0
- package/digest.js +25 -3
- package/index.js +6 -0
- package/locale/en.json +4 -4
- package/locale/zh.json +4 -4
- package/model-tools.js +40 -2
- package/network-harness.js +1047 -0
- package/package.json +8 -2
- package/runtime-hooks.js +69 -2
- package/safety/guard-walls.js +5 -0
- package/safety/invariant-guards.js +125 -6
- package/safety/tool-gate.js +2 -0
- package/state-media.js +173 -0
- package/state-schema.js +1505 -0
- package/subagent-runtime.js +57 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ All notable changes to **`dsh-chief`** (**DSH 参谋长**) will be documented in
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.7.0] - 2026-11-22
|
|
9
|
+
|
|
10
|
+
> **Release Theme**: **主页面大屏模式 · 会话级按需零侵入 · 「协同系统」直连本机外协与全页视觉统一** — Opt-in per-session Chief activation & zero-intrusion bypass (Fixes [#6](https://github.com/gluztm/dsh-chief/issues/6)), `conversation.view` Main Page Tab with full entry & subagent-tab controls (Fixes [#5](https://github.com/gluztm/dsh-chief/issues/5)), redesigned "协同系统" with native local CLI dispatch (`Codex` / `Claude Code`), idle-static / active-breathing & SVG flow connectors, phantom standby cleanup, light-theme unification, and full monolith modularization.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **会话级按需启用与普通窗口零侵入(Fixes [#6](https://github.com/gluztm/dsh-chief/issues/6), thanks `@iridiumgit`,`state-schema.js` / `chief-state.js` / `runtime-hooks.js` / `chief-view.js` / `api-routes.js` / `components/Panel.js` / `tabs/plan.js`)**:
|
|
14
|
+
- 将参谋长运行从“进程级全盘接管”收口为**会话级按需激活 (`sessionEnabled`)**:全新普通聊天窗口及其拉起的子代理默认未启用,在 `systemPrompt.section`、`tools/pre-execute`、`agent/pre-step`、`tools/result`、`session/event`、`agent/turn-stopping`、`agent/created` 及 `watchdogTimer` 全 8 处后端钩子直接无害放行,不注入提示词、不触发安全卫兵越界拦截、不运行空转守卫,也不落盘多余看板与空白配置。
|
|
15
|
+
- 在未启用会话打开面板时,顶部显示轻量提示条带与「在本会话启用」按钮;设置页新增「本会话启用参谋长」单窗开关与全局「新会话默认自动启用参谋长」(默认关闭),仅调整语言/通知等纯全局偏好绝不误激活当前普通会话;在会话内主动提问、建任务/边界/档案、连接跨窗或使用交接单部署时自动启用,升级前已配置或已沉淀数据的历史会话自动无损兼容。
|
|
16
|
+
- **内置安全卫兵单会话 / 全局人类专控开关(Fixes [#6](https://github.com/gluztm/dsh-chief/issues/6) comment, thanks `@iridiumgit`,`safety/invariant-guards.js` / `safety/guard-walls.js` / `safety/tool-gate.js` / `chief-executor.js` / `state-schema.js` / `chief-state.js` / `runtime-hooks.js` / `api-routes.js` / `tabs/plan.js` / `tabs/boundaries.js` / `modals/safety.js`)**:
|
|
17
|
+
- 设置页新增独立的「🛡️ 内置安全卫兵(越界 / 凭据 / 高危命令)」卡片,提供**本会话开关**与**全局总开关**(默认全部开启,与右侧栏「红线哨兵」及手工创建的「物理驻墙」相互独立);关闭任一开关须经人类风险确认弹窗(非人类调用方或未勾选确认被后端硬拒绝并写入 `chief-audit.jsonl`),关闭状态时边界页顶部显示警示横幅与一键恢复按钮,且调整全局开关绝不误激活普通未启用会话。
|
|
18
|
+
- **主页面大屏模式 (`conversation.view`) 与完整入口控制(Fixes [#5](https://github.com/gluztm/dsh-chief/issues/5), thanks `@iridiumgit`,`entry.js` / `store.js` / `components/Panel.js` / `tabs/plan.js` / `styles/base.js`)**:
|
|
19
|
+
- 将参谋长注册为对话顶部常驻主页面页签(`order: 1`,标签精简为 `参谋长 / Chief`),支持 1080px 宽屏居中排版、一键大屏/右侧栏切换、自动隐藏宿主底部原生主输入框与 `CC` 用量条(切回对话无痕恢复),并通过 `--dsh-conversation-viewport-height` 兜底兼容 DSH `0.2.2-rc.3` Web GUI 贴底显示。
|
|
20
|
+
- 设置页新增「🖥️ 面板显示位置(主页面 / 右侧栏)」开关卡片:支持 `右侧栏 + 主页面` / `仅主页面` / `仅右侧栏`、独立关闭「输入框旁快捷按钮 (`showComposerEntry`)」与「右下角浮动按钮 (`showCornerTrigger`)」、以及「子代理窗口隐藏参谋长页面」并附友好返回引导卡片。
|
|
21
|
+
- **全新「协同系统」与本机外部代理直连 (`tabs/peers.js` / `styles/bubble.js` / `network-harness.js` / `chief-network.js` / `chief-view.js`)**:
|
|
22
|
+
- 打造液态玻璃风「协同系统」可视化编队画布:支持拖拽/点选入编、工作中自动锁死编队防误拆(HTTP 409 护栏)与一键 `⏹ 急停解体`、待命池一键「刷新扫描」与免切窗发现有效工作区内的休眠会话;系统空闲时保持 100% 静止,工作时对应图标呈柔和主题色呼吸泛光、激活的 SVG 连线呈现方向性虚线流动与光点微粒特效。
|
|
23
|
+
- 支持免 `ccSwitch` 跨平台探测本机外部 CLI(`Codex` / `Claude Code` 等,含 Windows `.cmd` shim、脱敏环境变量直连与派单前自动注入红线和物理驻墙),赋予 `@lead` 主代理完整的已联动窗口与外协编队视野,并打通 L2/L3 桌面取档闭环。
|
|
24
|
+
|
|
25
|
+
### Changed & Fixed
|
|
26
|
+
- **子代理对话默认改为「现有右侧栏加页签」并可切换(Fixes [#5](https://github.com/gluztm/dsh-chief/issues/5) comment #4, thanks `@iridiumgit`,`store.js` / `tabs/peers.js` / `tabs/plan.js`)**:
|
|
27
|
+
- 修复 `openSubagentChat()` 因默认携带 `preferNewPane: true` 触发宿主 `planSplitPane` 不断叠出新侧边栏的问题;改为默认 `{ revealIfOpened: true }` 在现有右侧栏活动面板加 tab(重复点击自动聚焦去重),协同水泡子代理胶囊默认显示「查看」,同时在设置页「面板显示位置」保留「子代理对话打开方式:`现有栏加页签` / `新开分屏`」随时切换。
|
|
28
|
+
- **清理待命池幽灵、后台维护与空白会话 (`chief-network.js`)**:
|
|
29
|
+
- 移除 `listPeerDirectory` 全盘孤儿磁盘扫描,收口发现范围至有效 `workspaceRegistry` 会话;剔除 `Mnemon · Memory maintenance` 等插件后台任务、无标题无任务的空白空壳(如新建未对话的 `DS Bot`)、读取失败快照以及 `.v4` 新格式 `parentSession` / `delegationDepth` 子代理。
|
|
30
|
+
- **修复 `destructive_command` 对文档 heredoc 与只读查询的上下文误判(Fixes [#6](https://github.com/gluztm/dsh-chief/issues/6) comment B, thanks `@iridiumgit`,`safety/invariant-guards.js`)**:
|
|
31
|
+
- `isDestructiveShellCommand` 对无危险管道消费的纯非可执行文件 heredoc(如 `cat > ".../交付说明.md" <<'DOCEOF'`)、`grep`/`rg`、`git log/show/diff/status/commit`(排除 `-c` 等危险参数)及未接管道的 `echo`/`printf` 不再触发正文误杀;同时收紧 `shutdown`/`diskpart`/`mkfs` 上下文锚定、覆盖 `python3 -c "os.system('rm -rf /')"` 并继续 100% 拦截 `.sh` 可执行 heredoc 与 `| bash`/`mysql <<'EOF'` 真实高危注入。
|
|
32
|
+
- **修复 `board.cursor.blocked` 红色「受阻」告警条误报(Fixes [#6](https://github.com/gluztm/dsh-chief/issues/6) comment #7075636856, thanks `@iridiumgit`,`board-schema.js` / `board-actions.js` / `digest.js` / `model-tools.js` / `src/client/utils.js` / `components/Panel.js` / `components/common.js`)**:
|
|
33
|
+
- 新增 `normalizeCursorBlocked` 语义归一化与前端防御层,自动过滤「无」「无(已获用户批准执行)」「已解除」「用户已接受…」「None / N/A / Resolved」等非阻塞陈述,避免误渲染红色告警条,同时完整保留「无法 / 无权限 / 没有找到 / 等待用户批准 / 但仍缺少…」等真实阻塞提示并收紧 `cursor.set` 工具说明。
|
|
34
|
+
- **外部 Agent 协同消息统一归类「跨窗」 (`network-harness.js` / `chief-state.js` / `chief-network.js` / `tabs/peers.js`)**:
|
|
35
|
+
- 外部 Harness 派单与回执统一使用 `channelType: 'pair'` 与 `harness:<provider>` 虚拟根标记(豁免于断连集群隔离),并在前端将新版及历史外部 Harness 消息统一收拢在「跨窗 · 外协」折叠卡片流中(修复双 `@@` 前缀并全面重做消息流视觉)。
|
|
36
|
+
- **全页浅色主题适配、减法瘦身与巨石模块化重构 (`src/` / `tools/`)**:
|
|
37
|
+
- 将协同卡片去中二化重命名为「协同系统」(移除冗余开关与次级页「连接其他对话窗口」「长期规矩」);全面适配 DSH 桌面端浅色主题(含战术浮窗、扇形仪表盘、协同画布与未启用提示条)、统一 5 页签 8 色克制左强调线与 `AccCard` 风格,去掉任务完成态删除线;将所有 `>= 2,000` 行巨石文件拆分为 **44 个后端模块(含 9 个安全内核模块)+ 39 个前端模块**并补全顶层架构注释,版本号升至 `1.7.0`。
|
|
38
|
+
|
|
8
39
|
## [1.6.0] - 2026-11-21
|
|
9
40
|
|
|
10
41
|
> **Release Theme**: **简明可视 · 节约注意力资源(Visual Clarity & Attention Conservation)** — consolidated 5-tab navigation, SVG Flow Canvas & click-to-expand Org Tree, top-bar rotating `⚙️` Settings page, Away Managed reliability loop, and live `zh / en` bilingual UI.
|
package/README.en.md
CHANGED
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
**Right-sidebar supervisor, Cognitive Desktop, pre-execute Guard Walls & multi-agent gate for DeepSeek Harness (DSH)**
|
|
4
|
-
<sub>Saves paths and findings before `/compact` wipes context, tracks subagent DAGs in one view, and enforces Guard Walls + per-action approvals before file edits or commands run.</sub>
|
|
5
|
-
|
|
6
|
-
<img src="assets/chief-10s-compare.gif" alt="Side-by-side comparison: plain long session loses context on compaction vs. dsh-chief saves findings to cold vaults, guards actions, and carries structured handoffs across windows" width="800" />
|
|
7
|
-
|
|
8
|
-
<sub>Read-only by default · Per-action workspace approval · `dsh plugin --profile desktop add dsh-chief`</sub>
|
|
9
|
-
|
|
10
|
-
<br />
|
|
11
|
-
|
|
12
|
-
<img src="assets/v160-highlights.png" alt="dsh-chief v1.6.0 feature highlights: SVG Flow Canvas with cross-step return arcs, attention-first click-to-expand Org Tree, top-bar rotating Settings gear with Presets/Alerts/Hard Budget Breaker, and live zh/en bilingual UI plus redacted .md report" width="100%" />
|
|
13
|
-
|
|
14
|
-
<br />
|
|
15
|
-
|
|
16
|
-
<img src="assets/hero-banner.png" alt="dsh-chief main cockpit view" width="100%" />
|
|
17
|
-
|
|
18
|
-
<br />
|
|
19
|
-
|
|
20
3
|
# DSH Chief (`dsh-chief`)
|
|
21
|
-
|
|
4
|
+
**DeepSeek Harness (DSH) supervisor plugin for both the right sidebar and main conversation tab: opt-in per session with zero intrusion on plain chats, tracking tasks, layered memory, local external CLI harnesses, and pre-execute guardrails.**
|
|
22
5
|
|
|
23
6
|
[](https://dsh.deepseek.com)
|
|
24
7
|
[](https://github.com/gluztm/dsh-chief/releases)
|
|
@@ -31,122 +14,151 @@
|
|
|
31
14
|
[](#)
|
|
32
15
|
[](LICENSE)
|
|
33
16
|
|
|
34
|
-
|
|
35
|
-
> Shares the Router + Workers split from DeepSeek's **[SuperAgent (`dsh-superagent-prototype`)](https://github.com/deepseek-ai/dsh-superagent-prototype)** while keeping Chief state and prompts isolated from the main session.
|
|
17
|
+
<img src="assets/chief-10s-compare.gif" alt="Comparison of plain long sessions vs dsh-chief v1.6.0: 5-tab panel, Flow Canvas, 15% Cognitive Desktop, 30-call budget cap, and pre-execute Guard Walls on the right" width="840" />
|
|
36
18
|
|
|
37
|
-
|
|
19
|
+
<sub>Read-only by default · Asks before editing workspace · One-command install</sub>
|
|
38
20
|
|
|
39
|
-
[
|
|
21
|
+
[简体中文 (`README.md`)](README.md) · **English** · [Evolution (`EVOLUTION.en.md`)](EVOLUTION.en.md) · [Changelog (`CHANGELOG.md`)](CHANGELOG.md) · [Architecture (`ARCHITECTURE.md`)](ARCHITECTURE.md)
|
|
22
|
+
|
|
23
|
+
[What is this?](#what-is-this) · [Quick Start](#quick-start-3-minutes) · [Pick a Preset](#which-preset-should-i-pick) · [Interface](#what-the-panel-looks-like) · [Glossary](#glossary) · [FAQ](#faq) · [Going Deeper](#going-deeper)
|
|
40
24
|
|
|
41
25
|
</div>
|
|
42
26
|
|
|
43
27
|
---
|
|
44
28
|
|
|
45
|
-
## What
|
|
29
|
+
## What is this?
|
|
30
|
+
|
|
31
|
+
In DeepSeek Harness (DSH), the main chat AI reads code, edits files, and runs commands for you. `DSH Chief` sits in the right sidebar as an assistant and safety gate: it does not take over your main chat, and instead saves path notes, tracks multi-step plans, and checks file edits or shell commands before they execute.
|
|
32
|
+
|
|
33
|
+
New chats start read-only by default, so nothing in your project changes until you allow it.
|
|
34
|
+
|
|
35
|
+
**Who is it for:** People running multi-step tasks in DSH who want to stop accidental edits or deletions and avoid losing earlier findings when a long chat compacts.
|
|
46
36
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
U["You (give a task)"] --> L["Main AI works"]
|
|
40
|
+
L --> C{"File edit or command"}
|
|
41
|
+
C --> G["Chief checks first"]
|
|
42
|
+
G --> A["Safe: run normally"]
|
|
43
|
+
G --> B["Risky: ask you first"]
|
|
44
|
+
G --> D["Hits redline: block"]
|
|
45
|
+
G -.-> M["Also saves notes and tracks steps"]
|
|
46
|
+
```
|
|
51
47
|
|
|
52
48
|
---
|
|
53
49
|
|
|
54
|
-
##
|
|
50
|
+
## In One Sentence
|
|
55
51
|
|
|
56
|
-
|
|
52
|
+
- **Opt-in per session with zero intrusion**: Fresh normal chats and their subagents stay untouched by default—zero prompt injection, zero safety blocks, and zero stray board files—until you click "Enable for This Session" or use Chief (you can also restore global auto-enable in Settings).
|
|
53
|
+
- **Save before compacting**: When context fills up, Chief writes paths, commands, and errors to local archives before running `/compact`.
|
|
54
|
+
- **Keep tasks from stopping halfway**: Once you lock an objective, stalled steps get nudged forward, and 3 identical errors stop the loop.
|
|
55
|
+
- **Check edits and commands first**: In active sessions, tool calls check against your Guard Walls (pre-execute rules) before running and pause for approval when needed.
|
|
56
|
+
- **Read-only by default**: Even after enabling a session, Chief observes without touching workspace files until you raise the permission tier (`L0`–`L3`).
|
|
57
|
+
- **Keep prompt tokens low**: Only items pinned to the Cognitive Desktop (up to `2,400 tokens / 6 items`) go into each turn; everything else stays on disk until pulled.
|
|
58
|
+
- **Main page or sidebar + direct local Harnesses**: Open Chief as a full-screen `Chief` top conversation tab (hiding the duplicate host input bar), connect local `Codex` / `Claude Code` without `ccSwitch`, and open subagent chats as tabs without stacking split panes.
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
- **What goes wrong**: When a long session compacts, the summary drops exact file paths, port numbers, and shell fixes you already verified, so the model re-reads files from scratch.
|
|
60
|
-
- **How `dsh-chief` handles it**: Supports `✦ 智选压缩` at idle phase boundaries, custom `10%–95%` or `>= 8,000` token thresholds, or typing `"压缩吧"`.
|
|
61
|
-
- **Fixed order of operations**: It harvests notes into your local session archive and verifies the write before running `/compact` via DSH. Compaction counters only increment after a real, non-empty compaction succeeds.
|
|
60
|
+
---
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
- **What goes wrong**: Left unattended or overnight, an agent updates one file and marks the task done without running checks or builds.
|
|
65
|
-
- **How `dsh-chief` handles it**: Requires locking a Core Objective before enabling Strong Intervention (`0 = ∞` turns with 3-strike identical-error circuit breakers), wakes cleanly across `🛡 Patrol` and `🤖 Managed` on stream interruptions, executes safe L3 steps into a merged `🏁 One-Stop Report`, and holds final completion until your `allowed` checks pass and you approve.
|
|
66
|
-
- Hit the red `⏹ 急停` button at any time to stop background drives and take back manual control.
|
|
62
|
+
## Quick Start (3 minutes)
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
1. **Install the plugin** (replace `desktop` with `web` for the web profile, or search `dsh-chief` in DSH Plugin Market):
|
|
65
|
+
```bash
|
|
66
|
+
dsh plugin --profile desktop add dsh-chief
|
|
67
|
+
```
|
|
68
|
+
2. **Open the panel**: Restart or reload DSH, then click `✦ DSH 参谋长` in the top-right workspace corner.
|
|
69
|
+
3. **Pick a preset**: Click the `⚙️` gear in the top bar. New users can start with **🤝 Daily Co-Pilot** (or leave defaults alone to stay read-only).
|
|
70
|
+
4. **Work normally**: Talk to your main agent as usual; whenever you want Chief to look something up, draft a rule, or organize notes, type plain English or Chinese in the sidebar input box.
|
|
71
|
+
5. **Stop anytime**: Click the red `⏹ 急停` button at the bottom right of the input bar to halt background activity immediately.
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
- **What goes wrong**: Clicking "allow everything" risks `git push --force`, destructive deletes, or reading `.env`, while high-tier supervisors often try to edit files themselves instead of letting your main agent work.
|
|
74
|
-
- **How `dsh-chief` handles it**: Separates permission tiers (`L0 advisor` read-only default / `L1 assistant` / `L2 strategist` per-action approval / `L3 chief`) from header runtime modes (`⏸ Off / 🛡 Patrol / 🤖 Managed`), backed by a pre-execution firewall.
|
|
75
|
-
- **Every new session starts read-only**: Observes code, answers questions, and updates the board without touching your workspace.
|
|
76
|
-
- **Pre-execution guard walls (`tools/pre-execute`)**: Before the main agent, any subagent, or Chief writes a file or runs a command, calls pass through `~/.dsh/chief/guard-walls.json`. Walls switch between `🌐 Global`, `📁 Workspace`, and `⏸ Paused`, merge same-type rules, or get drafted from plain language for your approval. Models in any L0–L3 tier can never mute or remove locked walls — genuine dead-end blockers can only submit a human-approved removal request.
|
|
77
|
-
- **Lazy intervention & background check-ins**: Unless you explicitly ask Chief to edit files directly, it sends structured `[EXECUTION_REQUEST]` items to the main conversation instead of taking over or speaking as you. In a blank new chat, it guides `@lead` to inspect the repo and plan first, and asks clarifying `[INQUIRY]` questions quietly without pausing `@lead`.
|
|
78
|
-
- **Auto-resume after approval & restrict-only policies**: `TaskLedger` picks up unfinished steps once you click Allow; hard rules (compound shells, `node -e`/`python -c`, quote-backslash `.env` tricks, symlinks, NTFS ADS) hold in every tier with logs written to `~/.dsh/chief/chief-audit.jsonl`, alongside optional restrict-only JSON `policyPlugins`.
|
|
73
|
+
---
|
|
79
74
|
|
|
80
|
-
|
|
81
|
-
- **What goes wrong**: Workers live across scattered tabs, and rules mentioned in chat scroll out of context after ten turns.
|
|
82
|
-
- **How `dsh-chief` handles it**: Shows the main coordinator and subagents in one pyramid tree with status controls, `@agent` direct steering pills along the bottom bar, plain-language step explanations, and one-click `分屏` live streams. Pin rules with `📌` in Boundaries so every new task inherits them.
|
|
75
|
+
## Which preset should I pick?
|
|
83
76
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
Open the `⚙️` gear in the top bar to switch between these three built-in presets:
|
|
78
|
+
|
|
79
|
+
| Your situation | Pick this | What it does | Extra background calls? |
|
|
80
|
+
| :--- | :--- | :--- | :--- |
|
|
81
|
+
| Just want to watch without touching files | `👁 Observer` (`L0 · ⏸ Off`) | Read-only; answers only when you ask | No background model calls |
|
|
82
|
+
| Everyday coding (recommended) | `🤝 Daily Co-Pilot` (`L2 · 🛡 Patrol`, sentinel on) | Steps in only on errors or blocked rules; asks before major edits | None while idle |
|
|
83
|
+
| Leaving your desk while a task runs | `🚀 Away Mode` (`L3 · 🤖 Managed`) | Supervises continuously, auto-compacts at 80%, alerts at milestones (requires double confirmation) | Yes, stops at `30 calls / 300K tokens` by default |
|
|
87
84
|
|
|
88
85
|
---
|
|
89
86
|
|
|
90
|
-
##
|
|
87
|
+
## What the panel looks like
|
|
88
|
+
|
|
89
|
+
<img src="assets/hero-banner.png" alt="dsh-chief main cockpit view" width="100%" />
|
|
90
|
+
|
|
91
|
+
The sidebar has 5 tabs plus a top-bar Settings page:
|
|
92
|
+
|
|
93
|
+
| Location | What you do here |
|
|
94
|
+
| :--- | :--- |
|
|
95
|
+
| `Chief` tab | Send instructions in plain language, change permissions or run mode, export reports, or hit `⏹ 急停`. |
|
|
96
|
+
| `Tasks` tab | Lock your Core Objective, inspect Flow Canvas or Org Tree, click `Explain` on steps, and export handoffs. |
|
|
97
|
+
| `Peers` tab | Coordinate `@lead`, subagents, linked windows, and local `Codex` / `Claude Code` CLIs with dormant scan & cross-window mailbox. |
|
|
98
|
+
| `Archives` tab | Manage the pinned Cognitive Desktop and three folded drawers to control prompt tokens. |
|
|
99
|
+
| `Guards` tab | Set up Guard Walls (pre-execute rules), must-do checks, and global redlines. |
|
|
100
|
+
| Top-bar `⚙️` | Switch presets, placement (`Main Tab / Sidebar`), corner/subagent-tab toggles, session opt-in, alerts, budget caps, and `zh / en`. |
|
|
91
101
|
|
|
92
|
-
### 01 · Chief Cockpit
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
### 01 · Chief Cockpit (`参谋` Tab)
|
|
103
|
+
**In one sentence:** Give Chief plain-language instructions, switch permission and run tiers, or hit the red halt button from this tab.
|
|
104
|
+
|
|
105
|
+
- Use the bottom composer to delegate research, draft Guard Walls, or organize notes; toggle `⚡ 强介入`, `✦ 智选压缩`, `🛡 红线哨兵`, `L0–L3` tiers, and `⏹ 急停` on the control strip, or change `⏸ Off / 🛡 Patrol / 🤖 Managed` and the `180°` effort gauge in the top bar.
|
|
106
|
+
- When Dream Roam or auto-review dims the panel with a translucent overlay, **click anywhere on the overlay to dismiss it while the outer border stays lit to show background activity**.
|
|
95
107
|
|
|
96
108
|

|
|
97
109
|
|
|
98
|
-
|
|
110
|
+
### 02 · Flow Canvas & Org Tree (`任务 / Tasks` Tab)
|
|
111
|
+
**In one sentence:** Switch to Flow Canvas for SVG steps and return arcs, or click the Lead card in Org Tree to unfold subagent lanes.
|
|
99
112
|
|
|
100
|
-
|
|
101
|
-
- **Dual Topology Views**: Switch between **Flow Canvas** (SVG sequential plan backbone, sprouted subagent branches, and dashed cross-step return arcs) and **Org Tree** (collapsed to a crisp one-line summary by default to conserve attention; click anywhere on the lead card to expand/collapse subordinate lanes—zero redundant toggle buttons), above the consolidated progress board and `分屏` live stream panes.
|
|
113
|
+
- Switch between **Flow Canvas** (SVG step flow, nested subagent branches, and dashed cross-step return arcs) and **Org Tree** (collapsed to a one-line summary until you click the Lead card to show subordinate lanes), above the progress board and `分屏` live stream panes.
|
|
102
114
|
|
|
103
115
|
<div align="center">
|
|
104
116
|
<img src="assets/screenshots/02-full-spread-pyramid-dag.png" alt="02 - Subagent DAG View" width="80%" />
|
|
105
117
|
</div>
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
### 03 · Cognitive Desktop & Vault Drawers (`档案` Tab)
|
|
120
|
+
**In one sentence:** Pin only active notes to the Cognitive Desktop (`2,400 Tokens / 6 items`) and keep everything else folded in three drawers with keyword hooks.
|
|
108
121
|
|
|
109
|
-
|
|
110
|
-
- Features the pinned **📌 Cognitive Desktop** (`2,400 Tokens / 6 items` bar — sole per-turn prompt injection source) above Session, System Global, and Precipitated drawers with top-down stack-of-papers cards and `🪝` keyword hooks.
|
|
122
|
+
- The top **📌 Cognitive Desktop** bar tracks the `2,400 Tokens / 6 items` limit (the sole automatic per-turn prompt injection); below sit Session, System Global, and Precipitated drawers with folded cards showing titles, `🪝` keyword hooks, and who pulled each item.
|
|
111
123
|
|
|
112
124
|
<div align="center">
|
|
113
125
|
<img src="assets/screenshots/03-cold-archive-cabinet.png" alt="03 - Three-Tier Cold Vaults and Cognitive Desktop" width="90%" />
|
|
114
126
|
</div>
|
|
115
127
|
|
|
116
|
-
|
|
128
|
+
### 04 · Objective Lock & Step Explain (`Tasks` Tab)
|
|
129
|
+
**In one sentence:** Lock your Core Objective with `🎯 Set Objective` and click `Explain` on any step for a plain-language summary without pausing `@lead`.
|
|
117
130
|
|
|
118
|
-
|
|
119
|
-
- Click `🎯 Set Objective` to lock your Core Objective before Strong Intervention, inspect the collapsible **Work Topology** (Flow Canvas / Org Tree) and unified Progress Task Board below, or click `Explain` on any step without interrupting `@lead`.
|
|
131
|
+
- Click `🎯 Set Objective` before enabling Strong Intervention, inspect the collapsible Work Topology and Progress Task Board below, or click `Explain` on any step to hear what it does and what skipping it affects.
|
|
120
132
|
|
|
121
133
|
<div align="center">
|
|
122
134
|
<img src="assets/screenshots/04-dual-tier-goal-and-step-qa.png" alt="04 - Goal Supervision and Step Q&A" width="68%" />
|
|
123
135
|
</div>
|
|
124
136
|
|
|
125
|
-
---
|
|
126
|
-
|
|
127
137
|
### 05 · Cross-Window Peer Linking & Mailbox (`协同` Tab)
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
**In one sentence:** Link separate DSH windows to exchange progress and contracts, and wipe link caches as soon as you detach.
|
|
139
|
+
|
|
140
|
+
- Connects open DSH windows to share task state and mailbox messages across front-end UI and backend APIs; detaching clears link caches, external notes, and mailbox leftovers.
|
|
141
|
+
- Screenshots pasted into the composer save under `<cwd>/.dsh-chief/uploads/` so models read real image files.
|
|
130
142
|
|
|
131
143
|
<div align="center">
|
|
132
144
|
<img src="assets/screenshots/05-cross-session-collab-bus.png" alt="05 - Cross-Window Linking and Mailbox" width="68%" />
|
|
133
145
|
</div>
|
|
134
146
|
|
|
135
|
-
---
|
|
136
|
-
|
|
137
147
|
### 06 · Guard Walls, Pinned Redlines & Must-Do Checks (`边界` Tab)
|
|
138
|
-
|
|
139
|
-
|
|
148
|
+
**In one sentence:** Add pre-execute rules to Guard Walls at the top to block commands or file paths before they run, and manage must-do, forbidden, and note lists below.
|
|
149
|
+
|
|
150
|
+
- The top **🧱 Physical Guard Walls** area blocks dangerous commands or paths before execution: add rules manually or ask Chief to draft them, toggle `🌐 Global`, `📁 Workspace`, or `⏸ Paused`, and merge same-type rules.
|
|
151
|
+
- Below, `allowed`, `forbidden`, and `notes` separate global `📌` rules from session-only ones. No L0–L3 model can delete locked walls without an approved removal ticket.
|
|
140
152
|
|
|
141
153
|
<div align="center">
|
|
142
154
|
<img src="assets/screenshots/06-pinned-bounds-and-handoff.png" alt="06 - Pinned Global Redlines and Proposals" width="68%" />
|
|
143
155
|
</div>
|
|
144
156
|
|
|
145
|
-
|
|
157
|
+
### 07 · Top-Bar Settings: Presets, Placement, Opt-In Controls & Budget Cap (`⚙️` Settings)
|
|
158
|
+
**In one sentence:** Click the `⚙️` gear in the top bar to pick a scenario preset, choose Main Tab vs. Sidebar placement and entry buttons, toggle session opt-in, set alert sounds and budget limits, or switch languages.
|
|
146
159
|
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
- Choose which archive scope follows into a new session (`None`, `Spotlight Only`, `Entire Drawer`, or `Full Session Cabinet`), while Strong Intervention safely resets to off.
|
|
160
|
+
- Click `⚙️` between `DSH 参谋长` and the version badge to open **Settings**: choose from **3 Scenario Presets** (Observer / Co-Pilot / Away Mode), configure **Panel Placement** (`Sidebar + Main Tab / Main Tab Only / Sidebar Only`, composer shortcut & floating corner trigger toggles, `Sidebar Tab / New Split Pane` for subagent views, plus per-session and new-session auto-enable switches), toggle **7 Milestone Desktop Alerts & Chime**, track the **categorized LLM Ledger (`chat / review / dream`) & hard budget cap**, and switch `zh / en` live. `📌 Pin Lock` Session Handoff and redacted `.md` report export sit at the bottom of `Tasks`.
|
|
161
|
+
- Pick which archive scope carries into a new window (`None`, `Spotlight Only`, `Entire Drawer`, or `Full Session Cabinet`), while Strong Intervention resets to off for safety and `idle-guard` prevents stalled runs.
|
|
150
162
|
|
|
151
163
|
<div align="center">
|
|
152
164
|
<img src="assets/screenshots/07-session-handoff-and-guard.png" alt="07 - Cross-Session Handoff and Deployment" width="68%" />
|
|
@@ -154,34 +166,195 @@ If you run multi-step coding tasks inside DeepSeek Harness, these six problems t
|
|
|
154
166
|
|
|
155
167
|
---
|
|
156
168
|
|
|
157
|
-
##
|
|
169
|
+
## Glossary
|
|
170
|
+
|
|
171
|
+
| Term | Plain explanation |
|
|
172
|
+
| :--- | :--- |
|
|
173
|
+
| `Main chat (@lead)` | The main AI in the center DSH window that reads code, edits files, and runs commands. |
|
|
174
|
+
| `Chief` | The sidebar supervisor AI in this plugin that tracks progress, saves notes, and checks risky calls. |
|
|
175
|
+
| `Subagents` | Worker agents launched by `@lead` to run tasks in parallel (such as `@arch`, `@dev`, `@bench`). |
|
|
176
|
+
| `L0–L3 tiers` | Permission levels: L0 read-only default, L1 assistant, L2 asks before writes, L3 full delegation. |
|
|
177
|
+
| `Off / Patrol / Managed` | Header run modes: Off stays quiet, Patrol wakes on failures/blocks, Managed supervises continuously. |
|
|
178
|
+
| `Guard Walls` | Pre-execute rules checked before file writes or shell commands run, blocking or prompting you. |
|
|
179
|
+
| `Forbidden / Must Do` | Rules in the Guards tab listing blocked actions and required checks before completion. |
|
|
180
|
+
| `Cognitive Desktop` | The top pinned archive area (max `2,400 tokens / 6 items`)—the only notes injected every turn. |
|
|
181
|
+
| `Archive Vaults` | Three drawers (Session, Global, Precipitated) that keep unpinned notes at 0 prompt tokens. |
|
|
182
|
+
| `🪝 Hooks` | Keyword tags on folded notes so the model can pull exact items when needed. |
|
|
183
|
+
| `/compact` | DSH's built-in context summarizer; Chief saves details to archives first before triggering it. |
|
|
184
|
+
| `✦ Smart Compact` | Automatically saves key notes and triggers `/compact` at idle boundaries or thresholds. |
|
|
185
|
+
| `⚡ Strong Intervention` | Keeps pushing a locked objective forward if the model stalls, stopping after 3 identical errors. |
|
|
186
|
+
| `⏹ Halt (急停)` | The red button on the input bar that stops all background triggers immediately. |
|
|
187
|
+
| `Handoff Packet` | A pinned summary card used to start a clean new DSH window without re-explaining background. |
|
|
188
|
+
| `Dream Roam` | Background archive organizing and hook tagging during Managed mode, tracked in the `dream` ledger. |
|
|
189
|
+
| `Token` | The text unit used for context limits and model billing, roughly one word or 1–2 CJK characters. |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## FAQ
|
|
158
194
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
195
|
+
**Will it spend tokens in the background without me knowing?**
|
|
196
|
+
No. Under `⏸ Off` and `🛡 Patrol`, idle sessions make zero background LLM calls. Only `🤖 Managed` runs background checks, and it stops at a default cap of `30 calls / 300K tokens`; you can check exact counts by category (`chat / review / dream`) inside `⚙️ Settings`.
|
|
197
|
+
|
|
198
|
+
**Will it run hooks or block paths in ordinary chats where I never opened Chief?**
|
|
199
|
+
No. Starting with `v1.7.0`, new chats start unactivated by default—Chief skips prompt injection, pre-execute workspace checks, idle guards, and disk writes until you click **Enable for This Session** or invoke a Chief feature. If you prefer every new session protected automatically, turn on **Auto-enable Chief in new sessions** under `⚙️ Settings -> Panel Placement`.
|
|
200
|
+
|
|
201
|
+
**Can it edit or delete my files by mistake?**
|
|
202
|
+
New sessions default to `L0` read-only. In `L2`, important edits and commands pop up for per-action approval. Hard rules (disk formatting, force pushes, `git reset --hard`) stay blocked at every tier, and no L0–L3 model can delete Guard Walls you locked.
|
|
203
|
+
|
|
204
|
+
**How do I stop it right now?**
|
|
205
|
+
Click the red `⏹ 急停` button at the right end of the input strip to stop background activity immediately, or switch the header mode to `⏸ Off`.
|
|
206
|
+
|
|
207
|
+
**Where is my data stored? Does it upload anything?**
|
|
208
|
+
All boards, archives, Guard Walls, and audit logs live locally under `~/.dsh/chief/` with zero external dependencies and no telemetry. Detected API keys or private key snippets are redacted to `[REDACTED]` before storage.
|
|
209
|
+
|
|
210
|
+
**Which DSH and Node.js versions do I need?**
|
|
211
|
+
DSH `>= 0.2.2-rc.2` (`>= 0.2.2-rc.5` recommended for full file-tool and dialog support) and Node.js `>= 22.13.0`. On `0.2.0 ~ 0.2.2-rc.1`, the panel mounts but disables subagent dispatch and prompts you to upgrade. See the full compatibility table under Going Deeper below.
|
|
212
|
+
|
|
213
|
+
**What if planning or bug finding feels weak?**
|
|
214
|
+
Check two things: first, `dsh-chief` enforces guardrails and isolation, while code judgment depends on the model assigned to Chief—pick a strong reasoning model for complex work. Second, avoid stacking hundreds of conflicting global rule lines or another always-on memory plugin alongside `dsh-chief`.
|
|
215
|
+
|
|
216
|
+
**Can I use it if I don't write code?**
|
|
217
|
+
Yes. You can type plain instructions in the composer, switch presets with one click, and click `Explain` on any step in **Tasks** to read what it does and what skipping it affects.
|
|
166
218
|
|
|
167
219
|
---
|
|
168
220
|
|
|
169
|
-
##
|
|
221
|
+
## Going deeper
|
|
222
|
+
|
|
223
|
+
<details>
|
|
224
|
+
<summary>Architecture Evolution: From a Sidebar Notepad to a Multi-Agent Command Hub (v1.0 -> v1.7)</summary>
|
|
170
225
|
|
|
171
|
-
|
|
226
|
+
What began as a shared-JSON sidebar scratchpad (`dnb-`) grew through real daily friction into a zero-dependency command hub with **44 backend modules + 39 frontend modules**:
|
|
227
|
+
|
|
228
|
+
<div align="center">
|
|
229
|
+
<img src="assets/evolution-roadmap-en.gif" alt="dsh-chief v1.0 to v1.7 architecture evolution animation" width="840" />
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
```mermaid
|
|
233
|
+
flowchart LR
|
|
234
|
+
A["v1.0–v1.1\nSidebar Co-Pilot\nCold vaults · Compaction rescue"] --> B["v1.2–v1.2.1\nHands + Cage\nExecutor · 4 permission tiers"]
|
|
235
|
+
B --> C["v1.3\nSplit Monoliths\n45 modules · File locks"]
|
|
236
|
+
C --> D["v1.4\nPre-Execute Gate\n9 safety modules · Guard Walls"]
|
|
237
|
+
D --> E["v1.5–v1.6\nAttention & Spend\nCognitive Desktop · Flow Canvas · Hard cap"]
|
|
238
|
+
E --> F["v1.7\nHub with Restraint\nMain tab · Local CLIs · Opt-in zero intrusion"]
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Read the full engineering story and architectural tradeoffs in **[Architecture Evolution (`EVOLUTION.en.md`)](EVOLUTION.en.md)**.
|
|
242
|
+
|
|
243
|
+
</details>
|
|
244
|
+
|
|
245
|
+
<details>
|
|
246
|
+
<summary>What Changed in v1.7.0</summary>
|
|
247
|
+
|
|
248
|
+
- **Opt-In Per Session & Zero-Intrusion Bypass**: All 8 backend runtime hooks check per-session activation (`sessionEnabled`), leaving unactivated plain chats and their subagents completely untouched (zero prompt injection, zero pre-execute blocking, zero stray board files) with an in-panel opt-in banner plus per-session & global default toggles in Settings and automatic backward compatibility for legacy sessions.
|
|
249
|
+
- **Safety Guard Master Switches & False-Positive Fixes**: Adds human-only per-session and global Safety Guard toggles in Settings (confirm-gated and audited, independent of Redline Sentinel and custom Guard Walls), eliminates `destructive_command` false positives on non-executable heredocs and read-only queries, and normalizes benign `cursor.blocked` notes so resolved/approved remarks no longer trigger false red alarms.
|
|
250
|
+
- **Main Page Tab (`conversation.view`) & Subagent Tab Routing**: Registers a clean top `Chief` / `参谋长` conversation tab that hides the host bottom composer, fills the viewport safely (`--dsh-conversation-viewport-height` fallback for `0.2.2-rc.3`), offers independent composer & floating corner button toggles, and opens subagent views in the active right sidebar as tabs by default (without spawning stacked split panes).
|
|
251
|
+
- **Redesigned Collaboration System & Clean Standby Dock**: Native non-`ccSwitch` discovery & one-click dispatch for local `Codex` and `Claude Code` CLIs (with redlines + Guard Walls), cross-window `pair` mailbox classification, idle-static vs. active-breathing glow & flowing SVG links, one-click standby refresh scan, and strict filtering against `Mnemon` maintenance tasks, blank `DS Bot` shells, `.v4` subagents, and orphan dirs.
|
|
252
|
+
- **Light Theme Unification & Monolith Split**: Unified 8-tint card accents across all 5 tabs, adapted DSH light theme surfaces across every canvas and popover, and split all monoliths cleanly into **44 backend modules and 39 frontend modules**.
|
|
253
|
+
|
|
254
|
+
</details>
|
|
255
|
+
|
|
256
|
+
<details>
|
|
257
|
+
<summary>What Changed in v1.6.0</summary>
|
|
258
|
+
|
|
259
|
+
<img src="assets/v160-highlights.png" alt="dsh-chief v1.6.0 overview: SVG Flow Canvas with cross-step return arcs, click-to-expand Org Tree, top-bar Settings gear with Presets/Alerts/Budget Cap, live zh/en switching, and redacted .md report export" width="100%" />
|
|
260
|
+
|
|
261
|
+
- **Flow Canvas & 5-Tab Layout**: Merged Plan into **Tasks** so the header holds five tabs (`Chief / Tasks / Peers / Archives / Guards`). **Flow Canvas** draws sequential stages, nested subagent lanes, and cross-step return arcs in SVG; **Org Tree** stays collapsed to one line until you click the Lead card.
|
|
262
|
+
- **Alerts, Usage Ledger & Budget Cap**: Fires desktop `Notification` alerts (and an optional two-note chime) on 7 milestones such as approvals, elevations, wall blocks, rescue wakes, auto-sleep, budget stops, and hazard halts, suppressing old events on first load. Tracks calls and tokens across `chat / review / dream` with a default `30 calls / 300K tokens` Managed limit (your direct `ask_chief` questions stay unblocked) and exports redacted `.md` reports.
|
|
263
|
+
- **Top-Bar Settings, 3 Presets & Bilingual UI**: Moved configuration to the `⚙️` gear between the title and `v1.6.0`, with **Observer / Co-Pilot / Away Mode** presets (entering L3/Managed requires two confirmation steps) and instant `Auto / 简体中文 / English` switching via `locale/zh.json` & `locale/en.json`.
|
|
264
|
+
- **Command Check & Mid-Turn Loop Guards**: Tells `--format` CLI flags apart from disk-format commands (`format C:` still stays blocked); adds mid-turn duplicate/error spin detection (`detectMidTurnSpin`) with `planWrite` exemption and blocks late background calls after a budget stop.
|
|
265
|
+
|
|
266
|
+
> Uses a Router + Workers split modeled after DeepSeek's **[SuperAgent (`dsh-superagent-prototype`)](https://github.com/deepseek-ai/dsh-superagent-prototype)**, keeping Chief state and prompts separate from the main chat.
|
|
267
|
+
|
|
268
|
+
</details>
|
|
269
|
+
|
|
270
|
+
<details>
|
|
271
|
+
<summary>Six Daily Problems It Fixes</summary>
|
|
272
|
+
|
|
273
|
+
### 1. Context compaction (`/compact`) wipes paths, commands, and errors
|
|
274
|
+
**In one sentence:** Chief saves verified file paths, ports, and errors into your session archive before asking DSH to compact.
|
|
275
|
+
|
|
276
|
+
- **What goes wrong**: When a long session compacts, the summary drops exact file paths, port numbers, and shell fixes you already found, so the model re-reads files again.
|
|
277
|
+
- **How `dsh-chief` handles it**: Supports `✦ 智选压缩` at idle boundaries, custom `10%–95%` or `>= 8,000` token thresholds, or typing `"压缩吧"`. It extracts details to your local session archive and checks the write before calling `/compact`. Compaction counters do not move if history is empty or compaction errors out.
|
|
278
|
+
|
|
279
|
+
### 2. Agents stop halfway ("I edited the file, please test it")
|
|
280
|
+
**In one sentence:** After you lock an objective, stalled steps keep getting pushed forward, three identical errors stop the run, and the red halt button stops background work right away.
|
|
281
|
+
|
|
282
|
+
- **What goes wrong**: Left unattended, an agent edits a single file and reports done without running tests or builds.
|
|
283
|
+
- **How `dsh-chief` handles it**: Requires locking a Core Objective before turning on Strong Intervention (`0 = ∞` turns with a 3-strike identical-error stop). In `🛡 Patrol` and `🤖 Managed`, stream drops automatically resume; L3 with Strong Intervention batches safe steps into a `🏁 One-Stop Report`, and final completion waits until `allowed` checks pass and you approve. Click the red `⏹ 急停` button at any time to stop background triggers.
|
|
284
|
+
|
|
285
|
+
### 3. Always-on memory plugins fill prompts and waste tokens
|
|
286
|
+
**In one sentence:** Only the few files on your Cognitive Desktop enter each turn; the rest stay out of the prompt until pulled by keyword.
|
|
287
|
+
|
|
288
|
+
- **What goes wrong**: Injecting kilobytes of old notes into every turn wastes context space and distracts the model from the files you are editing now.
|
|
289
|
+
- **How `dsh-chief` handles it**: Archives sit in three vaults (Session, System Global, Precipitated) shown as folded stack-of-papers cards. **Only items pinned to the Cognitive Desktop (`2,400 Tokens / 6 items`) enter the prompt automatically**. Other entries stay at 0 prompt tokens, exposing `🪝` keyword hooks so the model pulls them on demand with `archive.pull`, while Precipitated secrets stay hidden from both sides unless pulled.
|
|
290
|
+
|
|
291
|
+
### 4. Full autonomy feels unsafe, but chat-only mode leaves Chief idle (or bossy)
|
|
292
|
+
**In one sentence:** New chats start read-only, permissions stay separate from run modes, and AI tiers cannot remove Guard Walls you locked.
|
|
293
|
+
|
|
294
|
+
- **What goes wrong**: Granting full permission risks `git push --force`, recursive deletes, or reading `.env`, while strong supervisors often edit files themselves instead of directing the main agent.
|
|
295
|
+
- **How `dsh-chief` handles it**: Keeps permission tiers (`L0 advisor` read-only default / `L1 assistant` / `L2 strategist` per-action approval / `L3 chief`) separate from header run modes (`⏸ Off / 🛡 Patrol / 🤖 Managed`), paired with a pre-execute check:
|
|
296
|
+
- **Every new session starts read-only**: Reads code, answers questions, and updates the board without editing files or interrupting the main thread.
|
|
297
|
+
- **Pre-execute Guard Walls (`tools/pre-execute`)**: Before `@lead`, any subagent, or Chief writes a file or runs a command, calls check `~/.dsh/chief/guard-walls.json`. Walls toggle between `🌐 Global`, `📁 Workspace`, and `⏸ Paused`, merge same-type rules, or get drafted from plain text for your approval. Models in L0–L3 cannot remove or disable locked walls—if blocked, they can only submit a removal request for you to approve.
|
|
298
|
+
- **Main agent does the editing**: Unless you ask Chief to edit files directly, it sends structured `[EXECUTION_REQUEST]` items to `@lead` instead of speaking as you. In a blank chat, it guides `@lead` to read the repo and draft a plan first, and asks clarifying `[INQUIRY]` questions quietly without pausing `@lead`.
|
|
299
|
+
- **Resumes after approval & hard redlines**: `TaskLedger` picks up stalled steps once you click Allow. Hard blocks (compound shells, `node -e`/`python -c`, quote-backslash `.env` tricks, symlinks, NTFS ADS) apply in every tier and log to `~/.dsh/chief/chief-audit.jsonl`, alongside optional restrict-only JSON `policyPlugins`.
|
|
300
|
+
|
|
301
|
+
### 5. Dozens of subagents run out of sight and ignore verbal rules
|
|
302
|
+
**In one sentence:** Track `@lead` and subagents in one tree, message individual agents with `@` pills, and pin rules with `📌` so new tasks keep them.
|
|
303
|
+
|
|
304
|
+
- **What goes wrong**: Workers run in separate tabs, and rules mentioned in chat scroll out of context after ten turns.
|
|
305
|
+
- **How `dsh-chief` handles it**: Shows the coordinator and subagents in one tree with status controls, `@agent` steering pills on the bottom bar, plain-language step explanations, and one-click `分屏` live streams. Pin rules with `📌` in Guards so future tasks inherit them.
|
|
306
|
+
|
|
307
|
+
### 6. Long threads slow down, but opening a new window resets everything
|
|
308
|
+
**In one sentence:** `Off` and `Patrol` make zero idle background LLM calls, and pinned handoff cards carry your chosen archive scope into a new window.
|
|
309
|
+
|
|
310
|
+
- **What goes wrong**: After 100 turns you want a fresh window without re-explaining paths and status, and you do not want a background plugin making extra API calls while idle.
|
|
311
|
+
- **How `dsh-chief` handles it**: Defaults to `⏸ Off` / `🛡 Patrol` (0 idle LLM calls), follows your active session's model, and includes a `180°` fan thinking effort gauge with `🪄 Auto` depth. Click `解释` on any step for a plain-language breakdown, freeze handoff notes with `📌 定住防改`, and open a new linked window with only the archive scope you choose.
|
|
312
|
+
|
|
313
|
+
</details>
|
|
314
|
+
|
|
315
|
+
<details>
|
|
316
|
+
<summary>All Install Options & Host Compatibility</summary>
|
|
317
|
+
|
|
318
|
+
Search **`dsh-chief`** inside [dshmarket](https://github.com/dsh-market/dsh-market) / DSH Plugin Market, or install via CLI (replace `desktop` with `web` for the web profile):
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
# Option 1: Install latest release (v1.7.0) from npm
|
|
322
|
+
dsh plugin --profile desktop add dsh-chief
|
|
323
|
+
|
|
324
|
+
# Option 2: Install directly from GitHub main branch
|
|
325
|
+
dsh plugin --profile desktop add github:gluztm/dsh-chief
|
|
326
|
+
|
|
327
|
+
# Option 3: Install prebuilt GitHub Release tarball (v1.7.0)
|
|
328
|
+
dsh plugin --profile desktop add https://github.com/gluztm/dsh-chief/releases/download/v1.7.0/dsh-chief-1.7.0.tgz
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
| DeepSeek Harness (DSH) Version | Panel / Board / Vaults / Pre-Execute Walls | Named Subagent Tree (`task.dispatch` / `team.*`) | Notes |
|
|
332
|
+
| :--- | :---: | :---: | :--- |
|
|
333
|
+
| **`>= 0.2.2-rc.5` (current desktop target)** | Full support | Full support | Matches `dsh-tool-fs`, `str_replace_editor`, dynamic `reasoningEffort` switching, and native `{ kind: 'ask' }` dialogs |
|
|
334
|
+
| `0.2.2-rc.2 ~ 0.2.2-rc.4` | Full support | Full support | Provides native `subagents.resolveName`, `rootOf`, `namesOf`, and `tools/pre-execute` |
|
|
335
|
+
| `0.2.0 ~ 0.2.2-rc.1` | Panel works | Upgrade notice | Blocks unsafe `team.*` dispatch and prompts host upgrade |
|
|
336
|
+
|
|
337
|
+
</details>
|
|
338
|
+
|
|
339
|
+
<details>
|
|
340
|
+
<summary>Modular Architecture (v1.7.0)</summary>
|
|
341
|
+
|
|
342
|
+
**In one sentence:** `44` backend modules and `39` frontend modules run locally under `~/.dsh/chief/`, staying completely inactive in unactivated chats and injecting only the Cognitive Desktop in active ones.
|
|
343
|
+
|
|
344
|
+
`v1.7.0` spans **44 backend modules (including 9 isolated modules under `pkg/safety/`) and 39 frontend modules** with no `export let` bindings and no circular imports. See [ARCHITECTURE.md](ARCHITECTURE.md) for boundaries and contracts.
|
|
172
345
|
|
|
173
346
|
```mermaid
|
|
174
347
|
flowchart TB
|
|
175
|
-
subgraph UI["DSH Right Sidebar (client.js <-
|
|
348
|
+
subgraph UI["DSH Right Sidebar & Main Tab (client.js <- 39 modules · 5 Tabs + Top-Bar Settings)"]
|
|
176
349
|
T1["Chief Tab (180° Effort Gauge · Click-Through FX · Report Export)"]
|
|
177
350
|
T2["Tasks Tab (Core Objective · Flow Canvas / Org Tree · Unified Board · Handoff)"]
|
|
178
|
-
T3["Peers Tab (Cross-Window
|
|
351
|
+
T3["Peers Tab (Collab Arena · Local Codex/Claude CLI · Cross-Window Mail · Subagent Tabs)"]
|
|
179
352
|
T5["Archives Tab (2400T Cognitive Desktop · Hooked Stack-of-Papers)"]
|
|
180
353
|
T6["Guards Tab (Guard Walls · Blocker Removal · 📌 Redlines)"]
|
|
181
|
-
T7["Top-Bar ⚙️ Settings (Presets ·
|
|
354
|
+
T7["Top-Bar ⚙️ Settings (Presets · Placement & Corner/Subagent Toggles · Opt-In · Budget · zh/en)"]
|
|
182
355
|
end
|
|
183
356
|
|
|
184
|
-
subgraph Core["Local Backend & Safety Kernel (Zero External Deps ·
|
|
357
|
+
subgraph Core["Local Backend & Safety Kernel (Zero External Deps · 44 modules)"]
|
|
185
358
|
Hot["Hot Boards: ~/.dsh/chief/board.json & boards/<sid>.json\nCross-process/worker_threads O_EXCL spin locks"]
|
|
186
359
|
Walls["Guard Walls: ~/.dsh/chief/guard-walls.json\nGlobal / Workspace / Paused"]
|
|
187
360
|
Cold["3-Tier Vaults: 2400T Cognitive Desktop + Hooked Drawers + 0-byte Blind Vault"]
|
|
@@ -203,34 +376,10 @@ flowchart TB
|
|
|
203
376
|
Bus <-->|"chief_board / chief_memory\nchief_boundaries / chief_handoff"| Agents
|
|
204
377
|
```
|
|
205
378
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
## Installation & Host Compatibility
|
|
209
|
-
|
|
210
|
-
Search **`dsh-chief`** inside [dshmarket](https://github.com/dsh-market/dsh-market) / DSH Plugin Market, or install via CLI (replace `desktop` with `web` for the web profile):
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
# Option 1: Install latest release (v1.6.0) from npm
|
|
214
|
-
dsh plugin --profile desktop add dsh-chief
|
|
215
|
-
|
|
216
|
-
# Option 2: Install directly from GitHub main branch
|
|
217
|
-
dsh plugin --profile desktop add github:gluztm/dsh-chief
|
|
218
|
-
|
|
219
|
-
# Option 3: Install prebuilt GitHub Release tarball (v1.6.0)
|
|
220
|
-
dsh plugin --profile desktop add https://github.com/gluztm/dsh-chief/releases/download/v1.6.0/dsh-chief-1.6.0.tgz
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Host Version Compatibility
|
|
224
|
-
|
|
225
|
-
| DeepSeek Harness (DSH) Version | Panel / Board / Vaults / Pre-Execute Walls | Named Subagent Tree (`task.dispatch` / `team.*`) | Notes |
|
|
226
|
-
| :--- | :---: | :---: | :--- |
|
|
227
|
-
| **`>= 0.2.2-rc.5` (current desktop target)** | Full support | Full support | Matches `dsh-tool-fs`, `str_replace_editor`, dynamic `reasoningEffort` switching, and native `{ kind: 'ask' }` dialogs |
|
|
228
|
-
| `0.2.2-rc.2 ~ 0.2.2-rc.4` | Full support | Full support | Provides native `subagents.resolveName`, `rootOf`, `namesOf`, and `tools/pre-execute` |
|
|
229
|
-
| `0.2.0 ~ 0.2.2-rc.1` | Panel works | Upgrade notice | Blocks unsafe `team.*` dispatch and prompts host upgrade |
|
|
230
|
-
|
|
231
|
-
---
|
|
379
|
+
</details>
|
|
232
380
|
|
|
233
|
-
|
|
381
|
+
<details>
|
|
382
|
+
<summary>Tools Registered With the Model</summary>
|
|
234
383
|
|
|
235
384
|
| Tool Name | Purpose | Common Actions |
|
|
236
385
|
| :--- | :--- | :--- |
|
|
@@ -239,14 +388,19 @@ dsh plugin --profile desktop add https://github.com/gluztm/dsh-chief/releases/do
|
|
|
239
388
|
| **`chief_boundaries`** | Global `📌` redlines, must-do checks (`allowed`), and notes | `get`, `set`, `add`, `pin`, `remove` |
|
|
240
389
|
| **`chief_handoff`** | Preview and render self-contained Markdown handoff packets | `preview` / session handoff |
|
|
241
390
|
|
|
242
|
-
|
|
391
|
+
</details>
|
|
243
392
|
|
|
244
|
-
|
|
393
|
+
<details>
|
|
394
|
+
<summary>Local Storage & Security Guarantees</summary>
|
|
395
|
+
|
|
396
|
+
**In one sentence:** All data writes use file locks inside `~/.dsh/chief/`, HTTP routes restrict access to localhost, and detected secrets are masked to `[REDACTED]` before storage.
|
|
245
397
|
|
|
246
398
|
- **Process & Worker-Thread Lock Safety**: `board-store.js`, `chief-state.js`, `archive-core.js`, and `safety/guard-walls.js` serialize writes with `O_EXCL` spin locks (handling transient Windows NTFS `EPERM`/`EACCES`/`EBUSY` retries) and `threadId`-scoped temporary files before atomic rename.
|
|
247
|
-
- **Isolated Safety Kernel & De-obfuscation**: `pkg/safety/` (9 modules) and `chief-executor.js` are checksum-locked and catch compound shells, inline scripts (`node -e` / `python -c` / `pwsh` / `iex` + Base64), quote-backslash credential obfuscation (
|
|
399
|
+
- **Isolated Safety Kernel & De-obfuscation**: `pkg/safety/` (9 modules) and `chief-executor.js` are checksum-locked and catch compound shells, inline scripts (`node -e` / `python -c` / `pwsh` / `iex` + Base64), quote-backslash credential obfuscation (without flagging `process.env.NODE_ENV` or `node .\env\setup.js`), `bounds.*` / wall human confirmation tokens, and single-use `capabilityScope` checks.
|
|
248
400
|
- **27 Loopback-Guarded HTTP Routes**: All `/api/dsh-chief/*` endpoints validate local origin/host headers and fail closed (`403`) if connection checks throw.
|
|
249
|
-
- **Secret Protection &
|
|
401
|
+
- **Secret Protection & Local-Only Data**: Refuses to store `sk-*`, `ghp_*`, Bearer tokens, `AIza*`, `AKIA*`, or private keys (redacting temporary notes to `[REDACTED]`). Boards, archives, guard walls, and `chief-audit.jsonl` stay locally under `~/.dsh/chief/` with no external dependencies or outbound telemetry.
|
|
402
|
+
|
|
403
|
+
</details>
|
|
250
404
|
|
|
251
405
|
---
|
|
252
406
|
|