dsh-sidebar-entry-manager 0.0.0-stage → 0.2.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ # 更新记录
2
+
3
+ ## 0.2.1 — 2026-11-24
4
+
5
+ - **新增:把侧栏末尾的「更多」按钮也纳入管理**。宿主这个按钮不是 `sidebar.panellist` 注册项(它是面板列表里的 `aria-haspopup=menu` 按钮),以前全部关闭后它仍留在侧栏;现在设置页多出一行「更多」菜单(宿主自带),关掉即可隐藏。
6
+ - 说明:隐藏「更多」会同时收起宿主放在里面的入口(如插件市场的「浏览插件 / 创建插件」);需要时再打开即可。
7
+ - 条目计数改为「共 N 项,当前隐藏 M 项」,把「更多」也算进去。
8
+
9
+ ## 0.2.0 — 2026-11-12
10
+
11
+ - **新增:插件内更新面板**。设置页底部显示当前版本,进入页面时静默检查一次;「检查更新」走插件市场公开更新 API(`/dsh-market/api/v1/*`),没有市场时回退 npm registry。
12
+ - **新增:一键更新**。市场负责安装、版本校验与回滚点;按返回的 `refreshRequired` / `restartRequired` 提示刷新页面或重启 App。
13
+ - **新增:自动更新开关**(默认关闭)。打开后启动时发现新版本自动安装;有会话在跑时市场会拒绝,插件只提示、不强行更新。
14
+ - **改进:复选框改为开关**。条目行与自动更新行统一为 `role="switch"` 的拨动开关,键盘可操作,深色主题下对比清晰。
15
+ - 状态文件升级为 v2:`{ hidden, autoUpdate }`,旧版 `{ hidden }` 自动兼容。
16
+
17
+ ## 0.1.0 — 2026-11-12
18
+
19
+ - 首个版本:设置 → 侧边栏入口,逐项隐藏/显示左侧导航栏的插件入口。
20
+ - 只改导航行绘制(`display:none`),插件继续运行。
21
+ - Host 状态文件 `~/.dsh/sidebar-entry-manager.json`,跨端口、重启、浏览器保持。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 weiaisuyan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,68 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # dsh-sidebar-entry-manager
2
+
3
+ A visibility switch for the plugin entries in the DeepSeek Harness left sidebar.
4
+
5
+ The DSH sidebar shell only draws whatever is registered in `sidebar.panellist`; it ships **no** per-entry visibility control, and the official "More" menu deliberately offers no pin/hide action. Today the only way to lose a row is to disable the whole plugin — losing the feature with it.
6
+
7
+ This plugin adds the missing step: **hide the row, keep the plugin running**.
8
+
9
+ ## After install
10
+
11
+ **Gear at the bottom of the sidebar → Settings → Sidebar entries**
12
+
13
+ The page lists whatever is actually registered right now (install another plugin and its row shows up without a release), one **switch** per entry:
14
+
15
+ - off → the row stops being drawn in the left navigation (including the collapsed icon rail);
16
+ - on → it comes straight back;
17
+ - "Show everything again" resets the list.
18
+
19
+ The choice lives on the Host (`~/.dsh/sidebar-entry-manager.json`), so it survives a port change, a restart, and a different browser.
20
+
21
+ ## Plugin updates (v0.2.0)
22
+
23
+ The same section ends with a **Plugin update** block:
24
+
25
+ - current version, a silent check when the page opens, and a manual "Check for updates";
26
+ - when a newer version exists, "Update now" goes through the plugin market's public update API (`/dsh-market/api/v1/*`) — the market installs, verifies the version and keeps a rollback point;
27
+ - an **Auto-update** switch (off by default): when on, a newer version is installed automatically on open; if conversations are running the market refuses and the plugin simply reports it instead of forcing the update;
28
+ - completion follows the market's `refreshRequired` / `restartRequired` outcome ("refresh the page" or "restart the app").
29
+
30
+ ## What it actually changes
31
+
32
+ Only the **row's rendering**: the row gets `display:none` while React keeps owning the node. The plugin, its page, its shortcuts and its services are untouched.
33
+
34
+ This is not a replacement for disabling a plugin — do that on the Plugins page when you want the resources back. This is for "keep it, just get it out of my sidebar".
35
+
36
+ ## One warning
37
+
38
+ The `plugins` entry (the plugin manager) can be hidden too, but then the sidebar has no plugin manager entry left. Settings is unaffected, so recovery is always one click away.
39
+
40
+ ## Known limits
41
+
42
+ - Governs the root-scope global panel rows (`sidebar.panellist`) only. The right side card's tab visibility is `dsh-better-sidebar`'s own "Side card" settings section; the two never fight.
43
+ - The shell's trailing "More" button is not a registration, but it appears as its own row ("“More” menu (host)") and can be hidden; hiding it also removes the plugin-market entry points inside it until you turn it back on.
44
+ - Rows are drawn by the shell with no id attribute, so this plugin maps DOM rows back to declared ids by index, cross-checked against `aria-label`. If two plugins register the same label *and* the order moves, a row can be mismatched — toggle it off and on again to resettle.
45
+ - The `plugins` entry is `plugins`; `dshmarket`'s market row is `dsh-market`. Independent.
46
+ - Auto-update depends on the plugin market's public update API; without the market only a manual-update hint is shown.
47
+
48
+ ## Install
49
+
50
+ ```powershell
51
+ dsh plugin --profile desktop add "<absolute path>\dsh-sidebar-entry-manager-0.2.1.tgz"
52
+ ```
53
+
54
+ Or paste the package name into **Plugins → Add plugin** once it is on npm.
55
+
56
+ ## Development
57
+
58
+ ```powershell
59
+ node scripts/build.mjs # src/ → lib/ (browser half wrapped in the __ModuleLoader__ envelope, version injected)
60
+ node --test # 25 cases, zero dependencies
61
+ ```
62
+
63
+ - `src/host.js` → `lib/index.js`: the state file (`hidden` + `autoUpdate`) plus one fenced `/api/dsh-sidebar-entry-manager/state` route (GET reads, POST writes).
64
+ - `src/client.js` → `lib/client.js`: DOM visibility, the `settings.section` page, and the update panel.
65
+
66
+ ## License
67
+
68
+ MIT
package/README.zh.md ADDED
@@ -0,0 +1,69 @@
1
+ # dsh-sidebar-entry-manager
2
+
3
+ 给 DSH 左侧导航栏的插件入口加一个开关。
4
+
5
+ DSH 的侧栏外壳只负责把 `sidebar.panellist` 里的注册项画成一行行,自带**没有**「单条入口隐藏」的设置,官方「更多」菜单也明确不放 Pin / 显隐操作。想少一行,通常只能把整个插件停用——功能也跟着没了。
6
+
7
+ 这个插件补上那一步:**只隐藏那一行,插件照常运行**。
8
+
9
+ ## 装好之后
10
+
11
+ **左侧栏底部齿轮 → 设置 → 侧边栏入口**
12
+
13
+ 页面按当前真实注册情况列出所有侧栏入口(装了什么插件就显示什么,不写死),每行一个**开关**:
14
+
15
+ - 关掉 → 左侧导航里那一行不再画出来(收起成图标轨道时同样不显示);
16
+ - 打开 → 立刻回来;
17
+ - 「全部恢复显示」一键还原。
18
+
19
+ 选择保存在 Host 上(`~/.dsh/sidebar-entry-manager.json`),换端口、重启 DSH、换浏览器都还在。
20
+
21
+ ## 插件更新(v0.2.0)
22
+
23
+ 同一个设置页底部有「插件更新」:
24
+
25
+ - 显示当前版本,进页面时**静默检查**一次,也可手动点「检查更新」;
26
+ - 有新版本 → 「立即更新」走插件市场的公开更新 API(`/dsh-market/api/v1/*`):市场负责装包、校验版本、保留回滚点;
27
+ - **自动更新**开关(默认关):打开后,启动时发现新版本会自动安装;有会话在跑时市场会拒绝,插件不会强行更新,只提示稍后再试;
28
+ - 更新完成按市场返回的 `refreshRequired` / `restartRequired` 提示「刷新页面」或「重启 App」。
29
+
30
+ ## 它到底改了什么
31
+
32
+ 只改**导航行的绘制**:给那一行加 `display:none`,React 仍然持有该节点,插件、它的页面、它的快捷键、它注册的服务全都不受影响。
33
+
34
+ 这不是「禁用插件」的替代品——要省资源请去插件页停用;要的是「东西还在,只是别占我侧栏」。
35
+
36
+ ## 一个提醒
37
+
38
+ `plugins`(插件管理入口)也可以隐藏,但隐藏后侧栏里就没有插件管理的入口了。设置页本身不受影响,所以永远能从这里恢复。
39
+
40
+ ## 已知边界
41
+
42
+ - 只管理根作用域的全局面板入口(`sidebar.panellist`)。右侧「侧边卡片」的标签页显隐是 `dsh-better-sidebar` 自己的「侧边卡片」设置页,两边互不覆盖。
43
+ - 侧栏末尾的「更多」按钮不是注册项,但它也会作为一行「「更多」菜单(宿主自带)」出现在设置里,可以单独隐藏;隐藏后插件市场的入口(浏览插件 / 创建插件)也一起收起,需要时再打开。
44
+ - 入口行是外壳画的,没有 id 属性,所以本插件按「声明顺序 + aria-label 校准」把 DOM 行对回注册 id。若某个插件给两行起了同一个名字且顺序也变了,可能认错——此时关掉再打开一次即可复位。
45
+ - 「插件」这一条的 id 是 `plugins`,`dshmarket` 的市场行是 `dsh-market`,两者互不相干。
46
+ - 自动更新依赖插件市场(dshmarket)的公开更新 API;没有市场时只能提示手动更新。
47
+
48
+ ## 安装
49
+
50
+ ```powershell
51
+ # 本地 tarball
52
+ dsh plugin --profile desktop add "<绝对路径>\dsh-sidebar-entry-manager-0.2.1.tgz"
53
+ ```
54
+
55
+ 也可以在 **插件 → 添加插件** 里填包名(发布到 npm 之后)。
56
+
57
+ ## 开发
58
+
59
+ ```powershell
60
+ node scripts/build.mjs # src/ → lib/(浏览器半侧包一层 __ModuleLoader__ 信封,并注入版本号)
61
+ node --test # 25 个用例,零依赖
62
+ ```
63
+
64
+ - `src/host.js` → `lib/index.js`:状态文件(`hidden` + `autoUpdate`)+ 一条受信任围栏保护的 `/api/dsh-sidebar-entry-manager/state` 路由(GET 读 / POST 写)。
65
+ - `src/client.js` → `lib/client.js`:DOM 显隐 + 设置页分区(`settings.section`)+ 更新面板。
66
+
67
+ ## 许可
68
+
69
+ MIT
@@ -0,0 +1,4 @@
1
+ # Insert the entry manager into the DSH web profile roster.
2
+ - insert:
3
+ - id: ui-sidebar-entry-manager
4
+ name: 'dsh-sidebar-entry-manager'