dsh-chief 1.5.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/README.en.md CHANGED
@@ -1,152 +1,164 @@
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/v150-highlights.png" alt="dsh-chief v1.5.0 feature highlights: 180-degree fan effort gauge, click-through frosted Dream Roam keeping flowing neon border, Cognitive Desktop & stack-of-papers vaults, pre-execute Guard Walls" 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
- ### DeepSeek Harness Right-Sidebar Supervisor, Zero-Token Archive Vault & Safety Gate
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
  [![DSH Compatibility](https://img.shields.io/badge/DSH-%3E%3D%200.2.2--rc.2-38bdf8?style=flat-square)](https://dsh.deepseek.com)
24
7
  [![GitHub Release](https://img.shields.io/github/v/release/gluztm/dsh-chief?color=2563eb&style=flat-square)](https://github.com/gluztm/dsh-chief/releases)
25
8
  [![npm version](https://img.shields.io/npm/v/dsh-chief?color=cb3837&style=flat-square)](https://www.npmjs.com/package/dsh-chief)
26
9
  [![CI](https://github.com/gluztm/dsh-chief/actions/workflows/ci.yml/badge.svg)](https://github.com/gluztm/dsh-chief/actions/workflows/ci.yml)
27
10
  [![DSH Market](https://img.shields.io/badge/DSH%20Market-Listed-f59e0b?style=flat-square)](https://awesome-dsh-plugin.com/p/gluztm/dsh-chief/)
28
- [![Bilibili Demo](https://img.shields.io/badge/Bilibili-Video%20Demo-fb7299?style=flat-square)](https://www.bilibili.com/video/BV1DqsV6QEGi)
11
+ [![Bilibili Demo](https://img.shields.io/badge/Bilibili-Video%20Demo-fb7299?style=flat-square)](https://www.bilibili.com/video/BV1Fksq6iEw8)
29
12
  [![SuperAgent Ready](https://img.shields.io/badge/SuperAgent-Router--Worker%20Synergy-a855f7?style=flat-square)](https://github.com/deepseek-ai/dsh-superagent-prototype)
30
13
  [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D%2022.13-30d158?style=flat-square)](https://nodejs.org)
31
14
  [![Zero Dependencies](https://img.shields.io/badge/Dependencies-0%20External-ffe033?style=flat-square)](#)
32
15
  [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-f87171?style=flat-square)](LICENSE)
33
16
 
34
- > **Current release `v1.5.0`**: Adds the **Cognitive Desktop (`2,400 Tokens / 6 items` sole prompt-injected vault)** + top-down stack-of-papers drawers with 3-tier hook isolation, **orthogonal runtime control (`⏸ Off | 🛡 Patrol | 🤖 Managed`)** with background `🌙 Dream Roam` (**click anywhere on the frosted overlay to dismiss the blur and regain panel control while the flowing neon border stays lit to signal background work**), 5-condition auto-sleep + `L3` One-Stop Report, **`180°` fan-shaped thinking effort gauge** + Team `Auto / Manual` toggle, plain-language Consult mode, mandatory Core Objective lock for Strong Intervention, blocker-gated wall removal requests, full DSH light-theme support, and subagent entry hiding on DSH `0.2.2-rc.5`.
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
- [简体中文 (`README.md`)](README.md) · **English** · [Changelog (`CHANGELOG.md`)](CHANGELOG.md) · [Architecture (`ARCHITECTURE.md`)](ARCHITECTURE.md)
19
+ <sub>Read-only by default · Asks before editing workspace · One-command install</sub>
38
20
 
39
- [v1.5.0 Highlights](#what-changed-in-v150) · [Problems Fixed](#daily-friction-this-plugin-fixes) · [Inside the Sidebar](#inside-the-sidebar) · [Architecture](#modular-architecture-v150) · [Installation](#installation--host-compatibility) · [Security](#local-storage--security-guarantees) · [Contributors](#contributors)
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 Changed in `v1.5.0`
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
- - **🗂️ Cognitive Desktop & Stack-of-Papers Hook Isolation**: Eliminates full-text archive leaks into the main prompt — only documents explicitly pinned to the **📌 Cognitive Desktop (`2,400 Tokens / 6 items` cap)** are injected per turn. Session / Global / Precipitated drawers use collapsible paper-dossier cards with lightweight `🪝` keyword hooks so agents pull dossiers on demand, while un-flipped Precipitated records remain `0-byte` double-blind to AI.
48
- - **🤖 Orthogonal Runtime Modes & Click-Through `🌙 Dream Roam`**: Header switches cleanly between `⏸ Off` (0 background calls), `🛡 Patrol` (0 idle cost; wakes only on guard blocks, errors, or stream interrupts), and `🤖 Managed` (active oversight + idle Dream Roam organization). Clicking anywhere on the frosted Dream Roam overlay immediately dismisses the blur/blocker so you can keep using the sidebar while the animated outer neon border continues to indicate background work. Auto-sleeps back to `Off` after all 5 idle checks clear.
49
- - **🧠 `180°` Fan Thinking Effort Gauge & Team Control**: Drag along the 180° rainbow arc (`Off / Low / Medium / High / Max`) or tap the center hub for `🪄 Auto` (lowers effort on summaries/roam, raises effort for diagnostics & wall crafting), paired with a clean `Team Thinking Effort: Auto / Manual` toggle and per-reply effort badges.
50
- - **🛡️ Sharpened Guardrails & Theme Fixes**: Strong Intervention now enforces locking a Core Objective before activation; `💡 Consult` answers honestly without forcing synthetic action buttons; blocker-only `wall_removal` requests require human approval across every L0–L3 tier; solid popover contrast fixes dark-mode transparency overlap; and `SidebarChiefTab` hides cleanly inside subagent threads alongside full DSH light-theme styling.
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
- ## Daily Friction This Plugin Fixes
50
+ ## In One Sentence
55
51
 
56
- If you run multi-step coding tasks inside DeepSeek Harness, these six problems tend to come up quickly.
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
- ### 1. Context compaction (`/compact`) wipes paths, commands, and errors
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
- ### 2. Agents stop halfway ("I edited the file, please test it")
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
- ### 3. Always-on memory plugins bloat prompts and burn tokens
69
- - **What goes wrong**: Injecting kilobytes of old notes on every turn wastes context window and distracts the model from the current file.
70
- - **How `dsh-chief` handles it**: Archives live in top-down stack-of-papers folders across three vaults (Session, System Global, Precipitated). **Only items pinned to the Cognitive Desktop (`2,400 Tokens / 6 items`) enter the prompt automatically; unpinned dossiers add 0 full-text tokens**, exposing only lightweight `🪝` keyword hooks for on-demand `archive.pull` retrieval while keeping Precipitated secrets double-blind.
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
- ### 4. Full autonomy feels unsafe, but chat-only mode leaves Chief idle (or bossy)
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
- ### 5. Dozens of subagents run out of sight and ignore verbal rules
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
- ### 6. Long threads slow down, but opening a new window resets everything
85
- - **What goes wrong**: After 100 turns you want a clean window without re-explaining workspace paths and task progress, and you do not want a background plugin quietly calling paid APIs every turn.
86
- - **How `dsh-chief` handles it**: Defaults to `⏸ Off` / `🛡 Patrol` (0 idle LLM calls), mirrors your active session's provider/model, and exposes a `180°` fan effort gauge with `🪄 Auto` adaptive depth. Click `解释` on any plan step for plain-language explanations, freeze handoff notes with `📌 定住防改`, and deploy a linked window carrying only the archive scope you pick.
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
- ## Inside the Sidebar
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 & Click-Through FX Stage (`参谋` Tab)
93
- - Send tasks in plain language from the bottom input box, toggle `⚡ 强介入`, `✦ 智选压缩`, `🛡 红线哨兵`, `L0–L3` tiers, and `⏹ 急停`, or adjust `⏸ Off / 🛡 Patrol / 🤖 Managed` and the `180°` fan thinking effort gauge.
94
- - When Dream Roam or auto-review raises the frosted working stage overlay, **a single click dismisses the blur so you keep full control while the glowing outer border continues to show Chief is active**.
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
  ![01 - Chief Cockpit Overview](assets/screenshots/01-chief-cockpit-overview.png)
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
- ### 02 · Coordinator & Subagent Pyramid Tree (`任务` Tab)
101
- - Displays the root coordinator and active subagent lanes with dedicated coordinator/worker icons, inline status toggles, bottom `@steer` pills, 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
- ### 03 · Cognitive Desktop & Stack-of-Papers Vaults (`档案` Tab)
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
- ### 04 · Objective Lock & Step Q&A (`规划` Top)
119
- - Click `🎯 设为目标` to lock your Core Objective before Strong Intervention, or click `解释` on any step to get a plain-language breakdown 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
- - Connect multiple open DSH windows to share live progress and coordinate ports/contracts, with automatic cache and mailbox purge on detach.
129
- - Screenshots pasted into the cockpit are saved under `<cwd>/.dsh-chief/uploads/` so models inspect real files instead of guessing.
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
- - The top **🧱 Physical Guard Walls** section blocks dangerous commands or paths before execution: add rules manually or let Chief draft them from plain text, switch `🌐 Global`, `📁 Workspace`, or `⏸ Paused`, and merge same-type walls.
139
- - Below that, `allowed`, `forbidden`, and `notes` separate global `📌` rules from session-only ones. No L0–L3 model can delete locked walls without an approved blocker removal ticket.
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
- ### 07 · Session Handoff & Deployment (`规划` Bottom)
148
- - Edit the Markdown handoff packet directly and freeze it via `📌 定住防改`.
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
- ## Two Things to Know Before Enabling Tools
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
- > [!NOTE]
160
- > Keep these two constraints in mind when using Wishing Box tools, `⚡ Strong Intervention`, or `✦ 智选压缩`:
161
- >
162
- > 1. **Guardrails set the safety floor; your LLM sets the ceiling**
163
- > The plugin guarantees 0-token vault isolation, permission gating, verified pre-compact saves, loop breakers, guard walls, and `⏹ 急停`. Planning accuracy and code judgment still depend on the model assigned to Chief. Use a strong reasoning model for real engineering work.
164
- > 2. **Avoid stacking heavy external prompt injections**
165
- > Skip stacking hundreds of conflicting global rule lines or always-on memory plugins alongside `dsh-chief`. Keep only essentials on the **Cognitive Desktop** and store reference notes in the hooked drawers instead.
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
- ## Modular Architecture (`v1.5.0`)
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
- `v1.5.0` spans **38 backend modules (including 9 isolated modules under `pkg/safety/`) and 16 frontend modules** with zero `export let` bindings and zero circular imports. See [ARCHITECTURE.md](ARCHITECTURE.md) for boundaries and module contracts.
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 <- 16 source modules)"]
176
- T1["Chief Tab (180° Effort Gauge · Click-Through FX · Grouped Q&A)"]
177
- T2["Tasks Tab (Coordinator Pyramid · Split Stream · @steer)"]
178
- T3["Peers Tab (Cross-Window Link + Mailbox)"]
179
- T4["Plan Tab (Core Objective Lock · Step Explain · Pinned Handoff)"]
348
+ subgraph UI["DSH Right Sidebar & Main Tab (client.js <- 39 modules · 5 Tabs + Top-Bar Settings)"]
349
+ T1["Chief Tab (180° Effort Gauge · Click-Through FX · Report Export)"]
350
+ T2["Tasks Tab (Core Objective · Flow Canvas / Org Tree · Unified Board · Handoff)"]
351
+ T3["Peers Tab (Collab Arena · Local Codex/Claude CLI · Cross-Window Mail · Subagent Tabs)"]
180
352
  T5["Archives Tab (2400T Cognitive Desktop · Hooked Stack-of-Papers)"]
181
- T6["Boundaries Tab (Guard Walls · Blocker Removal · 📌 Redlines)"]
353
+ T6["Guards Tab (Guard Walls · Blocker Removal · 📌 Redlines)"]
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 · 38 modules)"]
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.5.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.5.0)
220
- dsh plugin --profile desktop add https://github.com/gluztm/dsh-chief/releases/download/v1.5.0/dsh-chief-1.5.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
- ## Tools Registered With the Model
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
- ## Local Storage & Security Guarantees
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 (zero false positives on `process.env.NODE_ENV` or `node .\env\setup.js`), `bounds.*` / wall human confirmation tokens, and single-use `capabilityScope` checks.
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 & Zero Telemetry**: Refuses to persist `sk-*`, `ghp_*`, Bearer tokens, `AIza*`, `AKIA*`, or private keys (auto-redacting to `[REDACTED]` when sweeping temporary notes). All boards, archives, guard walls, and `chief-audit.jsonl` stay locally under `~/.dsh/chief/`.
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
 
@@ -255,8 +409,6 @@ dsh plugin --profile desktop add https://github.com/gluztm/dsh-chief/releases/do
255
409
  | Contributor | Role |
256
410
  | --- | --- |
257
411
  | [gluztm](https://github.com/gluztm) | Creator, product design, and maintainer |
258
- | [@iridiumgit](https://github.com/iridiumgit) | Root-caused and contributed the DSH light-theme popover fix ([#3](https://github.com/gluztm/dsh-chief/issues/3)), subagent entry visibility diagnosis ([#4](https://github.com/gluztm/dsh-chief/issues/4)), and UX feedback ([#5](https://github.com/gluztm/dsh-chief/issues/5)) |
259
- | [@edz017](https://github.com/edz017) | Day-one DSH `0.2.2-rc.1~rc.3` host compatibility audit, `engines.dsh` constraint diagnosis, and `preferNewPane` fix ([#1](https://github.com/gluztm/dsh-chief/issues/1)) |
260
412
  | [Gemini](https://github.com/gemini-code-assist) | Feature development, `pkg/safety/` kernel, Cognitive Desktop, orthogonal runtime modes, fan gauge & CI gates |
261
413
  | [Codex](https://github.com/codex) | Modular architecture design, concurrency stress tests, and red-team boundary audits |
262
414
  | [deepseek-ai](https://github.com/deepseek-ai) | DeepSeek Harness host runtime and SuperAgent workflow alignment |