Repository navigation
子代理支路在新宿主上改由插件自己持有(0.1.6-alpha.2 起);运行中的步骤与支路每秒生长;上下文窗口优先用宿主真值;并修掉 2.3.0 冒烟与评审查出的几处小问题。另外补上了桌面版装不上的两个包侧问题:GitHub 安装不再装出空壳,peer 范围放开到 0.2.x。
- 子代理支路(吴昊 2026-10-01 拍板):宿主
0.1.6-alpha.2起子会话只在被持有时可读,2.3.0 只能跟着右侧栏画。本版在有sessions.retain的宿主上由插件用自己的来源名maze持有子会话——成员来自父会话的子代理目录投影subagentCatalog,不再看右侧栏;迷宫打开之前就结束的子代理也画完整支路。规则:运行中的子代理一直持有到结束;已结束的读一次就释放,结果按子会话缓存,页签切回不重拉——结算要等它的最后一轮在对话里关闭(宿主先翻运行标记、事件随后才到,只看标记会缓存成残缺版),最多等 3 秒;同时最多展开 8 个,超出的在泳道信息行注明「另有 N 个子代理未展开」;页签切走或切会话时全部释放。持有不会切换当前会话(宿主判定当前会话只看它自己的mainView计数)。宿主在持有/释放时会同步通知会话列表,花名册先占名额再向宿主持有、嵌套通知延后处理,不会重入。宿主拒绝打开的子会话(持有抛错、打开失败、目录条目没有模式)让出名额,目录变化前不重试(不在运行时被拒的,翻回运行后再试一次)。超过宿主一页(500 条消息)的子会话只画首页。子代理流式输出的对话切面按 250 毫秒合并一次发布。没有retain的老宿主(0.1.5/0.1.2)保持 2.3.0 的被动跟随:只画宿主已打开过的子会话。孙代理不画。 - 支路名字:改用子代理目录里的名字(派出时的任务简述,宿主下拉菜单显示的那个),不再用会话标题——
0.1.5上没有标题的子会话原来会显示成工作区目录名。 - 运行中实时生长:实时页签加一秒时钟,只在父会话或某个子代理运行中、且页签可见时走;运行中的子代理支路终点取「现在」(宿主自己的子代理菜单也这么算),不再停在上一个持久事件(2.3.0 实测卡在 0.7 秒、结束才一下跳到全长)。页面侧:结构没变、只是时钟走了一秒时,不整页重画——按原始时间的增量延长运行中的节点,只重画迷宫 SVG(与缩放同一条路径),图例、头部指标条、分析区都不动;时间轴预留余量(30 秒或 8% 取大),余量用完就扩大时间轴再留一段,仍走同一条只重画迷宫的路径;头部的总时长跟着刷新;运行中子代理里某个工具跑完(判定变色)算结构变化,照常整图重画。
- 上下文窗口:实时页签改读宿主 token-meter 的
contextPressure.contextWindow(宿主上下文指示器同一来源,0.1.0-rc.8起字段不变)作为泳道窗口和当前模型请求的窗口;宿主不留逐请求历史,中途换掉的旧模型仍按模型表;没装 token-meter 时退回查表。 - 头部指标条:「N 次调用」只算父会话自己的,子代理支路里的调用另注「子代理另有 M 次」,与工具轨道的总数对得上(2.3.0 冒烟:头部写 1 次、轨道写共 2 次)。
- 小修(2.3.0 冒烟与评审查出,均为旧问题):结果与证据——同一轮里失败步与回答落在同一个 0.1 秒刻度时按步序裁决,不再误判「没有最终回答」;上传页第一次上传就解析失败不再多抛一条控制台报错;选中行为信号时顺带打开的详情面板按一次 Esc 同时关面板、撤选中;侧边栏入口改用宿主侧边栏同一套颜色变量,深色主题下对比度从 2.2:1 恢复到与宿主条目一致;实时迷宫的子代理花名册改在 effect 里创建、卸载时释放,被丢弃的渲染不再留下不释放的实例。
- 构建基座与测试:devDependencies 换到 npm 的
0.2.0-rc.2包组(宿主latest),产物依赖不变;类型检查另在0.1.2-rc.1、0.1.5-rc.3两套包上跑过,均为零错误。新增 22 个单元测试(持有式花名册:宿主在 retain 内同步通知列表时不重入不泄漏、dispose 早于 ready、末轮未关闭时的结算与宽限、重跑后宽限重新计时、上限、打开失败与 ready 异常让出名额、持有抛错不重试但翻回运行后再试一次、无模式不持有、可续聊子代理重跑时沿用缓存、首次订阅同步回调后监听器仍被摘掉、流式切面合并发布、不变不通知、目录命名;未展开计数、时钟生长、宿主窗口、同刻度裁决),136 → 158,全部通过。 - 包侧:桌面版装不上的两个原因(2026-10-05):
- GitHub 安装装出空壳(真正的原因):DSH 插件管理器安装 git 依赖时按
package.json的files白名单打包,而lib/一直被.gitignore忽略、又从没进过仓库,于是装出来的包里只有 README、LICENSE、package.json、cordis.patch.yml,入口lib/index.js根本不存在,插件加载必然失败(侧边栏入口消失、设置里也看不到)。现在lib/纳入版本控制,两条安装路径(npm /github:lamost423/dsh-maze)都能拿到构建产物;改源码后必须pnpm build一起提交。 - peer 范围放不到
0.2.x正式版:宿主运行时会把插件peerDependencies里的@deepseek-ai/dsh*逐条对宿主版本做区间校验,不满足就把这一行禁用掉。旧范围<0.2.0靠 semver 的「预发布版低于正式版」规则侥幸放过了0.2.0-rc.2,但对0.2.0正式版和0.2.1-alpha.1都是 false——桌面版的 nightly 通道一旦升到正式版,插件会被静默禁用。范围改为>=0.1.2-alpha.1 <0.3.0。 - 桌面版 profile 的实机验证:
0.2.0-rc.2桌面版(~/.dsh/profiles/desktop)里装上本版后,客户端插件dsh-maze正常注册、侧边栏入口与实时迷宫恢复。
- GitHub 安装装出空壳(真正的原因):DSH 插件管理器安装 git 依赖时按
EN: Subagent branches on new hosts are now held by the plugin itself (from 0.1.6-alpha.2): with sessions.retain present the maze holds each child under its own reference source maze — membership comes from the parent's subagentCatalog projection instead of the right sidebar, children that finished before the maze opened are drawn in full, running children stay held until they settle, settled ones are read once, released and cached, at most 8 are expanded at once (the rest are noted on the lane), everything is released when the tab or Session changes, and holding never changes the selected Session. A settled child is cached only once its last turn is closed in the conversation (the host flips the running flag before the last events arrive; a 3 s grace bounds the wait). The host notifies the session list synchronously inside retain/release, so the roster claims a slot before calling the host and defers nested notifications. Children the host refuses (retain throws, open fails, no mode) free their slot and are not retried until the catalog changes; children longer than the host's first page (500 messages) draw that page only; streaming child cuts are coalesced to one publish per 250 ms. Hosts without retain (0.1.5 / 0.1.2) keep 2.3.0's passive behaviour. Branch names now use the catalog label (the task description given at spawn time). A one-second clock runs only while the parent or a child is running and the tab is visible: a running branch ends at "now" instead of its last durable event, and on the page a tick that changes nothing structural only extends the running nodes and rebuilds the maze SVG (the zoom path) — legend, header strip and analysis stay put, with axis headroom (30 s or 8%); when it runs out the axis grows (with new headroom) on the same maze-only path, the header strip's total duration follows, and a tool settling inside a running child counts as structural and redraws normally. The live tab reads the host's contextPressure.contextWindow (the same source as the host's context indicator) as the lane window and the window of the current model's requests; models switched away from keep the table. The header strip counts the parent's own calls and notes calls made inside subagents separately, matching the tool track. Small fixes found by the 2.3.0 smoke and review: tie-break by step order when a failed step and the answer share a 0.1 s tick; no stray console error when the first upload fails to parse; one Esc clears a signal-opened detail panel together with the selection; the sidebar entry uses the host sidebar's own color tokens (dark-theme contrast back to the host's level); the subagent roster is built in an effect and disposed on unmount. Build base moves to the npm 0.2.0-rc.2 set. 22 new unit tests, 136 → 158, all green. Packaging fixes for the desktop app (2026-10-05): lib/ is now tracked in git, because DSH's plugin manager packages a git dependency through package.json's files whitelist — with the build output gitignored, dsh plugin add github:lamost423/dsh-maze installed a shell with no lib/index.js and the plugin could not load at all (this was the real cause of "won't install on the desktop app"); the @deepseek-ai/dsh* peer ranges move from <0.2.0 to <0.3.0, since DSH's runtime denies any profile row whose plugin peers do not satisfy the running host version — the old range only passed 0.2.0-rc.2 by the prerelease rule and would have silently disabled the plugin on 0.2.0 / 0.2.1-alpha.1. Verified in the 0.2.0-rc.2 desktop profile: the dsh-maze client plugin registers, the sidebar entry and the Live Maze are back.