@feiyang666/dsh-usage-plugin 1.9.0 → 1.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feiyang666/dsh-usage-plugin",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "DeepSeek Harness usage & cost tracker plugin: per-call token/cache-hit stats, peak/off-peak billing, DeepSeek balance query, CSV/JSON/PNG export with custom destination, and persistent local storage. Ships a host half plus a web client half in one npm package; installs into a DSH profile as a dsh.bundle with one command (dsh plugin --profile web add @feiyang666/dsh-usage-plugin).",
5
5
  "keywords": [
6
6
  "deepseek",
@@ -24,6 +24,10 @@
24
24
  {
25
25
  "name": "liu3734",
26
26
  "url": "https://github.com/liu3734"
27
+ },
28
+ {
29
+ "name": "mumuer1024",
30
+ "url": "https://github.com/mumuer1024"
27
31
  }
28
32
  ],
29
33
  "homepage": "https://github.com/feiyang-dev/dsh-usage-plugin#readme",
@@ -54,7 +58,7 @@
54
58
  "scripts",
55
59
  "cordis.patch.yml",
56
60
  "README.md",
57
- "README.en.md",
61
+ "README.zh.md",
58
62
  "CHANGELOG.md"
59
63
  ],
60
64
  "scripts": {
package/scripts/wire.js CHANGED
@@ -1,108 +1,109 @@
1
- /**
2
- * dsh-usage-plugin — wiring script (LEGACY fallback).
3
- *
4
- * PREFERRED INSTALL: this package declares `dsh.bundle`, so it auto-activates
5
- * with a single command and NO manual wiring:
6
- *
7
- * dsh plugin --profile web add @feiyang666/dsh-usage-plugin
8
- *
9
- * This script exists only for the manual fallback path (installing the package
10
- * by hand into a profile's node_modules): it appends the plugin row to the
11
- * profile's `cordis.patch.yml` so the plugin loads with the web app:
12
- *
13
- * npm run wire
14
- *
15
- * It is idempotent: running it again never duplicates the row. If it cannot
16
- * find a profile patch it prints what to add manually and exits non-zero.
17
- */
18
- import { readFileSync, writeFileSync, existsSync, readdirSync } from "node:fs";
19
- import { resolve, join, dirname } from "node:path";
20
- import { fileURLToPath } from "node:url";
21
-
22
- const here = dirname(fileURLToPath(import.meta.url));
23
- const pkgDir = resolve(here, "..");
24
- const ROW_ID = "usage-plugin";
25
- const PACKAGE_NAME = JSON.parse(readFileSync(join(pkgDir, "package.json"), "utf8")).name || "dsh-usage-plugin";
26
-
27
- function candidateRoots() {
28
- const roots = [];
29
- // When installed at <profilesRoot>/node_modules/dsh-usage-plugin, the
30
- // profiles root is two levels up; try several depths for other layouts.
31
- for (let up = 1; up <= 4; up++) {
32
- let p = pkgDir;
33
- for (let i = 0; i < up; i++) p = resolve(p, "..");
34
- roots.push(p);
35
- }
36
- if (process.env.DSH_HOME) {
37
- roots.push(join(process.env.DSH_HOME, "profiles"));
38
- roots.push(process.env.DSH_HOME);
39
- }
40
- return roots;
41
- }
42
-
43
- function findPatches(roots) {
44
- const seen = new Set();
45
- const patches = [];
46
- for (const root of roots) {
47
- let entries;
48
- try {
49
- entries = readdirSync(root, { withFileTypes: true });
50
- } catch {
51
- continue;
52
- }
53
- for (const entry of entries) {
54
- if (!entry.isDirectory() || entry.name === "node_modules") continue;
55
- const patch = join(root, entry.name, "cordis.patch.yml");
56
- if (existsSync(patch) && !seen.has(patch)) {
57
- seen.add(patch);
58
- patches.push(patch);
59
- }
60
- }
61
- }
62
- return patches;
63
- }
64
-
65
- function alreadyWired(text) {
66
- return text.includes(`id: ${ROW_ID}`);
67
- }
68
-
69
- function wire(patchPath) {
70
- const text = readFileSync(patchPath, "utf8");
71
- if (alreadyWired(text)) {
72
- console.log(`[dsh-usage-plugin] already wired in ${patchPath}`);
73
- return true;
74
- }
75
- const block =
76
- "\n# " + PACKAGE_NAME + ": usage & cost tracking (installed via npm).\n" +
77
- "- insert:\n" +
78
- " - id: " + ROW_ID + "\n" +
79
- " name: '" + PACKAGE_NAME + "'\n" +
80
- " inject:\n" +
81
- " - fs\n" +
82
- " - webServer\n" +
83
- " - subprocess\n" +
84
- " - credentials\n" +
85
- " - sandboxPolicy\n" +
86
- " - agents\n";
87
- writeFileSync(patchPath, text.endsWith("\n") ? text + block : text + "\n" + block, "utf8");
88
- console.log(`[dsh-usage-plugin] wired into ${patchPath}`);
89
- return true;
90
- }
91
-
92
- const patches = findPatches(candidateRoots());
93
- if (patches.length === 0) {
94
- console.error(
95
- "[dsh-usage-plugin] no DSH profile patch found. Preferred: install with `dsh plugin --profile web add " + PACKAGE_NAME + "` (auto-wires via dsh.bundle, no manual editing).\n" +
96
- "Manual fallback add this row to your profile's cordis.patch.yml, then restart the app:\n\n" +
97
- "- insert:\n" +
98
- " - id: " + ROW_ID + "\n" +
99
- " name: '" + PACKAGE_NAME + "'\n"
100
- );
101
- process.exit(1);
102
- }
103
- let ok = true;
104
- for (const patch of patches) ok = wire(patch) && ok;
105
- if (ok) {
106
- console.log("[dsh-usage-plugin] done. Restart the DeepSeek Harness web app for the plugin to load.");
107
- }
108
- process.exit(ok ? 0 : 1);
1
+ /**
2
+ * dsh-usage-plugin — wiring script (LEGACY fallback).
3
+ *
4
+ * PREFERRED INSTALL: this package declares `dsh.bundle`, so it auto-activates
5
+ * with a single command and NO manual wiring:
6
+ *
7
+ * dsh plugin --profile web add @feiyang666/dsh-usage-plugin
8
+ *
9
+ * This script exists only for the manual fallback path (installing the package
10
+ * by hand into a profile's node_modules): it appends the plugin row to the
11
+ * profile's `cordis.patch.yml` so the plugin loads with the web app:
12
+ *
13
+ * npm run wire
14
+ *
15
+ * It is idempotent: running it again never duplicates the row. If it cannot
16
+ * find a profile patch it prints what to add manually and exits non-zero.
17
+ */
18
+ import { readFileSync, writeFileSync, existsSync, readdirSync } from "node:fs";
19
+ import { resolve, join, dirname } from "node:path";
20
+ import { fileURLToPath } from "node:url";
21
+
22
+ const here = dirname(fileURLToPath(import.meta.url));
23
+ const pkgDir = resolve(here, "..");
24
+ const ROW_ID = "usage-plugin";
25
+ const PACKAGE_NAME = JSON.parse(readFileSync(join(pkgDir, "package.json"), "utf8")).name || "dsh-usage-plugin";
26
+
27
+ function candidateRoots() {
28
+ const roots = [];
29
+ // When installed at <profilesRoot>/node_modules/dsh-usage-plugin, the
30
+ // profiles root is two levels up; try several depths for other layouts.
31
+ for (let up = 1; up <= 4; up++) {
32
+ let p = pkgDir;
33
+ for (let i = 0; i < up; i++) p = resolve(p, "..");
34
+ roots.push(p);
35
+ }
36
+ if (process.env.DSH_HOME) {
37
+ roots.push(join(process.env.DSH_HOME, "profiles"));
38
+ roots.push(process.env.DSH_HOME);
39
+ }
40
+ return roots;
41
+ }
42
+
43
+ function findPatches(roots) {
44
+ const seen = new Set();
45
+ const patches = [];
46
+ for (const root of roots) {
47
+ let entries;
48
+ try {
49
+ entries = readdirSync(root, { withFileTypes: true });
50
+ } catch {
51
+ continue;
52
+ }
53
+ for (const entry of entries) {
54
+ if (!entry.isDirectory() || entry.name === "node_modules") continue;
55
+ const patch = join(root, entry.name, "cordis.patch.yml");
56
+ if (existsSync(patch) && !seen.has(patch)) {
57
+ seen.add(patch);
58
+ patches.push(patch);
59
+ }
60
+ }
61
+ }
62
+ return patches;
63
+ }
64
+
65
+ function alreadyWired(text) {
66
+ return text.includes(`id: ${ROW_ID}`);
67
+ }
68
+
69
+ function wire(patchPath) {
70
+ const text = readFileSync(patchPath, "utf8");
71
+ if (alreadyWired(text)) {
72
+ console.log(`[dsh-usage-plugin] already wired in ${patchPath}`);
73
+ return true;
74
+ }
75
+ const block =
76
+ "\n# " + PACKAGE_NAME + ": usage & cost tracking (installed via npm).\n" +
77
+ "- insert:\n" +
78
+ " - id: " + ROW_ID + "\n" +
79
+ " name: '" + PACKAGE_NAME + "'\n" +
80
+ " inject:\n" +
81
+ " - fs\n" +
82
+ " - webServer\n" +
83
+ " - subprocess\n" +
84
+ " - credentials\n" +
85
+ " - settings\n" +
86
+ " - sandboxPolicy\n" +
87
+ " - agents\n";
88
+ writeFileSync(patchPath, text.endsWith("\n") ? text + block : text + "\n" + block, "utf8");
89
+ console.log(`[dsh-usage-plugin] wired into ${patchPath}`);
90
+ return true;
91
+ }
92
+
93
+ const patches = findPatches(candidateRoots());
94
+ if (patches.length === 0) {
95
+ console.error(
96
+ "[dsh-usage-plugin] no DSH profile patch found. Preferred: install with `dsh plugin --profile web add " + PACKAGE_NAME + "` (auto-wires via dsh.bundle, no manual editing).\n" +
97
+ "Manual fallback — add this row to your profile's cordis.patch.yml, then restart the app:\n\n" +
98
+ "- insert:\n" +
99
+ " - id: " + ROW_ID + "\n" +
100
+ " name: '" + PACKAGE_NAME + "'\n"
101
+ );
102
+ process.exit(1);
103
+ }
104
+ let ok = true;
105
+ for (const patch of patches) ok = wire(patch) && ok;
106
+ if (ok) {
107
+ console.log("[dsh-usage-plugin] done. Restart the DeepSeek Harness web app for the plugin to load.");
108
+ }
109
+ process.exit(ok ? 0 : 1);
package/README.en.md DELETED
@@ -1,272 +0,0 @@
1
- <div align="center">
2
-
3
- # DeepSeek Harness Usage & Cost Tracker (dsh-usage-plugin)
4
-
5
- [简体中文](./README.md) · **English**
6
-
7
- [GitHub](https://github.com/feiyang-dev/dsh-usage-plugin) · [npm](https://www.npmjs.com/package/@feiyang666/dsh-usage-plugin) · MIT License
8
-
9
- **A community plugin for DeepSeek Harness** — records token usage and cost for every model call, with peak/off-peak billing, balance query, a calendar heatmap, and CSV / JSON / PNG export.
10
-
11
- ![License](https://img.shields.io/badge/license-MIT-blue.svg)
12
- ![Node](https://img.shields.io/badge/node-%3E%3D18-339933)
13
- ![Platform](https://img.shields.io/badge/platform-web%20%26%20desktop-4d9fff)
14
-
15
- </div>
16
-
17
- ---
18
-
19
- > ## 🔔 Important Notice (2026-08-16): npm package renamed
20
- >
21
- > The **npm package has been renamed from `@feiyang666/deepseekharnessdesktop` to `@feiyang666/dsh-usage-plugin`** (matching the GitHub repo `feiyang-dev/dsh-usage-plugin`).
22
- >
23
- > - Use the new package name for install / upgrade: `dsh plugin --profile web add @feiyang666/dsh-usage-plugin`
24
- > - The old package `@feiyang666/deepseekharnessdesktop` remains published for a while, but it is **no longer maintained and will not receive updates** — please migrate soon.
25
- > - The desktop client (`DeepSeek Harness Desktop`) supports both package names and will auto-detect old-name installs with a **one-click update** to the new name.
26
-
27
- ---
28
-
29
- ## Overview
30
-
31
- dsh-usage-plugin is a **usage & cost tracker** plugin in the DeepSeek Harness ecosystem (a DSH plugin shipped as a Host + Client two-in-one package). After installation, **"Usage & Cost"** and **"Balance Query"** tabs appear in the Web UI, right after "Conversation" and "Trace":
32
-
33
- > Supports **Windows / macOS / Linux**: paths are handled per platform (`node:path`), and the folder picker / "reveal in file manager" use each OS's native mechanism (macOS: `osascript` / `open`; Linux: `zenity` / `xdg-open`). Balance query and export do not depend on Windows-only commands.
34
-
35
- - **Usage & Cost**: records each model call's token usage and cache hits (input miss / cache hit / cache write / output / reasoning / finish reason), and computes cost using DeepSeek's peak/valley or base pricing (peak hours are automatically priced by Beijing time 09:00–12:00 and 14:00–18:00). Model names come from the actual request parameters, so non-DeepSeek models are shown truthfully instead of "unknown model"; models without an official price are counted as 0. The overview shows a by-model table plus a by-API-provider × model drill-down (each provider grouped with every model's calls and peak/off-peak cost split) and a grand total row.
36
- - **Usage Calendar**: a monthly daily-usage heatmap (colored by cost or call count), hover for details including the peak/off-peak cost split, click a day for its call list and peak/off-peak totals, plus a per-day statistics table with peak cost / off-peak cost / total columns and monthly rollups.
37
- - **Cache Hit List**: newest-first, fully scrollable, with quick filters (Today / 7 days / 30 days / All) and custom date ranges; the summary line and footer total split peak vs off-peak consumption with a grand cost total. The list is paginated (100 rows per page), so it stays smooth even with large data volumes.
38
- - **Price Table**: the official DeepSeek API price table — base and peak/valley unit prices shown side by side (peak vs off-peak), editable in-panel and persisted to `pricing.json`, with a reset-to-default option.
39
- - **Balance Query**: queries your DeepSeek account balance using the configured `DEEPSEEK_API_KEY`.
40
- - **Export**: CSV / JSON / **PNG long image** (newest-first, up to the latest 2000 records, warns if exceeded; the PNG report includes peak/off-peak cost columns), to any directory (native picker), auto-opens the folder after export.
41
- - **Import**: merge-imports JSON / CSV files, deduplicated by time.
42
- - **Persistence**: records are written live to `<session workspace>/dsh-usage/usage-records.json` and restored on restart (cap 100000 records).
43
- - **UI adaptation**: panel typography scales with the app's display-size setting (em-relative fonts); table wrapping and spacing are tuned so large display sizes stay readable.
44
-
45
- ---
46
-
47
- ## Screenshots
48
-
49
- ### Usage & Consumption
50
- ![Usage & Consumption](./docs/assets/usage-overview.png)
51
-
52
- ### Balance Query
53
- ![Balance Query](./docs/assets/balance-query.png)
54
-
55
- ## Recommended Installation
56
-
57
- > Either method works and is equivalent. **We recommend the desktop app** — fully graphical, no command line needed.
58
-
59
- ### Option 1 (recommended): One-click via the desktop app
60
-
61
- Install [DeepSeek Harness Desktop](https://github.com/feiyang-dev/DeepSeek-Harness-Desktop), open it, then go to **"Install Plugins" → Recommended → Usage & Cost Tracker → Install** and click **"Restart Service Now"** to activate.
62
-
63
- ### Option 2: Command line
64
-
65
- ```bash
66
- # Prerequisite: install dsh (npm install -g @deepseek-ai/dsh)
67
- dsh plugin --profile web add @feiyang666/dsh-usage-plugin
68
- ```
69
-
70
- Or install to another profile:
71
-
72
- ```bash
73
- dsh plugin --profile web add @feiyang666/dsh-usage-plugin
74
- dsh plugin --profile headless add @feiyang666/dsh-usage-plugin
75
- ```
76
-
77
- Restart the dsh web service after installation. Detailed manual install / wiring / uninstall / troubleshooting follows below.
78
-
79
- ---
80
-
81
- ## What's in the package
82
-
83
- One npm package = a **host half** (Node-side Cordis plugin: recording, billing, balance query, export — see `lib/index.js`) + a **client half** (browser-side panel — see `lib/client.js`, which talks to the host via `/usage/api`).
84
-
85
- The package integrates with DSH through two declarations:
86
-
87
- | Declaration | Purpose |
88
- | --- | --- |
89
- | `dsh.bundle.patch` (`cordis.patch.yml`) | Lets DSH recognize it as a **standard bundle plugin package**: `dsh plugin --profile <name> add <package>` installs and wires it in one command, no manual config editing |
90
- | `dsh.client` + `exports["./client"]` | Lets the web client auto-load the browser panel at `/plugins/<package>/client.js` |
91
-
92
- So for users, **installation is one command** — no YAML editing, no manual file copying.
93
-
94
- ---
95
-
96
- ## Installation (for users)
97
-
98
- ### 0. Prerequisites
99
-
100
- - DeepSeek Harness installed (`npm install -g @deepseek-ai/dsh`, or a desktop app built on it, or `npx @deepseek-ai/dsh web`).
101
- - Option A (recommended) needs **pnpm**: `npm install -g pnpm` (or `corepack enable`).
102
- - Make sure `dsh` is on PATH (for the desktop app, run in its bundled terminal).
103
-
104
- ### 1. Method A (recommended): one command
105
-
106
- ```bash
107
- dsh plugin --profile web add @feiyang666/dsh-usage-plugin
108
- ```
109
-
110
- This does three things (all automatic):
111
-
112
- 1. Installs the package via pnpm into `~/.dsh/profiles/web` (auto-initializes the profile on first use);
113
- 2. Detects the package's `dsh.bundle` declaration and writes the package name into the profile's `dsh.profile.bundles` layer list;
114
- 3. After restart, DSH reads the package's `cordis.patch.yml` and mounts the plugin row into the app tree — **no manual config editing**.
115
-
116
- Same for other profiles (replace `web` with your profile name, e.g. `dsh plugin --profile headless add ...`; `dsh web` equals `dsh --profile web`).
117
-
118
- > Test a local tarball: `dsh plugin --profile web add C:\path\to\feiyang666-deepseekharnessdesktop-1.1.0.tgz`
119
-
120
- ### 2. Method B: manual install (no pnpm / no `dsh plugin`)
121
-
122
- Only for when you have no pnpm or want full manual control. **Do not `npm install` directly at `~/.dsh/profiles`** (that dir has no package.json; npm would treat the whole node_modules as residue and wipe it).
123
-
124
- **B1. Use pnpm but not `dsh plugin`:**
125
-
126
- ```bash
127
- cd ~/.dsh/profiles/web
128
- pnpm add @feiyang666/dsh-usage-plugin
129
- # then manually append the plugin row to web/cordis.patch.yml (see B3) and restart
130
- ```
131
-
132
- **B2. Or use npm:** add a minimal package.json to the profile first, then install:
133
-
134
- ```bash
135
- cd ~/.dsh/profiles/web
136
- # if no package.json exists there yet (only after `dsh plugin` init):
137
- # echo '{"name":"dsh-profile-web","private":true,"dependencies":{}}' > package.json
138
- npm install @feiyang666/dsh-usage-plugin
139
- ```
140
-
141
- **B3. Wire it up (once, idempotent):** append to `~/.dsh/profiles/web/cordis.patch.yml`:
142
-
143
- ```yaml
144
- - insert:
145
- - id: usage-plugin
146
- name: '@feiyang666/dsh-usage-plugin'
147
- inject:
148
- - fs
149
- - webServer
150
- - subprocess
151
- - credentials
152
- - sandboxPolicy
153
- - agents
154
- ```
155
-
156
- Or just run the package's built-in wiring script (auto-finds the profile and appends, idempotent):
157
-
158
- ```bash
159
- node node_modules/@feiyang666/dsh-usage-plugin/scripts/wire.js
160
- ```
161
-
162
- > ⚠️ The `inject` list is **required**: it makes Cordis wait until `fs` / `webServer` / `subprocess` / `credentials` / `sandboxPolicy` / `agents` are ready before activating the plugin. Without it the `/usage/api` route never registers and the panel fails with `Unexpected end of JSON input`.
163
-
164
- ### 3. Method C: desktop app
165
-
166
- The desktop app (e.g. [DeepSeek Harness Desktop](https://github.com/feiyang-dev/DeepSeek-Harness-Desktop)) uses the same `~/.dsh/profiles` underneath. Run Method A's command in any terminal, restart the app, and the plugin activates automatically (the app starts the same `dsh web`).
167
-
168
- ### 4. Restart and verify
169
-
170
- Restart the DeepSeek Harness web app (command line: kill the old process and re-run `dsh web`; desktop: fully quit and reopen). Then:
171
-
172
- - Refresh http://127.0.0.1:3080 — after "Conversation" and "Trace", you should see **"Usage & Cost"** and **"Balance Query"** tabs; there are entries in Settings too.
173
- - The "Usage & Cost" panel contains **Overview / Usage Calendar / Cache Hit List / Price Table** subtabs.
174
- - Send a message and the "Usage & Cost" panel should show this call's token / cost record.
175
-
176
- ### 5. Configuration (for balance query)
177
-
178
- "Balance Query" uses the configured `DEEPSEEK_API_KEY`: set the API Key in **Settings → Models** (same key used for chats), then open the "Balance Query" tab and click "Query Balance".
179
-
180
- ---
181
-
182
- ## Uninstall
183
-
184
- ```bash
185
- dsh plugin --profile web remove @feiyang666/dsh-usage-plugin
186
- ```
187
-
188
- (Equivalent to pnpm remove; `dsh plugin` auto-removes the package name from the `dsh.profile.bundles` layer list.) Restart the app afterward.
189
-
190
- For manual installs (Method B), do it in reverse: remove the `usage-plugin` row from `cordis.patch.yml`, then `pnpm remove` / `npm uninstall` the package, and restart.
191
-
192
- > Upgrading from a 1.0.x manual-wiring install to 1.1.x: first remove the old `usage-plugin` row from `cordis.patch.yml` (or follow the uninstall flow), then reinstall via Method A to avoid mounting the plugin twice.
193
-
194
- ---
195
-
196
- ## Data & locations
197
-
198
- - Records: `<session workspace>/dsh-usage/usage-records.json`
199
- - Price config (edited & saved in the panel): `<session workspace>/dsh-usage/pricing.json`
200
- - Default export dir: `<session workspace>/dsh-usage/{csv,json,images}/`
201
- - Custom export dir: set in the panel's "Export target directory" or click "Choose directory…"
202
- - Startup diagnostics (if the plugin fails to activate): `dsh-usage-boot.log` in the session workspace
203
-
204
- ---
205
-
206
- ## FAQ
207
-
208
- | Symptom | Cause / Fix |
209
- | --- | --- |
210
- | Panel reports `Unexpected end of JSON input` | The plugin row is missing the `inject` list, so the route isn't registered. Add the inject list per Method B3 and restart |
211
- | Panel blank / no top tab | Plugin not activated. Check `dsh-usage-boot.log`; confirm the `cordis.patch.yml` row exists with the correct `name` |
212
- | Balance query fails with "DEEPSEEK_API_KEY not configured" | Set the API Key in Settings → Models |
213
- | Balance query network error | Ensure `api.deepseek.com` is reachable (configure a proxy if needed) |
214
- | `dsh plugin` reports pnpm not found | Install pnpm: `npm install -g pnpm` |
215
- | Install can't reach the npm registry | Set a mirror: `npm config set registry https://registry.npmmirror.com` (or `pnpm config set registry ...`) and retry |
216
- | After uninstall, still reports `Cannot find package '@feiyang666/...'` | A package reference remains in the profile. Remove the corresponding row from `cordis.patch.yml` and the package name from `dsh.profile.bundles`, then restart |
217
-
218
- ---
219
-
220
- ## Publish to npm (for maintainers)
221
-
222
- ```bash
223
- npm login # use your own npm account
224
- npm run check # pre-publish self-check (also runs via prepublishOnly)
225
- npm pack # inspect the tarball contents
226
- npm publish --access public # scoped packages must use --access public
227
- ```
228
-
229
- > Publishing to public npm makes the source public — make sure no sensitive info is in the package (API keys are user-configured at runtime only).
230
- > If your network can't reach `registry.npmjs.org`, run `npm config set registry https://registry.npmjs.org` before publishing (the package's `.npmrc` presets this registry).
231
-
232
- ---
233
-
234
- ## Related Projects
235
-
236
- | Project | Description | Installation |
237
- | --- | --- | --- |
238
- | [DeepSeek Harness Desktop](https://github.com/feiyang-dev/DeepSeek-Harness-Desktop) | Windows desktop console: install/start/stop/restart the dsh web service with one click, built-in plugin management — **install this plugin from its Recommended section** | Download the desktop app and click a few buttons |
239
- | [Data Vault (dsh-vault)](https://github.com/feiyang-dev/dsh-vault) | Auto backup / wipe detection / one-click restore — protects chat history and workspace data | One-click from the desktop app, or `dsh plugin add @feiyang666/dsh-vault` |
240
- | [DeepSeek-Harness](https://github.com/deepseek-ai/DeepSeek-Harness) | Official CLI / Web service | Quick start below |
241
-
242
- ### Running DeepSeek Harness
243
-
244
- **Quick start (via npm)**
245
-
246
- Install Node.js, then run:
247
-
248
- ```bash
249
- npx @deepseek-ai/dsh web
250
- ```
251
-
252
- This command starts the Web UI at the default address http://127.0.0.1:3080. See the [Web UI Guide](https://github.com/deepseek-ai/DeepSeek-Harness) for details.
253
-
254
- **Run from source**
255
-
256
- To run from the repository source:
257
-
258
- ```bash
259
- git clone https://github.com/deepseek-ai/deepseek-harness.git
260
- cd deepseek-harness
261
- pnpm install
262
- pnpm run build
263
- pnpm dsh web
264
- ```
265
-
266
- ## Acknowledgements
267
-
268
- - **[@liu3734](https://github.com/liu3734)**: reported and diagnosed the Windows-only path handling / spawn issues on macOS (POSIX) and proposed the cross-platform fix ([#1](https://github.com/feiyang-dev/dsh-usage-plugin/issues/1)).
269
-
270
- ## License
271
-
272
- MIT © dsh-usage-plugin