dsh-chief 1.3.0 → 1.5.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 CHANGED
@@ -5,26 +5,98 @@ 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.5.0] - 2026-11-20
9
+
10
+ ### Added
11
+
12
+ #### 🗂️ 认知桌面、三层钩子渐变隔离与动态俯视纸质卷宗 UI (`archive-core.js` / `archive-dossiers.js` / `tabs/archives.js`)
13
+ - **工程实现**:
14
+ - **三层钩子平滑可见性模型**:本局档案柜未整理草稿对主对话不可见、参谋随时可读,经参谋整理写入 `hookKeywords`/`hookCue`/`hasHook: true` 后仅向主对话注入轻量 `🪝` 索引并新增 `chief_board({ action: "archive.pull", id })` 按需拉阅(点亮 `leadPulledSessions` 与 `📖 主代理已拉阅` 徽章);全局档案柜未织钩草稿对主对话和参谋双盲,织钩后仅向参谋开放 `globalHookIndex` 与 `pull_global` 拉阅(主对话仍 0 泄露);冷藏档案柜(`precipitated`)新增 `precipitatedFolders` 折叠抽屉及人类速览钩子,对主对话和参谋维持 0-byte 隔离并拦截参谋 `archiveOps` 访问。
15
+ - **认知桌面预算驱动与双通道注入**:`digest.js` 与 `board-actions.js` 彻底肃清 `sessionArchiveBriefs` 全文泄露,确立置顶 `desktop`(上限 `2,400 Tokens / 6 份`)为唯一全文注入源;超额自动按 `copper < silver < gold`/Pin 时间挤退入 `recentlyUnpinnedWatch` 观察队列;新增 `executeChiefArchiveInjectionOp` 双通道(`pin_to_desktop`/`unpin_from_desktop` 通道 A、`deliver_to_lead` 一次性执行信封通道 B,记入 `chiefDeliveredSessions`),严格服从 L0–L3 权限门控。
16
+ - **动态俯视纸质卡片 UI**:新增 `.dnb-desktop-zone`(含实时 Token 占用条与「🌙 交参谋梦境漫游归入抽屉」快捷按钮)、`.dnb-vault-banner` 谁在看总览横幅、全三层 `.dnb-drawer-box` 折叠抽屉及 `.dnb-paper-dossier` 动态纸质卷宗卡(折叠态仅呈现标题、关键词钩子与谁在看徽章,点击后平滑展开操作栏与分块记忆点)。
17
+ - **用户感知**:打开档案页顶部即见置顶「认知桌面」和 Token 额度条,三层档案像俯瞰书桌上的实体文件夹与纸页,未点开只看标题和关键词钩子,谁能看、谁在看一眼了然,主对话上下文不再被无关历史档案挤爆。
18
+
19
+ #### 🤖 正交运行模式、托管「🌙 梦境漫游」、5 条件自动休眠与一站式执行 (`chief-review.js` / `auto-continue.js` / `runtime-hooks.js`)
20
+ - **工程实现**:
21
+ - **三态正交总控 (`runMode: 'off' | 'patrol' | 'managed'`)**:统一替代旧版零散开关;`off` 后台 0 review LLM 消耗;`patrol` 常规回合 0 Token,仅在 `guard_wall_blocked`、`turn_error`、`stream_interrupted` 等异常事件唤醒巡检;`managed` 启用持续督导。
22
+ - **托管后台「🌙 梦境漫游」 (`runManagedDreamRoam`)**:托管态 L1+ 权限时自动分拣未织钩草稿与 `recentlyUnpinnedWatch` 入抽屉并生成钩子,同时点亮星空紫蓝毛玻璃遮罩 `data-tone="dream"`(`'🌙 参谋长正在梦境漫游 · 轻拢卷宗与织就钩子中...'`),严禁改写工作区代码或回推桌面。
23
+ - **5 条件自动休眠守护**:`checkAndStopIdleAutoPilot` 仅在(1)闲置达 `managedIdleTimeoutMs`(默认 15 分钟)且无运行中代理、(2)0 `doing` 任务、(3)0 待审批/提权、(4)0 未结 `inquiries`、(5)0 待复盘定时器且 `recentlyUnpinnedWatch` 清空时自动切回 `'off'`。
24
+ - **`Auto continue` 双模式唤醒与 L3 一站式建议收口**:`patrol` 与 `managed` 下断流事件过红线与物理墙检查后按 L0–L3 分级处置(L3 下发 `[EXECUTION_REQUEST #taskId]`);`L3 + 强介入` 时 `executeBatchSuggestions` 自动执行安全建议(跳过 `guard_wall`、`goal_approval` 及 `pinGlobal`)并产出 `isOneStopReport: true` 合并战报卡片 `'🏁 一站式战报回执'`。
25
+ - **用户感知**:关停即零消耗,巡检只在真出事或断线时介入,开启托管后参谋长会在空闲期悄悄「🌙 梦境漫游」归整卷宗并织好检索钩子,忙完 15 分钟所有待办归零后自动退回关停休眠。
26
+
27
+ #### 🧠 思考强度、自适应换挡与跨模型每角色 `🔒 锁挡` 保护 (`chief-models.js` / `subagent-runtime.js` / `tabs/chief.js`)
28
+ - **工程实现**:
29
+ - **6 档配置与模型能力对齐 (`thinkingEffort`)**:支持 `auto / off / low / medium / high / xhigh`,调用 `llm.resolveModelInfo` 自动降级或对非推理模型剥离参数;`decideAdaptiveChiefEffort` 在 `chat_summary` / `dream_roam` / `quick_status` 自动降为 `off`,常规复盘为 `medium`,`blank_explore` / `wall_blocked` / `craft_wall` / `precipitate` / `strong_intervention` 升为 `high`,`hazard_diagnosis` 升为 `xhigh`,并在聊天与回执卡落盘 `thinkingEffort` 与 `thinkingEffortMode` 角标元数据。
30
+ - **L2/L3 跨代理热调挡与 `🔒 锁挡` 一票否决**:通过 `effortOps`、看板 `task.dispatch({ reasoningEffort })` 与 `controlMainAgent({ op: 'set_effort' })` 静默热调 `@lead` 与子代理下一轮推理深度;新增 `lockedModelEfforts` 每角色锁挡,用户一键锁定后参谋 L2/L3 自动改挡被硬拦截并记入审计。
31
+ - **用户感知**:可在模型选择器与参谋回复右上角直接看清每条回答使用的推理强度,默认「🪄 自适应」自动把好钢用在复杂排障与筑墙上;也能直接在前端一键锁定主对话或任意子代理的思考挡位,防止参谋越权改动。
32
+
33
+ ### Fixed
34
+ - **加固模型思考锁挡 (`lockedModelEfforts`) 权限隔离与 `toggleLockAgentEffort` 落地 (`chief-state.js` / `api-routes.js`)**:封堵非人类调用方通过 `updateChiefConfig` 直接篡改 `lockedModelEfforts` 或已锁挡 `chief` 思考强度的旁路(Fail-Closed 拦截并写入 `model_effort_lock` 审计日志);仅允许经宿主鉴权面板路由 (`/chief/config`) 或显式 `byUser: true` 人工操作修改。
35
+ - **拦截 `inquiry.reply` 重复重放 (`chief-state.js`)**:`answerChiefInquiry` 校验问询当前状态,对已 `answered` 结案的 `inquiryId` 幂等拒绝并写入 `inquiry_reply_replay_rejected` 审计记录,杜绝覆盖原答案及重复写入聊天回执、审计日志与任务账本。
36
+ - **修复 DSH 浅色主题下弹层仍为深色问题(Fixes [#3](https://github.com/gluztm/dsh-chief/issues/3), thanks `@iridiumgit`,`styles.js`)**:将 `--dnb-popover` 从固定深色的 `--dsw-alias-hovercard-bg` 切换为随主题变的 `--dsw-alias-bg-elevated`,并显式适配 `html[data-ds-theme-source="light"]` 与 `[data-ds-theme="light"]`(独立于系统 `prefers-color-scheme`,覆盖四级权限弹层、战术驾驶舱、更多菜单、流光毛玻璃与俯视角纸质卷宗,并防止系统浅色误染 DSH 深色主题)。
37
+ - **子代理会话自动隐藏参谋长入口与防会话污染(Fixes [#4](https://github.com/gluztm/dsh-chief/issues/4), thanks `@iridiumgit`,`store.js` / `api.js` / `components/Panel.js`)**:新增 `isSubagentSessionId` 复用宿主 `sessions.subagentAddress` 与快照元信息识别子代理会话,在子代理对话框内自动隐藏输入框参谋长按钮(`ComposerEntry`)及主视口右下角悬浮入口(`CornerTrigger`),并阻止 `adoptSession` 被子代理窗格覆盖主会话焦点。
38
+ - **自适应顶栏版本号、锁挡状态同步、强介入先锁目标即推与极低概率请示拆墙(`Panel.js` / `tasks.js` / `modals.js` / `chief.js` / `chief-commands.js` / `chief-approvals.js` / `api-routes.js`)**:
39
+ - 使用 `@container dnb-head` 在宽敞面板展示版本号、窄面板自动隐藏(未同步警示始终亮显);
40
+ - 修复子代理/主对话思考强度 `🔒 锁挡` 按钮因 `effortLocked` 缓存及别名键导致的无法切换/解锁问题,并区分清晰锁定态图标文案;
41
+ - 开启「主动强介入」必须先填写并点选锁定核心总目标(未锁点击则目标框红框闪烁提醒),确认开启后按当前权限自动立即唤醒/审批首轮推进,无需再发“继续”;
42
+ - 参谋长请示拆墙机制落地(`kind: 'wall_removal'`):仅当主/子代理真实撞墙无法绕过并上报、参谋独立复核确认无替代方案时方可提交审批单,任何 L0–L3 权限均不可自拆或由自动流水线跳过,必须人类点击批准才暂挂/拆除目标墙;
43
+ - 参谋摘要页新增「💡 咨询」按钮,坦诚给出建议或直接说明暂无建议/管不了的外部事项,不强行凑执行按钮,可执行项按标准权限与审批流程推进。
44
+ - **扇形思考强度仪表盘、固定高度防抽搐、弹窗实底防透与团队思考强度「自动 / 手动」简洁切换(`chief-state.js` / `chief-commands.js` / `subagent-runtime.js` / `api-routes.js` / `components/common.js` / `components/modals.js` / `tabs/chief.js` / `tabs/tasks.js` / `styles.js`)**:
45
+ - 将模型选择器与战术驾驶舱中的思考强度替换为 180° 扇形档位表(`EffortFanGauge`):支持拖拽/点击切换固定挡位或点按中心一键切回 `🪄 自动调节`,移除自动扫掠循环动画与底部自适应说明栏,保持原生气泡解释且彻底消除鼠标跨档悬停导致的弹窗高度抽搐;
46
+ - 取消针对单个主/子代理的思考档位下拉调控与 `锁挡` 按钮,改为在扇形表盘下方提供「团队思考强度(主/子代理):自动 / 手动」一键切换(`teamEffortMode`,默认 `auto` 由参谋长按当前权限范围自动调节,切换 `manual` 则由人类掌控且参谋主动调挡门禁与执行均严格拦截);
47
+ - 精简移除战术驾驶舱顶部 `拉起 / 复位` 把手,保留主代理与子代理卡片及调度标签前置 `agentLead` / `agentSub` 矢量图标,并为 `.dnb-tactical-pop` / `.dnb-perm-pop` / `.dnb-more-menu` / `.dnb-menu` 补充深/浅色实底背景修复深色模式下弹层半透明透底叠字问题。
48
+ - **支持鼠标单击毛玻璃遮罩即穿透恢复操作且保留外框流光提示 (`components/Panel.js` / `styles.js`)**:当后台「🌙 梦境漫游」或自动审查点亮毛玻璃舞台时,新增 `点击任意处收起遮罩继续操作 · 外框流光表示仍在运作` 提示;用户鼠标单击毛玻璃任意区域即可立即卸除模糊与点击拦截层恢复自由操作面板,同时四边 `.dnb-chief-fx-border` 彩色流光外框依然保持运行,直至本轮后台运作结束。
49
+
50
+ ## [1.4.0] - 2026-11-19
51
+
52
+ ### Added
53
+
54
+ #### 🧱 全会话事前物理驻墙与独立安全内核 (`pkg/safety/` + `tools/pre-execute`)
55
+ - **事前物理硬拦截**:主对话、子代理与参谋调用文件或命令落地前统一经过 `tools/pre-execute` 门禁,撞墙直接拒止并写入 `chief-audit.jsonl`。
56
+ - **随身复用的动态物理墙**:边界页新增「🧱 物理驻墙」(持久化于 `~/.dsh/chief/guard-walls.json`),支持 `global`(跨窗口自动跟随)/ `workspace`(仅本工程)/ `paused`(暂挂备用)一键切换。
57
+ - **大白话手搓与同类合并**:对参谋说白话即可生成 `wallProposals` 草案(人工确认后落锁),支持多选或一键合并相同 `ruleType` 的物理墙(跨类型混选自动拦截)。
58
+ - **9 模块独立安全内核**:将硬守卫、命令拆解、路径穿透检测、能力引擎与审计拆为 `pkg/safety/` 9 个零业务依赖模块,与 `chief-executor.js` 全集 MD5 锁定。
59
+
60
+ #### 🤝 参谋懒介入协同、无感问询与自动续跑 (`chief-commands.js` + `chief-state.js`)
61
+ - **主对话优先(懒介入)**:高权限下只要未点名让参谋亲自操刀,工作区改动与命令统一发 `[EXECUTION_REQUEST]` 委派 `@lead` 动手,绝不冒充用户发言。
62
+ - **空白新窗口先探路定计划**:新开空白会话直接找参谋时,默认先引导 `@lead` 只读看代码 → `graph.plan` 排计划 → `chief.request` 汇报结论。
63
+ - **后台优先问询零打断**:参谋缺细节时经 `agent/pre-step` 递出 `[INQUIRY #id]`,主对话顺手调 `inquiry.reply` 秒回后继续原工作,不打断当前步骤。
64
+ - **审批/提权后自动续跑 (`TaskLedger`)**:点完「允许」后按持久化账本自动接上未走完的步骤;异常重启时自动将半途任务安全置为 `interrupted`,不偷偷重跑。
65
+
66
+ #### 🔒 细粒度能力模型与只紧不松策略 (`policy-engine.js` + `policy-plugin.js`)
67
+ - **`role + capabilities` 双层解耦**:界面保持 `advisor / assistant / strategist / chief` 四档,底层放开 `assistant` 低风险看板与档案整理免弹窗,依然严锁文件写入。
68
+ - **单次授权防复用与只紧不松插件**:逐项授权绑定目标路径/命令 `capabilityScope`;可选 `policyPlugins` 仅允许收紧规则,试图关闭硬守卫的配置直接拒绝。
69
+
70
+ ### Changed
71
+ - **前后台流光舞台提示 (`activeWork`)**:参谋在前台或后台自动巡检、收档、维护边界或刷摘要时,面板自动切页并点亮流动渐变 + 双束光线边框与毛玻璃跃动字提示。
72
+ - **强介入双防线核对窗 (`InterventionConfirmModal`)**:开启前并排核对当前生效的「🧱 物理驻墙」与「🚫 禁止红线」,右上角改为「管理边界」并支持一键收起/拉开。
73
+ - **问答分组框、红盾哨兵与顺势刷摘要**:每轮提问与回执包进高对比分组外框并支持一键折展,按钮统一靠右下对齐;「🛡 红线哨兵」开启时变红并点亮双层红盾图标;每次聊完按 60 秒节流后台顺势刷新顶部摘要。
74
+
75
+ ### Fixed
76
+ - **适配 DSH `0.2.2-rc.5` 原生工具与弹窗审批**:对齐 `dsh-tool-fs`(`read` / `read_image` / `write` / `edit` / `apply_patch`),修复仅禁写路径墙误拦 `str_replace_editor` 只读 `view` 模式的问题,接入 `tools/pre-execute` 原生 `{ kind: 'ask' }` 单次审批弹窗,并兼容多代际 `session(.vN).jsonl(.zstd)` 日志检索。
77
+ - **封堵复合管道、内联脚本与多反斜杠凭据变形**:补齐 `&& / || / | / ;`、嵌套 Shell、`node -e / python -c / pwsh / iex`(含 Base64)及引号多反斜杠绕过(如 `copy x ".\\"env`),对 `node .\env\setup.js`、`process.env.NODE_ENV` 与 `$env:TEMP` 保持 0 误杀;`bounds.*` 与驻墙删改强制校验 `HUMAN_BOUNDS_CONFIRM_TOKEN`。
78
+
8
79
  ## [1.3.0] - 2026-11-18
9
80
 
10
81
  ### Added
11
- - **模块化架构拆分(减少单文件依赖)**:将 4 个超长单体文件拆分为 **29 个后端 ESM 模块 + 16 个前端源码模块**,保持 `index.js`、`chief.js`、`archives.js`、`client.js` 公开导出 100% 兼容,强制零 `export let/var` 可变导出、无环依赖,并配套 `ARCHITECTURE.md`、`scripts/build-client.mjs` 与 `.github/workflows/ci.yml` 双版本 Node (22 / 24) CI 门禁。
12
- - **授权/提权后自动续跑 (`resumeTasks`)**:用户点击「允许本次操作」或完成提权审批后,按轻量恢复账本(30 分钟 TTL + 最大深度熔断)自动续接未完成的多步参谋任务,拒绝或过期自动取消不空转。
13
- - **独立只追加审计账本 (`chief-audit.jsonl`)**:所有权限判定、审批放行/拒绝与安全拦截均独立追加落盘至 `chief-audit.jsonl`,不受状态文件截断影响。
14
- - **顶栏常驻版本号与对话流筛选**:参谋长标题栏常驻展示当前版本徽章(`v1.3.0`);参谋页支持 **`全部 / 💬 问答 / 📋 回执`** 视觉筛选,并将待定建议收拢至顶部统一「`▶ 执行建议`」批量执行。
15
82
 
16
- ### Security
17
- - **命令与内容安全卫兵归一化**:`chief-executor.js` 在安全检查前统一执行 NFKC 规范化、PowerShell `-EncodedCommand` 解码、引号拼接还原、引号内反斜杠(如 `".\"env`)与 CMD `^` 插入符折叠、以及 `git` / `npm` 子命令提取;`checkForbiddenBounds` 同步覆盖 `write_file` / `edit_file` / 递话参数正文。
18
- - **凭据路径与 NTFS ADS 拦截**:拦截工作区外越界写入、凭据符号链接及 NTFS Alternate Data Streams(如 `safe.txt:.env`)。
19
- - **审批快照哈希锁与失败默认拒绝**:待批操作绑定 SHA-256 `payloadHash`,拦截篡改与重放审批并全部记入审计;同源 HTTP `guard()` 检测到连接守卫异常时 fail-closed 返回 `403`。
83
+ #### 🧩 模块化低耦合架构与双版本 CI (`ARCHITECTURE.md` + `build-client.mjs`)
84
+ - **前后端模块化拆分**:将 4 个超长单体文件拆为 **29 个后端模块 + 16 个前端源码模块**,`index.js`、`chief.js`、`archives.js`、`client.js` 公开导出保持 100% 兼容。
85
+ - **静态边界与双版本门禁**:强制零 `export let/var` 可变导出、零循环依赖,新增 GitHub Actions Node `22 / 24` 自动门禁。
86
+
87
+ #### 🔄 审批续跑、独立审计与对话流筛选 (`chief-executor.js` + `chief-state.js`)
88
+ - **点完允许自动接着跑 (`resumeTasks`)**:点击「允许本次操作」或完成提权后,按 30 分钟 TTL 与深度熔断自动续接未走完的多步任务,拒绝或超时自动取消不空转。
89
+ - **独立只追加审计账本 (`chief-audit.jsonl`)**:权限判定、放行/拒绝与安全拦截统一追加写入 `~/.dsh/chief/chief-audit.jsonl`,不受状态文件截断影响。
90
+ - **顶栏版本号与对话流筛选**:标题栏常驻显示当前版本徽章(`v1.3.0`);参谋页支持 `全部 / 💬 问答 / 📋 回执` 筛选,待定建议统一收拢至顶部「`▶ 执行建议`」。
20
91
 
21
92
  ### Changed
22
- - **存储层并发锁与原子写鲁棒性加固**:`board-store.js`、`chief-state.js`、`archive-core.js` 统一引入跨进程/跨工作线程 `O_EXCL` 自旋锁与 `threadId` 唯一临时文件路径,把 Windows NTFS 瞬态 `EPERM` / `EACCES` / `EBUSY` 纳入随机抖动等待,并对 `fs.renameSync` 增加瞬态重试,消除高并发多线程场景下的丢写风险。
23
- - **模型上下文窗口异步回写**:`subagent-runtime.js` 兼容同步与异步 `resolveModelInfo` 查询,缓存并及时更新会话 Token 窗口统计。
93
+ - **跨进程与多线程文件锁加固 (`O_EXCL`)**:`board-store.js`、`chief-state.js`、`archive-core.js` 引入 `threadId` 唯一临时文件与 Windows NTFS `EPERM / EACCES / EBUSY` 随机抖动自旋重试,消除高并发丢写。
94
+ - **模型上下文窗口异步回写 (`subagent-runtime.js`)**:兼容同步与异步 `resolveModelInfo` 查询,及时缓存并刷新会话 Token 窗口统计。
24
95
 
25
96
  ### Fixed
26
- - **修复关闭右侧面板后每 3.2 秒自动弹回与假 Toggle**:区分首次启动自动挂载与用户手动收起状态,支持底部入口点击真实折叠/展开。
27
- - **修复档案页「一键收纳入柜」无响应与未刷新**:补齐会话看板、根会话看板与横幅显式指定共享便签三路收纳,自动对疑似密钥串执行 `[REDACTED]` 脱敏入柜,并将最新 `board`、`archives` 与分柜实时计数即时同步至前端状态。
97
+ - **命令与路径安全卫兵反混淆 (`chief-executor.js`)**:检查前统一执行 NFKC 规范化、PowerShell `-EncodedCommand` 解码、引号拼接与 `^` 插入符折叠;拦截越界写入、凭据符号链接与 NTFS ADS 流(如 `safe.txt:.env`);待批操作绑定 SHA-256 `payloadHash`,同源 `guard()` 异常默认返回 `403`。
98
+ - **修复关闭右侧栏后每 3.2 秒自动弹回**:区分首次启动自动展开与用户手动收起状态,底部入口点击恢复真实折叠/展开(Toggle)。
99
+ - **修复档案页「一键收纳入柜」漏收与不刷新**:补齐会话看板、根会话看板与共享便签三路收纳,疑似密钥自动 `[REDACTED]` 脱敏入柜,并即时同步前端分柜计数。
28
100
 
29
101
  ## [1.2.1] - 2026-11-17
30
102
 
package/README.en.md CHANGED
@@ -1,23 +1,29 @@
1
1
  <div align="center">
2
2
 
3
- **AI manages AI, you take the day off — even when you're not there, it's watching.**
4
- <sub>It dispatches the work, keeps the subagents on track, and closes out on its own; if it starts to drift, it stops first.</sub>
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
5
 
6
- <img src="assets/chief-10s-compare.gif" alt="dsh-chief in 10 seconds: left is a plain long session — re-reading the same files, losing parameters to compaction, forgetting when you switch windows; right is Chief — loop breaker, parameters vaulted before compaction, archive carried across windows. Read-only by default." width="800" />
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
7
 
8
- <sub>Read-only by default · asks before touching your workspace · `dsh plugin --profile web add dsh-chief`</sub>
8
+ <sub>Read-only by default · Per-action workspace approval · `dsh plugin --profile desktop add dsh-chief`</sub>
9
9
 
10
10
  <br />
11
11
 
12
- <img src="assets/hero-banner.png" alt="DSH Chief (dsh-chief) v1.2.0 — Wish-Driven Multi-Agent Cockpit & 3-Tier Cold Vaults" width="100%" />
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
13
 
14
14
  <br />
15
15
 
16
- # ✦ DSH Chief (`dsh-chief` · DSH 参谋长)
17
- ### DeepSeek Harness Multi-Agent Cockpit · Wishing Box Executor · 3-Tier 0-Token Cold Vaults · `✦ 智选压缩`
16
+ <img src="assets/hero-banner.png" alt="dsh-chief main cockpit view" width="100%" />
17
+
18
+ <br />
19
+
20
+ # DSH Chief (`dsh-chief`)
21
+ ### DeepSeek Harness Right-Sidebar Supervisor, Zero-Token Archive Vault & Safety Gate
18
22
 
19
23
  [![DSH Compatibility](https://img.shields.io/badge/DSH-%3E%3D%200.2.2--rc.2-38bdf8?style=flat-square)](https://dsh.deepseek.com)
24
+ [![GitHub Release](https://img.shields.io/github/v/release/gluztm/dsh-chief?color=2563eb&style=flat-square)](https://github.com/gluztm/dsh-chief/releases)
20
25
  [![npm version](https://img.shields.io/npm/v/dsh-chief?color=cb3837&style=flat-square)](https://www.npmjs.com/package/dsh-chief)
26
+ [![CI](https://github.com/gluztm/dsh-chief/actions/workflows/ci.yml/badge.svg)](https://github.com/gluztm/dsh-chief/actions/workflows/ci.yml)
21
27
  [![DSH Market](https://img.shields.io/badge/DSH%20Market-Listed-f59e0b?style=flat-square)](https://awesome-dsh-plugin.com/p/gluztm/dsh-chief/)
22
28
  [![Bilibili Demo](https://img.shields.io/badge/Bilibili-Video%20Demo-fb7299?style=flat-square)](https://www.bilibili.com/video/BV1DqsV6QEGi)
23
29
  [![SuperAgent Ready](https://img.shields.io/badge/SuperAgent-Router--Worker%20Synergy-a855f7?style=flat-square)](https://github.com/deepseek-ai/dsh-superagent-prototype)
@@ -25,102 +31,92 @@
25
31
  [![Zero Dependencies](https://img.shields.io/badge/Dependencies-0%20External-ffe033?style=flat-square)](#)
26
32
  [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-f87171?style=flat-square)](LICENSE)
27
33
 
28
- > **Nobody watching, nothing breaking: state your intent in the Wishing Box and it runs the whole flow, stopping first if it starts to drift (`v1.3.0`)**
29
- > Follows the same shape as DeepSeek's official **[SuperAgent (`dsh-superagent-prototype`)](https://github.com/deepseek-ai/dsh-superagent-prototype)** *Router + Isolated Workers* architecture to keep focus sharp and context clean.
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.
36
+
37
+ [简体中文 (`README.md`)](README.md) · **English** · [Changelog (`CHANGELOG.md`)](CHANGELOG.md) · [Architecture (`ARCHITECTURE.md`)](ARCHITECTURE.md)
30
38
 
31
- [简体中文 (`README.md`)](README.md) · **English** · [Changelog (`CHANGELOG.md`)](CHANGELOG.md)
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)
32
40
 
33
41
  </div>
34
42
 
35
43
  ---
36
44
 
37
- ## 🔗 Core Highlights Wired Into DSH Runtime
45
+ ## What Changed in `v1.5.0`
38
46
 
39
- - **Modular Architecture & Concurrency Robustness (`v1.3.0`)**: Split from monolithic files into 29 backend + 16 frontend ES modules with acyclic DAG boundaries, `O_EXCL` spin-locks with Windows NTFS retry (`board-store`, `chief-state`, `archive-core`), fail-closed `guard()`, SHA-256 `payloadHash` approval verification, and append-only `chief-audit.jsonl`.
40
-
41
- - **Persistent Router Cockpit**: Unifies the root coordinator, subagents, and linked DSH windows inside one **Full-Spread Pyramid DAG**—zero blind tab switching.
42
- - **Native Split-Pane Streams (`subagentchat`)**: Click `分屏` on any subagent node to open DSH's native `sidebarRight.openResource` live stream.
43
- - **Read-only first, asks before acting (`chief-executor.js`)**: New and handed-off sessions start read-only — it observes and proposes first. Editing files, running commands, or steering subagents needs your per-action approval, with a confirmation popup and an audit log behind it.
44
- - **Ready on Blank New Sessions**: Resolves workspace root via `workspaceRegistry` even before turn 1 in the main chat, and stages `@lead` relays cleanly in `pending-transfer.json`.
45
- - **Objective Lock & Human Sign-Off**: Strong Intervention locks your Core Objective (`0 = ∞` turns supported), verifies `allowed` must-do items, and waits for your explicit **`✅ 批准结项`** click.
46
- - **Cross-Isolation `✦ 智选压缩` & Flexible Thresholds**: Compacts via DSH `/compact` across Cordis service isolation (and wakes dormant agents via `sessionController.resolveAgent`), supporting `10%–95%`, `>= 8,000` tokens, or direct `"压缩吧"` commands.
47
- - **Three-Tier 0-Token Cold Vaults**: Isolates **Session Cabinet**, **System Global Cold Vault** (with live Local ↔ Global diff), and **Double-Blind Precipitated Vault**, spotlighted only via **`📌 摆上桌面`**.
48
- - **Clean Cross-Window Linking & Pinnable Handoffs**: Warns before linking sessions, purges external context immediately on detach, and locks snapshots via **`📌 定住防改`**.
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.
49
51
 
50
52
  ---
51
53
 
52
- ## 💡 6 Daily Engineering Pain Points — Solved
54
+ ## Daily Friction This Plugin Fixes
53
55
 
54
- Ordinary Todo plugins give you another scratchpad; always-on memory plugins flood every system prompt with stale noise. **`dsh-chief` turns human micromanagement into Wish-Driven One-Stop Execution:**
56
+ If you run multi-step coding tasks inside DeepSeek Harness, these six problems tend to come up quickly.
55
57
 
56
- ### 1. Agents Stop Halfway ("I edited the file, please test it yourself")
57
- - **Typical Plugins**: Static checklists let agents self-declare victory.
58
- - **`dsh-chief`**: Locks the Core Objective with Strong Intervention (`0 = ∞`), verifies `allowed` must-do checks, and blocks exit until you click **`✅ 批准结项`**.
59
- - **Instant Override**: High-risk checks prompt first, and the red **`⏹ 急停`** button halts background drives immediately.
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
- ### 2. "Lobotomy" Amnesia Right After Context Compaction
62
- - **Typical Plugins**: Auto-compaction wipes out freshly discovered file paths, commands, and errors.
63
- - **`dsh-chief`**: Triggers **`✦ 智选压缩`** when idle at phase boundaries, custom **`10%–95%` / `>= 8k`** thresholds, or direct `"压缩吧"` requests.
64
- - **Atomic Guarantee**: Harvests and disk-verifies notes in the Session Cabinet before `/compact`, never inflating counters on failures or empty no-ops.
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.
65
67
 
66
- ### 3. Bloated Memory Injections Mudding the Model's Brain
67
- - **Typical Plugins**: Re-injects megabytes of old logs every turn, burning quota and confusing current reasoning.
68
- - **`dsh-chief`**: All three cold vaults remain **0 bytes / 0 tokens while sealed** (Precipitated Vault is double-blind to both Lead and Chief).
69
- - **On-Demand Precision**: Injects only items explicitly spotlighted via **`📌 摆上桌面`** or flipped out via **`📤 取出`**.
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.
70
71
 
71
- ### 4. Chat-Only "Mascot Copilots" — Or All-or-Nothing Yolo Modes
72
- - **Typical Plugins**: Either you can only look, or one switch hands over everything and it quietly edits your files.
73
- - **`dsh-chief`**: Read-only by default, and it asks before each escalation — it won't act up while you're away:
74
- - **Read-only on every new session**: Observes, analyses, and proposes; never touches the workspace or takes over lead/subagent flows.
75
- - **Asks before acting**: File edits, commands, and subagent steering pop an **Operation Approval Modal** (`what / on what / why / impact`) and run only after you allow that one action.
76
- - **Second check for high autonomy**: Granting higher autonomy requires acknowledging the **High-Privilege Risk Notice** checkbox, then a backend check.
77
- - **Take it back anytime**: The red **`⏹ 急停`** button hands control back to you immediately, and everything stays in the audit log.
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`.
78
79
 
79
- ### 5. Cramped Subagent Views & Verbal Rules Forgotten in 10 Turns
80
- - **Typical Plugins**: Tiny scroll boxes hide blocked workers, and safety instructions scroll out of context.
81
- - **`dsh-chief`**: Full-spread Pyramid DAG + native split-pane stream viewer + **`📌` Global Thumbtack Redlines** persisted across tasks.
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.
82
83
 
83
- ### 6. Lost Setup Across Windows & Silent Metered-API Quota Drain
84
- - **Typical Plugins**: New tabs wipe your coordinator rules, while background loops hit expensive metered APIs.
85
- - **`dsh-chief`**: Defaults to **`⏸ On-Demand` (0 background LLM calls)**, strictly aligns `Provider / Model` channels, and clones setup via 1-click Chief handoff.
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.
86
87
 
87
88
  ---
88
89
 
89
- ## 📸 Visual Tour (`v1.2.0` 7 High-DPI Views)
90
+ ## Inside the Sidebar
90
91
 
91
- ### 01 · Wish-Driven Chief Cockpit (`参谋` Tab)
92
- - **Guardrails & Tactical Bar**: Compact `+` trigger on the left with live pills above (`⚡ 强介入 0/♾️`, `✦ 智选压缩`, `🛡 红线哨兵`, `🔵 完全权限`, and `⏹ 急停`).
93
- - **Clear Execution & Compaction Receipts**: Live status narrative, boundary approval cards, and visible `✦ 智选压缩` chat receipts side-by-side.
94
- - **Handoff Sync Toggle**: `同步交接单` control right in the cockpit header.
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**.
95
95
 
96
- ![01 - Wish-Driven Chief Cockpit Overview](assets/screenshots/01-chief-cockpit-overview.png)
96
+ ![01 - Chief Cockpit Overview](assets/screenshots/01-chief-cockpit-overview.png)
97
97
 
98
98
  ---
99
99
 
100
- ### 02 · Full-Spread Pyramid Subagent DAG (`任务` Tab)
101
- - **Zero Cramped Panning**: Root Coordinator sits cleanly at the apex while subagent lanes spread vertically below.
102
- - **Inline Squad Controls**: Transition statuses, ask for plain-language explanations, dispatch tasks, or launch native `分屏` live streams in one click.
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.
103
102
 
104
103
  <div align="center">
105
- <img src="assets/screenshots/02-full-spread-pyramid-dag.png" alt="02 - Full-Spread Pyramid Task Topology" width="76%" />
104
+ <img src="assets/screenshots/02-full-spread-pyramid-dag.png" alt="02 - Subagent DAG View" width="80%" />
106
105
  </div>
107
106
 
108
107
  ---
109
108
 
110
- ### 03 · 0-Token Cold Vaults & Bidirectional Diff (`档案` Tab)
111
- - **Strict Vault Switcher**: Toggle **💬 Session Cabinet**, **🌐 System Global Vault**, and **🏛️ Precipitated Cold Vault** cleanly from the top bar.
112
- - **Paperclip Organization, Four Levels**: Cabinets → Drawers → Gold / Silver / Copper paperclipped dossiers → Unfoldable points & sub-points.
113
- - **Spotlight & Diff Tracking**: Tracks `Synced` / `Local Modified` / `Local Only` diffs; inject selectively via **`📌 摆上桌面`** or send multi-archive **combinatorial relays**.
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.
114
111
 
115
112
  <div align="center">
116
- <img src="assets/screenshots/03-cold-archive-cabinet.png" alt="03 - Three-Tier Cold Vaults and Bidirectional Diff" width="68%" />
113
+ <img src="assets/screenshots/03-cold-archive-cabinet.png" alt="03 - Three-Tier Cold Vaults and Cognitive Desktop" width="90%" />
117
114
  </div>
118
115
 
119
116
  ---
120
117
 
121
- ### 04 · Goal Supervision, Step Q&A & Closure Gate (`规划` Top)
122
- - **Core Objective Lock**: Click **`🎯 设为目标`** to supervise long-horizon goals (locked automatically while Strong Intervention is active).
123
- - **Interactive Step Board**: Click any step to ask Chief *"Why does this step exist?"* without interrupting the main session.
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`.
124
120
 
125
121
  <div align="center">
126
122
  <img src="assets/screenshots/04-dual-tier-goal-and-step-qa.png" alt="04 - Goal Supervision and Step Q&A" width="68%" />
@@ -128,10 +124,9 @@ Ordinary Todo plugins give you another scratchpad; always-on memory plugins floo
128
124
 
129
125
  ---
130
126
 
131
- ### 05 · Cross-Window Peer Linking & Drawer Mailbox (`协同` Tab)
132
- - **Cluster Federation**: Link multiple independent DSH windows to share real-time progress, with instant zero-pollution cleanup on detach.
133
- - **Color-Coded Drawer Mailbox**: Deduplicates `@all` broadcasts and groups messages by channel scope.
134
- - **Lossless Image Staging**: Uploaded screenshots persist directly in `<cwd>/.dsh-chief/uploads/` for multimodal lead fallback.
127
+ ### 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.
135
130
 
136
131
  <div align="center">
137
132
  <img src="assets/screenshots/05-cross-session-collab-bus.png" alt="05 - Cross-Window Linking and Mailbox" width="68%" />
@@ -139,87 +134,135 @@ Ordinary Todo plugins give you another scratchpad; always-on memory plugins floo
139
134
 
140
135
  ---
141
136
 
142
- ### 06 · `📌` Global Thumbtack Redlines & Proposals (`边界` Tab)
143
- - **Task vs. Global Scope**: Pin critical rules with **`📌`** to enforce globally across projects; leave unpinned rules scoped to the active session.
144
- - **Must-Do & Boundary Governance**: Manage `allowed`, `forbidden`, and `notes` rules, approve worker proposals, or consolidate scattered entries cleanly.
137
+ ### 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.
145
140
 
146
141
  <div align="center">
147
- <img src="assets/screenshots/06-pinned-bounds-and-handoff.png" alt="06 - Global Thumbtack Redlines" width="68%" />
142
+ <img src="assets/screenshots/06-pinned-bounds-and-handoff.png" alt="06 - Pinned Global Redlines and Proposals" width="68%" />
148
143
  </div>
149
144
 
150
145
  ---
151
146
 
152
- ### 07 · Cross-Session Relay, `📌 定住防改` & 1-Click Deployment (`规划` Bottom)
153
- - **Editable & Pinnable Handoff**: Freeze auto-rendered snapshots cleanly via **`📌 定住防改`** (automatically locking auto-sync overwrites).
154
- - **4 Scoped Archive Policies**: Choose `None`, `Spotlight Only`, `Entire Drawer`, or `Full Session Cabinet`—while Precipitated Vault stays isolated.
155
- - **1-Click Chief Deployment & `idle-guard`**: Clones Chief config safely (forcing Strong Intervention off) to a fresh or target session.
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.
156
150
 
157
151
  <div align="center">
158
- <img src="assets/screenshots/07-session-handoff-and-guard.png" alt="07 - Cross-Session Relay and Pinnable Handoff" width="68%" />
152
+ <img src="assets/screenshots/07-session-handoff-and-guard.png" alt="07 - Cross-Session Handoff and Deployment" width="68%" />
159
153
  </div>
160
154
 
161
155
  ---
162
156
 
163
- ## ⚠️ Usage Notes & Two Critical Disclaimers
157
+ ## Two Things to Know Before Enabling Tools
164
158
 
165
- > [!IMPORTANT]
166
- > Keep these two engineering realities in mind before enabling Wishing Box tools, **`⚡ Strong Intervention`**, or **`✦ 智选压缩`**:
159
+ > [!NOTE]
160
+ > Keep these two constraints in mind when using Wishing Box tools, `⚡ Strong Intervention`, or `✦ 智选压缩`:
167
161
  >
168
- > 1. **Safety Floor From Plugin Guardrails — Intelligence Ceiling From Your Underlying LLM**
169
- > - `dsh-chief` guarantees the engineering floor (0-token vault isolation, 4 permission modes, verified pre-compact harvesting, circuit breakers, and `⏹ 急停`).
170
- > - However, planning rigor, multi-step tool precision, and supervision quality **depend directly on the LLM you assign to DSH Chief**.
171
- > - Use a strong reasoning flagship model for Chief on complex projects rather than expecting frontier orchestration from tiny models.
172
- > 2. **Avoid Flooding the Model's Brain With Heavy External Prompt Injections**
173
- > - Do **not** stack huge System Prompts, hundreds of conflicting project Rules, or always-injected memory plugins alongside `dsh-chief`.
174
- > - **Bloated injections muddy working memory and fracture attention**, frequently clashing with Chief supervision and causing loops or early trips.
175
- > - Keep global prompts lean and store low-frequency context inside `dsh-chief`'s **0-Token Cold Vaults** for on-demand retrieval.
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.
176
166
 
177
167
  ---
178
168
 
179
- ## ⚡ Quick Installation (Zero External Dependencies)
169
+ ## Modular Architecture (`v1.5.0`)
170
+
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.
172
+
173
+ ```mermaid
174
+ 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)"]
180
+ T5["Archives Tab (2400T Cognitive Desktop · Hooked Stack-of-Papers)"]
181
+ T6["Boundaries Tab (Guard Walls · Blocker Removal · 📌 Redlines)"]
182
+ end
183
+
184
+ subgraph Core["Local Backend & Safety Kernel (Zero External Deps · 38 modules)"]
185
+ Hot["Hot Boards: ~/.dsh/chief/board.json & boards/<sid>.json\nCross-process/worker_threads O_EXCL spin locks"]
186
+ Walls["Guard Walls: ~/.dsh/chief/guard-walls.json\nGlobal / Workspace / Paused"]
187
+ Cold["3-Tier Vaults: 2400T Cognitive Desktop + Hooked Drawers + 0-byte Blind Vault"]
188
+ Bus["Runtime & Safety: safety/*.js + Off/Patrol/Managed(5-Cond Sleep) + Audit"]
189
+ end
190
+
191
+ subgraph Agents["Host Execution Agents (tools/pre-execute gate)"]
192
+ Lead["Main Coordinator (@lead)"]
193
+ Subs["Subagents (@arch / @dev / @bench)"]
194
+ Peers["Linked DSH Windows"]
195
+ end
196
+
197
+ UI <-->|"27 Same-Origin Routes (/api/dsh-chief/*, fail-closed 403)"| Core
198
+ Hot -->|"Compact Hot State"| Lead
199
+ Hot -->|"Compact Hot State"| Subs
200
+ Walls -->|"Pre-Execution Block or Ask Prompt"| Lead
201
+ Walls -->|"Pre-Execution Block or Ask Prompt"| Subs
202
+ Cold -.->|"Cognitive Desktop Full Text · Hooked Pull on Demand"| Lead
203
+ Bus <-->|"chief_board / chief_memory\nchief_boundaries / chief_handoff"| Agents
204
+ ```
205
+
206
+ ---
180
207
 
181
- Search **`dsh-chief`** inside [dshmarket](https://github.com/dsh-market/dsh-market) / DSH Plugin Market, or install via CLI (replace `desktop` with `web` for web profile):
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):
182
211
 
183
212
  ```bash
184
- # Option 1: Install the latest v1.3.0 from npm registry (recommended — fastest mirrors + auto-update notices)
213
+ # Option 1: Install latest release (v1.5.0) from npm
185
214
  dsh plugin --profile desktop add dsh-chief
186
215
 
187
- # Option 2: Install archived historical GitHub Release tarball (v1.2.1)
188
- dsh plugin --profile desktop add https://github.com/gluztm/dsh-chief/releases/download/v1.2.1/dsh-chief-1.2.1.tgz
189
-
190
- # Option 3: Install directly from GitHub repository
216
+ # Option 2: Install directly from GitHub main branch
191
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
192
221
  ```
193
222
 
194
- ### Host Version Compatibility Matrix
223
+ ### Host Version Compatibility
195
224
 
196
- | DeepSeek Harness (DSH) Version | Panel / Board / 3-Tier Vaults / Wishing Box | Named Subagent Tree (`task.dispatch` / `team.*`) | Notes |
225
+ | DeepSeek Harness (DSH) Version | Panel / Board / Vaults / Pre-Execute Walls | Named Subagent Tree (`task.dispatch` / `team.*`) | Notes |
197
226
  | :--- | :---: | :---: | :--- |
198
- | **`>= 0.2.2-rc.2` (`rc.3+` recommended)** | ✅ Full support | ✅ Full support | Native `subagents.resolveName` / `rootOf` / `namesOf` |
199
- | `0.2.0 ~ 0.2.2-rc.1` | ✅ Panel works normally | ⚠️ Upgrade banner | Safely guards `team.*` calls with upgrade guidance |
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 |
200
230
 
201
231
  ---
202
232
 
203
- ## 🛠️ Model Tool Suite (4 Tools)
233
+ ## Tools Registered With the Model
204
234
 
205
- | Tool Name | Purpose | Key Actions |
235
+ | Tool Name | Purpose | Common Actions |
206
236
  | :--- | :--- | :--- |
207
- | **`chief_board`** | Task DAG orchestration, step lists, archive search, inter-agent mail, elevation request, smart compaction | `graph.plan`, `task.add`, `task.update`, `plan.set`, `cursor.set`, `mail.send`, `archive.save`, `archive.search`, `bounds.propose`, `permission.request`, `context.compact` |
208
- | **`chief_memory`** | Session-scoped hot digest items (`decisions`, `progress`, `verify`, `risks`) | `list`, `get`, `add`, `update`, `remove` |
209
- | **`chief_boundaries`** | Global thumbtack redlines (`📌`), must-do checks (`allowed`), and notes | `get`, `set`, `add`, `pin`, `remove` |
210
- | **`chief_handoff`** | Generate self-contained cross-session Markdown handoff packets | `preview` / session relay |
237
+ | **`chief_board`** | Task DAG updates, cold archive queries/pulls, peer & chief requests, inquiry replies, wall listing, effort tuning, compaction | `graph.plan`, `task.add`, `task.update`, `plan.set`, `cursor.set`, `mail.send`, `chief.request`, `inquiry.reply`, `wall.list`, `archive.save`, `archive.search`, `archive.pull`, `model.effort`, `bounds.propose`, `permission.request`, `context.compact` |
238
+ | **`chief_memory`** | Session-scoped hot items (`decisions`, `progress`, `verify`, `risks`) | `list`, `get`, `add`, `update`, `remove` |
239
+ | **`chief_boundaries`** | Global `📌` redlines, must-do checks (`allowed`), and notes | `get`, `set`, `add`, `pin`, `remove` |
240
+ | **`chief_handoff`** | Preview and render self-contained Markdown handoff packets | `preview` / session handoff |
241
+
242
+ ---
243
+
244
+ ## Local Storage & Security Guarantees
245
+
246
+ - **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.
248
+ - **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/`.
211
250
 
212
251
  ---
213
252
 
214
- ## 🛡️ Security & Local-Only Privacy
253
+ ## Contributors
215
254
 
216
- - **Atomic Exclusive File Locks**: Prevents corruption on `board.json` and 3-tier archive files even under concurrent writes.
217
- - **Zero-Leak 0-Token Vaults**: Sealed dossiers inject **0 bytes** into lead/chief prompts until explicitly pinned to Desk or flipped out.
218
- - **25 Same-Origin Loopback Routes**: Every `/api/dsh-chief/*` endpoint validates loopback origin and host headers.
219
- - **Regex Secret Blocker**: Blocks accidental persistence of `sk-*`, `ghp_*`, Bearer tokens, and OpenSSH private keys; 100% local under `~/.dsh/chief/` with zero telemetry.
255
+ | Contributor | Role |
256
+ | --- | --- |
257
+ | [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
+ | [Gemini](https://github.com/gemini-code-assist) | Feature development, `pkg/safety/` kernel, Cognitive Desktop, orthogonal runtime modes, fan gauge & CI gates |
261
+ | [Codex](https://github.com/codex) | Modular architecture design, concurrency stress tests, and red-team boundary audits |
262
+ | [deepseek-ai](https://github.com/deepseek-ai) | DeepSeek Harness host runtime and SuperAgent workflow alignment |
220
263
 
221
264
  ---
222
265
 
223
- ## 📄 License
266
+ ## License
224
267
 
225
268
  Licensed under **[GNU Affero General Public License v3.0 (`AGPL-3.0-only`)](LICENSE)**.