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/README.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.
|
|
Binary file
|
|
Binary file
|