dsh-plugin-runcat-inventory 0.3.7
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.en.md +223 -0
- package/CHANGELOG.md +193 -0
- package/LICENSE +21 -0
- package/README.en.md +120 -0
- package/README.md +120 -0
- package/assets/preview-en.png +0 -0
- package/assets/preview-zh.png +0 -0
- package/cordis.patch.yml +5 -0
- package/lib/client.js +602 -0
- package/lib/index.js +329 -0
- package/package.json +58 -0
package/CHANGELOG.en.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[中文](CHANGELOG.md) | **English**
|
|
4
|
+
|
|
5
|
+
This file records the version history of `dsh-plugin-runcat-inventory` (Runcat Plugin Overview / 逃咪-插件总览).
|
|
6
|
+
|
|
7
|
+
## [0.3.7] - 2026-08-27
|
|
8
|
+
|
|
9
|
+
### Docs
|
|
10
|
+
|
|
11
|
+
- **Added preview screenshots**: `assets/preview-zh.png` (Chinese UI) and
|
|
12
|
+
`assets/preview-en.png` (English UI); the Chinese README gained a
|
|
13
|
+
"效果预览" section showing the Chinese screenshot, and the English README
|
|
14
|
+
gained a "Screenshot" section showing the English one.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## [0.3.6] - 2026-08-27
|
|
19
|
+
|
|
20
|
+
### Docs
|
|
21
|
+
|
|
22
|
+
- **Added `CHANGELOG.en.md`** (this file): full English translation of the
|
|
23
|
+
changelog; both changelogs link to each other via the language switcher at
|
|
24
|
+
the top (`中文 | English`).
|
|
25
|
+
- The English README now links to the English changelog.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [0.3.5] - 2026-08-27
|
|
30
|
+
|
|
31
|
+
### Docs
|
|
32
|
+
|
|
33
|
+
- **Installation gained "Method B: install directly from the GitHub source"**:
|
|
34
|
+
`dsh plugin --profile web add github:runcat-tommy/dsh-plugin-runcat-inventory`
|
|
35
|
+
(listed alongside Method A — local clone; both note their differences:
|
|
36
|
+
`link:` for local development / direct fetch).
|
|
37
|
+
- **Added `README.en.md`**: a complete English documentation
|
|
38
|
+
(features / structure / prerequisites / installation A & B / how it works /
|
|
39
|
+
uninstall / limitations / changelog summary); both READMEs link to each
|
|
40
|
+
other via the language switcher (`中文 | English`).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## [0.3.4] - 2026-08-27
|
|
45
|
+
|
|
46
|
+
### Docs
|
|
47
|
+
|
|
48
|
+
- **Folder name unified**: the directory name in the usage instructions was
|
|
49
|
+
changed from `runcat-inventory` to `dsh-plugin-runcat-inventory` (matching
|
|
50
|
+
the local folder name after cloning
|
|
51
|
+
`https://github.com/runcat-tommy/dsh-plugin-runcat-inventory`); the
|
|
52
|
+
structure tree and install steps were updated accordingly.
|
|
53
|
+
- **Added a "Prerequisites" section**: clarifies Node.js (DSH is a Node
|
|
54
|
+
program, required), pnpm (`dsh plugin` forwards to pnpm, required), Git
|
|
55
|
+
(needed for cloning or GitHub-source installs), and network (GitHub access,
|
|
56
|
+
configure a proxy if needed); also notes that the plugin itself has zero
|
|
57
|
+
dependencies.
|
|
58
|
+
- Clarified the loader entry in the verification paragraph: id is
|
|
59
|
+
`runcat-inventory`, name is `dsh-plugin-runcat-inventory`, to avoid
|
|
60
|
+
confusion with the folder name.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## [0.3.3] - 2026-08-27
|
|
65
|
+
|
|
66
|
+
### Changes
|
|
67
|
+
|
|
68
|
+
- **The plugin's own description now follows the UI language**: the zh/en
|
|
69
|
+
dictionaries gained a `selfDescription` key (one per language); in the
|
|
70
|
+
"Details" expanded row, this plugin's Description is shown in the current
|
|
71
|
+
language. Other plugins still show their package.json `description` verbatim
|
|
72
|
+
(a single language chosen by the author; no generic translation possible).
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## [0.3.2] - 2026-08-27
|
|
77
|
+
|
|
78
|
+
### Fixes
|
|
79
|
+
|
|
80
|
+
- **Only this plugin shows the repo URL in the Source column**: the previous
|
|
81
|
+
version wrongly showed the repo URL for every plugin carrying a
|
|
82
|
+
`repository` field; corrected — only `dsh-plugin-runcat-inventory` shows
|
|
83
|
+
`https://github.com/runcat-tommy/dsh-plugin-runcat-inventory`, the rest
|
|
84
|
+
fall back to their install method (link/file/github/npm/builtin).
|
|
85
|
+
- **Source-column overflow fix**: long URLs could spill into the adjacent
|
|
86
|
+
"Actions" column — the Source content now forces line breaking with
|
|
87
|
+
`word-break: break-all` + `overflow-wrap: anywhere`, so content always
|
|
88
|
+
wraps inside the 21% column.
|
|
89
|
+
|
|
90
|
+
### Tests
|
|
91
|
+
|
|
92
|
+
- mock tests updated: `hello` restored to its `link` source assertion; a new
|
|
93
|
+
entry for this plugin added (`sourceKind='repo'` + URL-cleanup assertion).
|
|
94
|
+
All 5 cases pass.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## [0.3.1] - 2026-08-27
|
|
99
|
+
|
|
100
|
+
### Changes
|
|
101
|
+
|
|
102
|
+
- **Fixed column ratios** (`table-layout: fixed` + `<colgroup>`):
|
|
103
|
+
Name 36% / Status 15% / Source 21% / Actions 28% (name is the most
|
|
104
|
+
important and takes the largest share); the Status and Actions columns have
|
|
105
|
+
minimum widths to protect badges and buttons from being squeezed.
|
|
106
|
+
- **Source column prefers the repo URL**: the host reads the `repository`
|
|
107
|
+
field of each package's `package.json` (cleaning the `git+` prefix and
|
|
108
|
+
`.git` suffix), showing the repo URL when present; otherwise falls back to
|
|
109
|
+
the install method (link/file/github/npm/builtin).
|
|
110
|
+
- This plugin's `package.json` gained a `repository` field →
|
|
111
|
+
`https://github.com/runcat-tommy/dsh-plugin-runcat-inventory`.
|
|
112
|
+
|
|
113
|
+
### Tests
|
|
114
|
+
|
|
115
|
+
- mock tests updated: the fake `dsh-plugin-hello` package gained a
|
|
116
|
+
`repository`; assertions for `sourceKind='repo'` and URL cleaning added;
|
|
117
|
+
other cases unchanged. All 5 cases pass.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## [0.3.0] - 2026-08-27
|
|
122
|
+
|
|
123
|
+
### Internationalization (UI language follows the DSH environment)
|
|
124
|
+
|
|
125
|
+
- **Bilingual dictionaries**: registered Simplified Chinese / English
|
|
126
|
+
dictionaries through DSH's built-in locale service
|
|
127
|
+
(`@deepseek-ai/dsh-client-locale`); the UI follows the DSH environment
|
|
128
|
+
(Settings → General → Language or the browser language) without restart.
|
|
129
|
+
- **Tab name**: 逃咪-插件总览 in Chinese, **Runcat Plugin Overview** in
|
|
130
|
+
English (the label became a locale function, re-rendered on language
|
|
131
|
+
switch).
|
|
132
|
+
- **All UI copy goes through dictionaries**: 40+ items — search / filters /
|
|
133
|
+
sorting / buttons / badges / hints / empty states — all `t('key')`-based.
|
|
134
|
+
- **Full host i18n**:
|
|
135
|
+
- Error messages became **error codes** (`MISSING_PARAMS`,
|
|
136
|
+
`PATCH_READ_FAILED`, `PATCH_PARSE_FAILED`, `PATCH_WRITE_FAILED`, and 9
|
|
137
|
+
more — 13 in total), translated client-side from dictionaries;
|
|
138
|
+
- The source field became `sourceKind`
|
|
139
|
+
(link/file/github/npm/builtin/other) + `sourceSpec` (raw spec); display
|
|
140
|
+
copy is translated client-side.
|
|
141
|
+
- Terminal logs (host logger) and README/CHANGELOG docs stay Chinese
|
|
142
|
+
(operational convention).
|
|
143
|
+
|
|
144
|
+
### Tests
|
|
145
|
+
|
|
146
|
+
- mock unit tests updated in sync: source assertions now use
|
|
147
|
+
`sourceKind`/`sourceSpec`, error assertions use error codes; the 403 test
|
|
148
|
+
asserts code `FORBIDDEN`. All 5 cases pass.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## [0.2.1] - 2026-08-27
|
|
153
|
+
|
|
154
|
+
### Changes
|
|
155
|
+
|
|
156
|
+
- The plugin's Chinese name changed from "**逃猫**-插件总览" to
|
|
157
|
+
"**逃咪**-插件总览" (tab label, package.json description and keywords,
|
|
158
|
+
README/CHANGELOG and code comments updated together).
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## [0.2.0] - 2026-08-27
|
|
163
|
+
|
|
164
|
+
### UI redesign (a slimmer table)
|
|
165
|
+
|
|
166
|
+
- **Fixed 4-column table**: `Name (incl. id + version) / Status / Source /
|
|
167
|
+
Actions`; the "Description" column was removed — the full description moved
|
|
168
|
+
into the "Details" expanded row; the list got noticeably narrower and
|
|
169
|
+
generally needs no horizontal scrolling at normal widths.
|
|
170
|
+
- **Sticky columns removed**: the Name and Actions columns are no longer
|
|
171
|
+
fixed; at extremely narrow widths they scroll with the content.
|
|
172
|
+
- **"Details" button rule**: shown when there is a description (non-empty)
|
|
173
|
+
or a config (non-empty); hidden when both are empty. Empty objects `{}` /
|
|
174
|
+
empty arrays `[]` count as no content.
|
|
175
|
+
- **Details expanded row**: colSpan adjusted (5→4); still shows the full
|
|
176
|
+
description + config JSON + a "Copy config" button.
|
|
177
|
+
|
|
178
|
+
### Interaction improvements
|
|
179
|
+
|
|
180
|
+
- **Search**: confirmed a single combined search (name + id + description +
|
|
181
|
+
source + version); no field selector. The id is displayed under the name
|
|
182
|
+
column, so searching by id locates entries directly.
|
|
183
|
+
- **Description**: kept the full-text hover tooltip (native title); removed
|
|
184
|
+
click-to-expand on the description itself (that entry point is now the
|
|
185
|
+
unified "Details" button).
|
|
186
|
+
- **Sorting**: added name sorting — `Config order` (default) / `Name ↑` /
|
|
187
|
+
`Name ↓` (Chinese localeCompare).
|
|
188
|
+
- **Keyboard scrolling**: after focusing the table container, ←/→ scroll
|
|
189
|
+
horizontally; Home/End jump to the start/end.
|
|
190
|
+
- **Narrow screens**: the Source column hides automatically below 900px.
|
|
191
|
+
|
|
192
|
+
### Technical fixes
|
|
193
|
+
|
|
194
|
+
- Fixed the `node:fs` callback-style `readFile` being passed `'utf8'` as the
|
|
195
|
+
callback (switched to `node:fs/promises`).
|
|
196
|
+
- Fixed Windows `require.resolve` returning a drive-letter path that could not
|
|
197
|
+
be passed straight to `import()` (converted to a file URL).
|
|
198
|
+
- Added `hasConfigContent` to unify the "does the config have content"
|
|
199
|
+
semantics.
|
|
200
|
+
|
|
201
|
+
### Tests
|
|
202
|
+
|
|
203
|
+
- All 5 host-half mock unit tests pass (`node test/mock-test.mjs`): route
|
|
204
|
+
registration, inventory collection, enable/disable write & restore,
|
|
205
|
+
security check, parameter validation.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## [0.1.0] - 2026-08-27
|
|
210
|
+
|
|
211
|
+
### Initial release
|
|
212
|
+
|
|
213
|
+
- First usable version: a 7-column table (Name / Status / Version / Source /
|
|
214
|
+
Description / Config / Actions).
|
|
215
|
+
- Data collected live from the host's `ctx.loader.entries()` + description /
|
|
216
|
+
version from each package's `package.json` + source derived from the
|
|
217
|
+
profile manifest.
|
|
218
|
+
- Enable/Disable: edits the profile's `cordis.patch.yml` (user override
|
|
219
|
+
layer); DSH hot-applies it via HMR — no Web UI restart needed.
|
|
220
|
+
- Communication: the browser half fetches same-origin `/runcat-api` routes
|
|
221
|
+
with a loopback trust check (CSRF protection).
|
|
222
|
+
- Config view/copy, copy plugin name/module name, search box + status filter.
|
|
223
|
+
- Install: `dsh plugin --profile web add .`
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# 更新记录 (Changelog)
|
|
2
|
+
|
|
3
|
+
**中文** | [English](CHANGELOG.en.md)
|
|
4
|
+
|
|
5
|
+
本文件记录 `dsh-plugin-runcat-inventory`(逃咪-插件总览 / Runcat Plugin Overview)的版本变更。
|
|
6
|
+
|
|
7
|
+
## [0.3.7] - 2026-08-27
|
|
8
|
+
|
|
9
|
+
### 文档
|
|
10
|
+
|
|
11
|
+
- **新增效果预览图**:`assets/preview-zh.png`(中文界面)、
|
|
12
|
+
`assets/preview-en.png`(英文界面);中文 README 新增"效果预览"章节
|
|
13
|
+
展示中文截图,英文 README 新增 "Screenshot" 章节展示英文截图。
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## [0.3.6] - 2026-08-27
|
|
18
|
+
|
|
19
|
+
### 文档
|
|
20
|
+
|
|
21
|
+
- **新增英文版更新记录 `CHANGELOG.en.md`**:完整英文翻译;两份 CHANGELOG
|
|
22
|
+
顶部互加语言切换链接(`中文 | English`)。
|
|
23
|
+
- 英文 README 的更新记录链接指向英文 CHANGELOG。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## [0.3.5] - 2026-08-27
|
|
28
|
+
|
|
29
|
+
### 文档
|
|
30
|
+
|
|
31
|
+
- **安装新增"方法 B:GitHub 源直接安装"**:
|
|
32
|
+
`dsh plugin --profile web add github:runcat-tommy/dsh-plugin-runcat-inventory`
|
|
33
|
+
(与方法 A 本地克隆安装并列,均注明差异:link: 本地开发 / 直接拉取)。
|
|
34
|
+
- **新增英文说明 `README.en.md`**:完整英文版文档(功能/结构/前置条件/
|
|
35
|
+
安装 A/B/原理/卸载/限制/更新摘要),中英文文档顶部互加语言切换链接
|
|
36
|
+
(`中文 | English`)。
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## [0.3.4] - 2026-08-27
|
|
41
|
+
|
|
42
|
+
### 文档
|
|
43
|
+
|
|
44
|
+
- **文件夹名统一**:使用说明中的目录名由 `runcat-inventory` 改为
|
|
45
|
+
`dsh-plugin-runcat-inventory`(与 GitHub 仓库
|
|
46
|
+
`https://github.com/runcat-tommy/dsh-plugin-runcat-inventory` 克隆后的
|
|
47
|
+
本地文件夹名一致);结构树、安装步骤同步更新。
|
|
48
|
+
- **新增"前置条件"章节**:明确 Node.js(DSH 为 Node 程序,必需)、
|
|
49
|
+
pnpm(`dsh plugin` 为 pnpm 转发器,必需)、Git(克隆/GitHub 源安装时
|
|
50
|
+
需要)、网络(访问 GitHub,必要时配置代理);并说明本插件自身零依赖。
|
|
51
|
+
- 验证段落澄清 loader 条目:id 为 `runcat-inventory`、name 为
|
|
52
|
+
`dsh-plugin-runcat-inventory`,避免与文件夹名混淆。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## [0.3.3] - 2026-08-27
|
|
57
|
+
|
|
58
|
+
### 变更
|
|
59
|
+
|
|
60
|
+
- **本插件自身的描述随界面语言切换**:zh/en 字典新增 `selfDescription`
|
|
61
|
+
键(中文/英文各一套),"详情"展开行的 Description 内容对本插件按当前
|
|
62
|
+
语言显示;其余插件仍显示其 package.json 的 `description` 原文(作者
|
|
63
|
+
单一语言,无法通用翻译)。
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## [0.3.2] - 2026-08-27
|
|
68
|
+
|
|
69
|
+
### 修复
|
|
70
|
+
|
|
71
|
+
- **来源列仅本插件显示仓库地址**:上一版错误地让所有带 `repository`
|
|
72
|
+
字段的插件都显示仓库 URL,已纠正——只有 `dsh-plugin-runcat-inventory`
|
|
73
|
+
显示 `https://github.com/runcat-tommy/dsh-plugin-runcat-inventory`,
|
|
74
|
+
其余插件恢复按安装方式显示(link/file/github/npm/builtin)。
|
|
75
|
+
- **来源列内容溢出修复**:长 URL 可能溢出到相邻"操作"列——来源内容
|
|
76
|
+
增加 `word-break: break-all` + `overflow-wrap: anywhere` 强制断行,
|
|
77
|
+
内容始终在 21% 列内换行。
|
|
78
|
+
|
|
79
|
+
### 测试
|
|
80
|
+
|
|
81
|
+
- mock 测试更新:hello 恢复 `link` 来源断言;新增本插件条目
|
|
82
|
+
(`sourceKind='repo'` + URL 清理断言)。5 用例全部通过。
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## [0.3.1] - 2026-08-27
|
|
87
|
+
|
|
88
|
+
### 变更
|
|
89
|
+
|
|
90
|
+
- **列宽改为固定比例**(`table-layout: fixed` + `<colgroup>`):
|
|
91
|
+
名称 36% / 状态 15% / 来源 21% / 操作 28%(名称最重要、占比最大);
|
|
92
|
+
状态、操作列设最小宽度保护徽章与按钮不挤压。
|
|
93
|
+
- **来源列优先显示仓库地址**:host 读取各包 `package.json` 的
|
|
94
|
+
`repository` 字段(自动清理 `git+` 前缀与 `.git` 后缀),有仓库即显示
|
|
95
|
+
仓库 URL;无仓库才回退到安装方式(link/file/github/npm/builtin)。
|
|
96
|
+
- 本插件 `package.json` 补充 `repository` 字段 →
|
|
97
|
+
`https://github.com/runcat-tommy/dsh-plugin-runcat-inventory`。
|
|
98
|
+
|
|
99
|
+
### 测试
|
|
100
|
+
|
|
101
|
+
- mock 测试更新:`dsh-plugin-hello` 假包加 `repository`,断言
|
|
102
|
+
`sourceKind='repo'` 与 URL 清理结果;其余用例不变。5 用例全部通过。
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## [0.3.0] - 2026-08-27
|
|
107
|
+
|
|
108
|
+
### 国际化(界面语言随 DSH 环境自动切换)
|
|
109
|
+
|
|
110
|
+
- **双语字典**:通过 DSH 内置 locale 服务(`@deepseek-ai/dsh-client-locale`)
|
|
111
|
+
注册简体中文 / English 两套字典,界面语言跟随 DSH 环境(设置 → 通用 →
|
|
112
|
+
Language 或浏览器语言)自动切换,无需重启。
|
|
113
|
+
- **选项卡名**:中文"逃咪-插件总览",英文 **Runcat Plugin Overview**
|
|
114
|
+
(label 改为 locale 函数,语言切换时自动重渲染)。
|
|
115
|
+
- **全部界面文案走字典**:搜索/筛选/排序/按钮/徽章/提示/空状态等 40+ 项
|
|
116
|
+
全部 `t('key')` 化。
|
|
117
|
+
- **host 彻底国际化**:
|
|
118
|
+
- 错误消息改为**错误码**(`MISSING_PARAMS`、`PATCH_READ_FAILED`、
|
|
119
|
+
`PATCH_PARSE_FAILED`、`PATCH_WRITE_FAILED` 等 13 个),由客户端字典翻译;
|
|
120
|
+
- 来源字段改为 `sourceKind`(link/file/github/npm/builtin/other)+
|
|
121
|
+
`sourceSpec`(原始 spec),显示文案由客户端翻译。
|
|
122
|
+
- 终端日志(host logger)与 README/CHANGELOG 文档保持中文(运维惯例)。
|
|
123
|
+
|
|
124
|
+
### 测试
|
|
125
|
+
|
|
126
|
+
- mock 单元测试同步更新:来源断言改为 `sourceKind`/`sourceSpec`,
|
|
127
|
+
错误断言改为错误码;403 断言错误码 `FORBIDDEN`。5 用例全部通过。
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## [0.2.1] - 2026-08-27
|
|
132
|
+
|
|
133
|
+
### 变更
|
|
134
|
+
|
|
135
|
+
- 插件中文名由"**逃猫**-插件总览"改为"**逃咪**-插件总览"(选项卡显示名、
|
|
136
|
+
package.json 描述与关键词、README/CHANGELOG/代码注释同步更新)。
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## [0.2.0] - 2026-08-27
|
|
141
|
+
|
|
142
|
+
### 界面重构(表格全面瘦身)
|
|
143
|
+
|
|
144
|
+
- **表格改为固定 4 列**:`名称(含 id + 版本)/ 状态 / 来源 / 操作`,
|
|
145
|
+
删除"描述"列——描述全文移入"详情"展开行查看,列表整体变窄,
|
|
146
|
+
常规窗口宽度下基本无需横向滚动。
|
|
147
|
+
- **移除粘性固定列**:名称、操作两列不再固定,极端窄窗口下随内容
|
|
148
|
+
滚动(之前保留的粘性列效果已去掉)。
|
|
149
|
+
- **"详情"按钮显示规则**:有描述(非空)或 有配置(非空)才显示;
|
|
150
|
+
两者皆空不显示。空对象 `{}` / 空数组 `[]` 视为无内容。
|
|
151
|
+
- **详情展开行**:colSpan 随列数调整(5→4),仍展示描述全文 +
|
|
152
|
+
配置 JSON + "复制配置"按钮。
|
|
153
|
+
|
|
154
|
+
### 交互改进
|
|
155
|
+
|
|
156
|
+
- **搜索**:确认采用单一联合搜索(名称 + id + 描述 + 来源 + 版本),
|
|
157
|
+
不引入字段选择器;id 在名称列下方有展示,搜索 id 可直接定位条目。
|
|
158
|
+
- **描述**:保留悬浮显示全文(原生 title),移除点击描述展开
|
|
159
|
+
(该入口由"详情"按钮统一承担)。
|
|
160
|
+
- **排序**:新增名称排序——`配置顺序`(默认)/ `名称 ↑` / `名称 ↓`
|
|
161
|
+
(中文 localeCompare)。
|
|
162
|
+
- **键盘滚动**:表格容器聚焦后可用 ←/→ 横向滚动,Home/End 到头/尾。
|
|
163
|
+
- **窄屏适配**:窗口宽度 < 900px 时自动隐藏"来源"列。
|
|
164
|
+
|
|
165
|
+
### 技术修复
|
|
166
|
+
|
|
167
|
+
- 修复 `node:fs` 回调版 `readFile` 误传 `'utf8'` 导致读取失败的问题
|
|
168
|
+
(改用 `node:fs/promises`)。
|
|
169
|
+
- 修复 Windows 下 `require.resolve` 返回盘符路径无法直接 `import()`
|
|
170
|
+
的问题(转 file URL)。
|
|
171
|
+
- 新增 `hasConfigContent` 判断,统一"配置是否有内容"的语义。
|
|
172
|
+
|
|
173
|
+
### 测试
|
|
174
|
+
|
|
175
|
+
- host 半端 mock 单元测试 5 用例全部通过
|
|
176
|
+
(`node test/mock-test.mjs`):路由注册、清单采集、启用/停用写入与
|
|
177
|
+
恢复、安全校验、参数校验。
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## [0.1.0] - 2026-08-27
|
|
182
|
+
|
|
183
|
+
### 初始版本
|
|
184
|
+
|
|
185
|
+
- 首个可用版本:7 列表格(名称 / 状态 / 版本 / 来源 / 描述 / 配置 / 操作)。
|
|
186
|
+
- 数据来自 host 端 `ctx.loader.entries()` 实时采集 + 各包 `package.json`
|
|
187
|
+
补充描述/版本 + profile 清单判定来源。
|
|
188
|
+
- 启用/停用:编辑 profile 的 `cordis.patch.yml`(用户覆盖层),
|
|
189
|
+
DSH 通过 HMR 热生效,无需重启 Web UI。
|
|
190
|
+
- 通信:浏览器半端同源 fetch → host `/runcat-api` 路由,带 loopback
|
|
191
|
+
信任校验(防 CSRF)。
|
|
192
|
+
- 配置查看/复制、复制插件名/模块名、搜索框 + 状态过滤。
|
|
193
|
+
- 安装方式:`dsh plugin --profile web add .`
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 runcat-tommy
|
|
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.en.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# dsh-plugin-runcat-inventory (Runcat Plugin Overview / 逃咪-插件总览)
|
|
2
|
+
|
|
3
|
+
[中文](README.md) | **English**
|
|
4
|
+
|
|
5
|
+
> Version: **v0.3.7** · Changelog: [CHANGELOG.en.md](CHANGELOG.en.md) ([中文](CHANGELOG.md))
|
|
6
|
+
|
|
7
|
+
A better DSH plugin list: **table view, status filters, enable/disable switches (hot-applied), config viewer and copy, automatic zh/en UI switching**.
|
|
8
|
+
Sits alongside the official "Plugin list" tab, registered at **Settings → Plugins → Runcat Plugin Overview** (shown as 逃咪-插件总览 in Chinese).
|
|
9
|
+
|
|
10
|
+
## Screenshot
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
| Capability | Description |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Table view | 4 columns with fixed ratios: **Name 36% / Status 15% / Source 21% / Actions 28%** (name takes the largest share) |
|
|
19
|
+
| Languages | Built-in Simplified Chinese / English; the UI follows the DSH environment (Settings → General → Language, or the browser language); the plugin's own description switches too |
|
|
20
|
+
| Runtime status | Enabled/Disabled + Cordis status (Mounted / Waiting for deps / Loading / Mount failed / Not mounted / Unloading) |
|
|
21
|
+
| Description / Version | Read from each package's `package.json`; the full description is shown in the expanded row (click "Details") |
|
|
22
|
+
| Source | Only this plugin shows its repository home page (https://github.com/runcat-tommy/dsh-plugin-runcat-inventory); others show the install method (local link / local path / GitHub / npm / built-in) |
|
|
23
|
+
| Details expansion | The "Details" button appears when a plugin has a description or a config; the expanded row shows the full description + config JSON, with one-click copy |
|
|
24
|
+
| Enable / Disable | Edits the profile's `cordis.patch.yml` (user override layer), **hot-applied via HMR — no restart needed** |
|
|
25
|
+
| Search & filter | Keyword (combined search over name / id / description / source / version) + status filter |
|
|
26
|
+
| Sorting | Config order (default) / Name ↑ / Name ↓ |
|
|
27
|
+
| Width | No sticky columns; ←/→ arrow keys scroll horizontally; the Source column hides on narrow screens |
|
|
28
|
+
|
|
29
|
+
## Structure
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
dsh-plugin-runcat-inventory/ # local folder name after git clone (same as the repo)
|
|
33
|
+
├── package.json # dsh.bundle.patch + dsh.client declarations
|
|
34
|
+
├── cordis.patch.yml # patch layer: inserts this plugin entry into the root entry list
|
|
35
|
+
├── lib/
|
|
36
|
+
│ ├── index.js # Host half: loader inventory + /runcat-api routes + patch file editing
|
|
37
|
+
│ └── client.js # Browser half: hand-written ModuleLoader bundle, table UI
|
|
38
|
+
├── test/
|
|
39
|
+
│ └── mock-test.mjs # host-half unit tests (node test/mock-test.mjs, 5 cases)
|
|
40
|
+
├── assets/
|
|
41
|
+
│ ├── preview-zh.png # Chinese-UI screenshot
|
|
42
|
+
│ └── preview-en.png # English-UI screenshot
|
|
43
|
+
├── CHANGELOG.md # changelog (Chinese)
|
|
44
|
+
├── CHANGELOG.en.md # changelog (English)
|
|
45
|
+
├── README.md # Chinese docs
|
|
46
|
+
└── README.en.md # English docs (this file)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Prerequisites
|
|
50
|
+
|
|
51
|
+
| Dependency | Required? | Notes |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| **Node.js** | ✅ Required | DSH itself is a Node program; install Node.js (suggest 20+ or the latest LTS; no strict minimum) |
|
|
54
|
+
| **DSH CLI** | ✅ Required | `npm i -g @deepseek-ai/dsh` |
|
|
55
|
+
| **pnpm** | ✅ Required | `dsh plugin` forwards to pnpm; without it you get `pnpm not found on PATH`; install with `npm i -g pnpm` |
|
|
56
|
+
| **Git** | ⚠️ Depends on method | Needed to clone the repo or to install from the GitHub source (`dsh plugin add github:...`); not needed for a local-folder install |
|
|
57
|
+
| **Network** | ⚠️ Depends on environment | Needs access to GitHub; if direct connections fail, configure a git proxy, e.g. `git config --global http.https://github.com.proxy http://127.0.0.1:7897` |
|
|
58
|
+
|
|
59
|
+
> This plugin itself has **zero dependencies**: the host half only uses Node built-ins (plus lazily resolving js-yaml from the profile), and the browser half is a hand-written ModuleLoader bundle. Nothing extra to install.
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
Installs into the `web` profile (replace `web` with your profile name if different).
|
|
64
|
+
|
|
65
|
+
### Method A: local folder (recommended for development/debugging)
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
git clone https://github.com/runcat-tommy/dsh-plugin-runcat-inventory.git
|
|
69
|
+
cd dsh-plugin-runcat-inventory
|
|
70
|
+
dsh plugin --profile web add .
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> `dsh plugin add .` links this folder into the profile via `link:` — dev-friendly: code changes take effect after restarting the Web UI, no reinstall needed.
|
|
74
|
+
|
|
75
|
+
### Method B: install directly from GitHub
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
dsh plugin --profile web add github:runcat-tommy/dsh-plugin-runcat-inventory
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> pnpm pulls the repo directly from GitHub; this plugin has no build scripts, so no `allowBuilds` is needed.
|
|
82
|
+
|
|
83
|
+
### Verify
|
|
84
|
+
|
|
85
|
+
`dsh --profile web --dump-config` should end with an entry whose **id is `runcat-inventory` and name is `dsh-plugin-runcat-inventory`**.
|
|
86
|
+
Then **restart the Web UI** and open **Settings → Plugins → Runcat Plugin Overview** (逃咪-插件总览 in Chinese).
|
|
87
|
+
|
|
88
|
+
## How it works
|
|
89
|
+
|
|
90
|
+
- **Data**: the host half iterates `ctx.loader.entries()` (same as the official inventory); fiber status maps from FiberState; description/version are read from each package's `package.json`; source is derived from the profile's `package.json` dependency declarations.
|
|
91
|
+
- **Enable/Disable**: writes `{id, name, disabled: true}` patches into `~/.dsh/profiles/web/cordis.patch.yml` (to disable) or removes them (to enable). DSH watches this file via HMR (`watchUserPatches`) and hot-applies changes to the loader — plugins toggle instantly without a restart.
|
|
92
|
+
- **Communication**: the browser half fetches same-origin `/runcat-api` routes; routes carry a loopback trust check (CSRF protection).
|
|
93
|
+
- **Lazy js-yaml resolution**: when installed via `link:`, the plugin's real path is the workspace (no node_modules there), so at runtime js-yaml is resolved anchored at the profile directory.
|
|
94
|
+
|
|
95
|
+
## Uninstall
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
dsh plugin --profile web remove dsh-plugin-runcat-inventory
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Known limitations
|
|
102
|
+
|
|
103
|
+
- If `cordis.patch.yml` contains `!!js` expressions, the enable/disable switch reports a failure (the file is never corrupted; it just cannot be auto-edited).
|
|
104
|
+
- The disable patch is matched and removed exactly as `{id, name, disabled: true}` (three keys); conflicts with hand-written content are resolved by the "exactly three keys" rule.
|
|
105
|
+
|
|
106
|
+
## Changelog
|
|
107
|
+
|
|
108
|
+
Full history in [CHANGELOG.en.md](CHANGELOG.en.md) ([中文](CHANGELOG.md)).
|
|
109
|
+
|
|
110
|
+
- **v0.3.7** (2026-08-27): added preview screenshots — the Chinese README shows the Chinese-UI screenshot, the English README shows the English-UI screenshot (`assets/` folder).
|
|
111
|
+
- **v0.3.6** (2026-08-27): docs — added `CHANGELOG.en.md` (English changelog) with language switcher links on both changelogs.
|
|
112
|
+
- **v0.3.5** (2026-08-27): docs — added Method B (install from GitHub source); added `README.en.md` (English docs) with language switcher links on both READMEs.
|
|
113
|
+
- **v0.3.4** (2026-08-27): docs — folder name unified to `dsh-plugin-runcat-inventory`; added the "Prerequisites" section.
|
|
114
|
+
- **v0.3.3** (2026-08-27): the plugin's own description now follows the UI language (zh/en, in the Details row).
|
|
115
|
+
- **v0.3.2** (2026-08-27): fix — only this plugin shows the repo URL; others show install methods again; Source column content wraps (long URLs no longer overflow into Actions).
|
|
116
|
+
- **v0.3.1** (2026-08-27): fixed column ratios (Name 36% / Status 15% / Source 21% / Actions 28%); Source shows the repo URL for this plugin.
|
|
117
|
+
- **v0.3.0** (2026-08-27): i18n — zh/en dictionaries via the DSH locale service; host errors become error codes; source becomes kind+spec.
|
|
118
|
+
- **v0.2.1** (2026-08-27): Chinese name changed from 逃猫-插件总览 to 逃咪-插件总览.
|
|
119
|
+
- **v0.2.0** (2026-08-27): 4-column layout, details expansion, name sorting, keyboard scrolling, narrow-screen adaptation; two cross-platform bug fixes; mock unit tests.
|
|
120
|
+
- **v0.1.0** (2026-08-27): initial release — 7-column table, enable/disable (HMR hot-applied), config viewer/copy, search filters.
|