# Changelog All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.3.1] - 2026-09-29 ### Added - **支持 DSH 0.2 线(`next` = `0.2.0-rc.1`),与 0.1.7 线并存**:面板已在真实 DSH 0.2.0-rc.1 下实测通过——插件初始化、真实 agent 创建、`agent/created` 发射、 `/plugin-panel/pluginList`(147 行,走 registry/fiber 内省)、`sessionPluginList`、 `browse`、未知端点 404、agent 销毁全部正常。**无需任何代码改动**:`agent/created`、 `SessionStartSource`、`JsonValue`、`defineTool`、`mcp-client` 的 `apply`/`inject` 在 0.2.0-rc.1 均未变(cordis 仍是 `~4.0.4`、schemastery 仍是 `~3.18.4`)。 - `scripts/set-dsh-baseline.mjs` 与 CI 的 `dsh-matrix` job:逐条 DSH 线重钉 devDependencies 后跑 typecheck + 全量测试;脚本同时**断言**目标版本落在声明的 peer 区间内(`0.1.8-rc.1` 是可用的负例)。 ### Changed - **`peerDependencies` 改为联合区间**:`@deepseek-ai/dsh-*` 由 `^0.1.7-rc.2` 改为 `^0.1.7-rc.2 || ^0.2.0-rc.1`。这不是可选的美化——**DSH 0.2 起安装时会按 `peerDependencies` 拒绝不兼容插件**(实测报 `installation rejected: … incompatible with dsh 0.2.0-rc.1`),区间没放宽就装不上。也不能写成一条宽区间:semver 只在比较器 存在同 `major.minor.patch` 三元组的预发布时才接受预发布版本,所以 `>=0.1.7-rc.2 <0.3.0-0` 并不匹配 `0.2.0-rc.1`,每条预发布线必须显式列出。 ## [0.3.0] - 2026-09-29 ### Added - **会话级插件挂载(统一挂载点模型的会话维度)**:已登记的宿主插件可以「挂载到本会话」—— 只把该插件挂进当前会话的 agent 作用域,进程级组合与其它会话都不受影响;会话结束 (agent 生命周期结束)时自动回收,**不写任何组合文件**,子代理不继承。新增面板端点 `sessionPluginList` / `pluginMount` / `pluginUnmount` 与「挂载到本会话 / 从本会话移除」 按钮,插件行上显示该插件的全部会话挂载点;进程级插件视图把会话挂载产生的 fiber 按 fiber 父链归入其所属会话,不再同名多出一行。 ### Fixed - **兼容 DSH 0.1.7-rc.2:resume 自动重放曾静默失效**——`agent/session-start` 在 0.1.7-rc.2 已不复存在(全包无发射点),订阅它的「宿主重启后自动恢复引入集」因此从不触发,且无任何 报错。改为订阅 `agent/created`:payload 仍是 `{ agent, source }`,仍只在 `source==='resume'` 时重放。 - **重放不再吞掉失败,也不再与首个 turn 抢跑**:`agent/created` 是 `@mode serial` 且 「listeners are awaited before creation resolves」,因此改为把重放 promise 交还框架—— 重放先于创建 resolve、也先于排队输入,用户在第一轮就能看到恢复的技能;失败降级为 warn 并 resolve 成 `undefined`,绝不让 agent 创建失败(旧写法 `void replay(...)` 会让循环外的 rejection 静默无人处理)。 - `JsonValue` 不再由 `@deepseek-ai/dsh-session/types` 再导出,改从权威来源 `@deepseek-ai/dsh-util-values` 取得(仅类型使用,新增 devDependency)。 ### Changed - **依赖基线对齐 DSH 0.1.7-rc.2**:`peerDependencies` / `devDependencies` 改为 `dsh-*@^0.1.7-rc.2`、`cordis@^4.0.4`、`schemastery@^3.18.4`。旧区间 `^0.1.0-rc.7` 在 semver 预发布规则下**不匹配** `0.1.7-rc.2`——带预发布的版本只有在区间里存在 同 major.minor.patch 三元组的预发布比较器时才被接受——故原 peer 声明在真实运行的 DSH 上是不可满足的。 注意:**这不是自动跟随的**。`^0.1.7-rc.2` 匹配 `0.1.7-rc.2` / `0.1.7`,但不匹配 `0.1.8-rc.1`,而 CI 与 `prepublishOnly` 都没有「声明的 peer 是否覆盖用户实际运行的 DSH」这一步检查;因此每次 DSH 预发布都需要手工同步 bump peer+dev 区间(发布清单一节 已写明这个仪式)。`pnpm typecheck` 只能在 devDependencies 已经跟到新版之后, 按真实 `.d.ts` 抓出事件名/API 形状的改动。 - **新增热插拔插件默认不再立即启用**:「新增插件」默认只把插件登记进面板状态文件(在「热插拔」段显示为已停用),不改 `cordis.patch.yml`、不触发热重载;点「启用」才热挂载进宿主。对话框新增「添加后立即启用」勾选(默认不勾选),需要旧的一次到位行为时显式勾选。 ## [0.2.3] - 2026-09-05 ### Added - **检查更新**:打开「插件」页即可自动检查,顶部常驻面板自身版本号与「检查更新」入口;有新版本的面板与插件会高亮提示。 - **更新应用**:一键更新到新版本,跨大版本更新前会二次确认;支持「全部更新」批量升级。 - **更新来源提示**:非 npm 官方渠道安装(如 GitHub / 本地路径)的插件只展示版本差异,不做更新。 ## [0.2.2] - 2026-09-02 ### Changed - **README「How it works」重画并重写**:语义统一为「everything-is-plugin」—— skill / MCP / 宿主插件都是 DSH 组合层(cordis composition)的可挂载行, 只是挂载维度不同(skill/MCP 会话级、宿主插件进程级);插件面板是给这个 组合层加的管理视图,本身也是 patch 插件;前端「技能 / 插件」两页签只是 展示区分,不是两套模型。正文改为编号步骤与图一一对应。 - 新增深图 `docs/diagrams/capability-mount.md`(图契约头 + 源码级事实: 引入集全路径 `/.session-skills/.json`、resume 触发回放、 影子覆盖、patch/bundle 挂载),README 链接之;关联既有 plugin-lifecycle / plugin-dataflow 图。 - 「宿主重启后自动恢复」措辞统一限定为 **resume 的会话**(回放仅在 `agent/session-start` 的 `source=resume` 触发):Highlights、截图说明、 How it works 正文同步修正;`.session-skills/` 路径补全 `/` 前缀。 ## [0.2.1] - 2026-08-30 ### Fixed - `dsh-dev` / `dsh-test` 启动前幂等补全 `@deepseek-ai/dsh-web-app` bundle (052e220 重构删掉 708aa20 修复的回归防护):profile 模板组合缺 web-app 时 自动补入,防止面板 initialized 后无 web 层静默挂起(无监听、无报错)。 判断走 JSON 解析(不全文 grep,避免子串误判),在 `dsh-base` 之后插入; `dsh.profile.bundles` 结构异常(缺 bundles 数组或缺 dsh-base)时大声失败 退出,不静默继续。 ### Changed - **面板改名:「技能面板 → 插件面板」**。设置页节名/页面标题/`nav`/`page.title` 改为 「插件面板」(en: Plugin Panel),技能页签按钮独立为「技能」(`tab.skills`)。 面板层标识符全量改名:`SkillPanelService` → `PluginPanelService`(文件 `src/plugin-panel-service.ts`)、HTTP 路由 `/skill-panel` → `/plugin-panel`、 `SkillControlPlugin` → `PluginPanelPlugin`、注册 id `dshp-skill-panel` → `dshp-plugin-panel`、日志文件 `.dshp-skill-panel.log` → `.dshp-plugin-panel.log`、 locale NS / STYLE_ID / bundle 注册名同步。npm 包名 `@super_camel/dsh-skill-panel` → `@super_camel/dsh-plugin-panel`,仓库 `KuramiWan/dshp-skill-panel` → `KuramiWan/dshp-plugin-panel`。**技能层保留原名**:`/skill-*` 命令、`session_skill_*` 工具、技能池、`.session-skills/` 持久化、`SKILL.md` 均不变。 - wrapper 报错文案由「开发根未构建」改为「测试/开发根未构建」,并在 `test/fixtures/INSTALL.md` 说明 `.dsh-dev` 是 dev/test 共用根(不是 「先跑 dev 才能跑 test」的双 profile 结构)。 ## [0.2.0] - 2026-08-28 ### Added - `pluginDemote`(改为冷挂载):热插拔(patch)行可降级回 bundle(冷挂载)——与 `promoteToPatch` 对称;降级时自动恢复包的 `dsh.bundle` 声明(优先从 .bak 还原, 否则探测包内真实 patch 文件;两者皆无则拒绝),标记 `pendingDemote` 待重启生效。 - 面板自动探测所在 profile:dsh boot 时 `ctx.baseUrl` 即 profile 目录(官方机制), PluginManager / SessionMcpManager 从它派生 profileDir——不再需要往 patch 注入 `profileDir`(`config.profileDir` 显式提供时仍优先,向后兼容)。 - 开发环境:`dsh-dev` / `dsh-test` wrapper——DSH_HOME 隔离开发根(`.dsh-dev/`)、 官方 `web` profile(与生产同组合)、凭证/模型配置经 `config.path` 指向生产 (零复制零软链);`dsh-test` 自动补全 fixtures patch。 - 测试 fixtures 并入仓库(`test/fixtures/`:skill-pool ×4、dshp-test-plugin、 test-mcp-stdio 桥接行)。 ### Fixed - M3:patch 里的 mcp 桥接行不再被插件段当 patch 行管理(`readPatchRows` 跳过)。 - M7:mcp 全局形态支持 profile patch——`select`/`removeTemplate` 同时处理 home + profile patch,取消管理后条目不再消失(sidecar 记 `__sourceFile`)。 - M8:停用 fixtures 预置的 patch 行后保留为已停用(可重新启用),不再完全消失。 - M9:`writePatch` 重建时保留 mcp 桥接行——停用插件不再连带删除同 patch 的 mcp 行。 ## [0.1.4] - 2026-08-25 ### Added - Structured logging: `ctx.logger` backend with console / JSON Lines file (`/.dshp-plugin-panel.log`) / in-memory buffer exporters (ADR-0009); replaces bare `console.warn/error`. - Standalone read-only debugger `scripts/debug-dump.ts` (`pnpm debug`): pool scan, session introduce-set, config resolution, consistency self-check, and recent error/warn log clues (ADR-0010). - `POST /plugin-panel/sessions`: enumerate live sessions (`{sessionId, status, root}`) so a debugger/caller can discover live session ids instead of guessing (ADR-0010 live-session gap). ### Changed - CI (`ci.yml`) now runs the full type-check (host + client), tests, build, and a `pack-check` preflight; release adds a `verify` gate before publish. - `prepublishOnly` runs the full type-check (including client). - Rewrote README (EN + zh): feature-domain structure (Skills / Plugins & MCP), added the `session_mcp_*` tools, corrected the global-layer management story, and linked a new observability SOP for agents. ### Fixed - `recentLogs` severity filter inverted: `minLevel='warn'` now returns error+warn, not error+info+warn. - `writePatch` no longer silently drops pre-existing patch rows whose id is not a string. - Multiple fibers with empty names no longer collapse into a single `(unnamed)` row and hide real plugins. - Disabling a plugin mounted in both patch and bundle now also removes the bundle (and marks restart required). - MCP `deriveServerName` keeps the full agent hash (long whitelist names no longer collide across agents). - MCP `restoreGlobalMcp` scans all insert blocks before restoring, avoiding duplicate rows. - MCP `disableGlobalMcp` preserves all same-named rows in the sidecar and restores them all (legacy single-row format still read). - MCP `connect` returns `{ok:false}` instead of throwing when `agent.ctx.plugin()` throws synchronously, and no longer leaks `ownedServerNames`. - MCP `select` surfaces rollback failures in the returned reason and logs them, instead of discarding them. - MCP `usedCount` is now decremented on session end (via `agent.ctx.effect`), so `removeTemplate` is released once a session is gone. ## [0.1.3] - 2026-08-24 ### Added - MCP is now managed as a plugin: enable = connect to the current session, disable = disconnect. "加入管理/取消管理" (manage/unmanage) replaces "新增 MCP/删除". - Bundle→patch promote: convert a bundle plugin to a hot-pluggable patch plugin, with an in-place `dsh.bundle` rewrite so DSH stops re-adding it to `dsh.profile.bundles`. - Bundle plugins are now manageable (cold-mount enable/disable via `dsh.profile.bundles`). - MCP select/deselect symmetry: selecting an MCP disables its global instance and moves it to session-level; deselecting restores the global instance. ### Changed - The plugin tab now has its own subtitle (four groups: built-in / patch / bundle / MCP) instead of reusing the skill tab's. - README and package description updated to cover plugin management. ### Fixed - Deduplicated built-in plugins (the same plugin class mounted in multiple contexts appeared many times). - Fixed skill-tab group collapse state leaking across scopes (same-named groups in different scopes toggled together). ## [0.1.2] - 2026-08-24 ### Fixed - Ship `cordis.patch.yml` in the npm package (it was missing from `files`, so DSH boot failed with ENOENT when reading `dsh.bundle.patch`). - Harden the plugin against blocking DSH startup: derive the client bundle registration id from `package.json` name, and wrap the host apply in try/catch so an init failure degrades instead of throwing. ## [0.1.1] - 2026-08-23 ### Added - Plugin management tab (ADR-0008): list host composition plugins, enable/disable user plugins via hot-mount, install new plugins, with MCP management folded in. - CI/CD pipeline: pnpm-based CI (type-check + build) and a tag-triggered release workflow (npm publish with provenance + GitHub Release). ### Changed - Excluded DSH core plugins from the management list (shown as a read-only summary). - Rewrote panel copy to user-facing language and polished the plugin/MCP/skill tab layout. ### Fixed - MCP rows now show their server name and transport instead of the identical bridge package name. - The panel now recognizes its own plugin row (was showing itself as "stopped"). - MCP check counts the global instance's tools and warns when none are found. ## [0.1.0] - 2026-08-18 ### Added - First public release of the session-scoped skill control plugin. ### Changed - Panel host service migrated from typert Remote RPC to a DSH `webServer` HTTP route (`POST /plugin-panel/`, relative-path `fetch`), and the client dropped the RPC value unwrap. This decouples the package from the DSH monorepo so it can be built and published standalone. - `peerDependencies` / `devDependencies` pinned to real npm versions (`cordis@^4.0.1`, `schemastery@^3.18.1`, `dsh-*@^0.1.0-rc.7`). - Added self-contained type-check configs (`tsconfig.host.json`, `tsconfig.client.json`) and a standalone bundle script (`build-client.mjs`), plus the `dsh.bundle` patch (`cordis.patch.yml`). - Added project governance: `LICENSE` (MIT, © 2026 super_camel), `CONTRIBUTING.md`, CI (lightweight type-check), Keep-a-Changelog file. [Unreleased]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.3.1...HEAD [0.3.1]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.3.0...v0.3.1 [0.3.0]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.2.3...v0.3.0 [0.2.3]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.2.2...v0.2.3 [0.2.2]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.1.4...v0.2.0 [0.1.4]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.1.3...v0.1.4 [0.1.3]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/kuramiwan/dshp-plugin-panel/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/kuramiwan/dshp-plugin-panel/releases/tag/v0.1.0