dsh-plugin-system-status 0.0.0-stage → 0.1.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/index.js ADDED
@@ -0,0 +1,43 @@
1
+ import { homedir } from 'node:os'
2
+ import { join } from 'node:path'
3
+ import { createGpuSource } from './host/gpu.js'
4
+ import { createSampler } from './host/sampler.js'
5
+ import { createHistoryStore } from './host/history.js'
6
+ import { registerRoutes } from './host/routes.js'
7
+
8
+ const SAMPLE_INTERVAL_MS = 3000
9
+ const HISTORY_FLUSH_MS = 5000
10
+ const HISTORY_RETENTION_DAYS = 7
11
+
12
+ /** The routes live on the host web server, so require it instead of degrading. */
13
+ export const inject = ['webServer']
14
+
15
+ /**
16
+ * Start sampling, persist history, and publish both over HTTP. Everything this
17
+ * opens is registered on the plugin's own context, so disabling the plugin
18
+ * releases the timer, the nvidia-smi child, the routes, and every open stream.
19
+ * @param {import('@deepseek-ai/cordis').Context} ctx plugin context
20
+ */
21
+ export function apply(ctx) {
22
+ const gpu = createGpuSource({ intervalMs: SAMPLE_INTERVAL_MS })
23
+ const sampler = createSampler({ gpu, intervalMs: SAMPLE_INTERVAL_MS })
24
+ const historyDir = join(process.env.DSH_HOME ?? join(homedir(), '.dsh'), 'system-status')
25
+ const history = createHistoryStore({
26
+ dir: historyDir,
27
+ retentionDays: HISTORY_RETENTION_DAYS,
28
+ flushMs: HISTORY_FLUSH_MS,
29
+ })
30
+
31
+ ctx.effect(() => {
32
+ const releaseRoutes = registerRoutes(ctx.webServer, { sampler, history })
33
+ const unsubscribe = sampler.subscribe((sample) => history.push(sample))
34
+ sampler.start()
35
+ return () => {
36
+ unsubscribe()
37
+ releaseRoutes()
38
+ sampler.stop()
39
+ gpu.stop()
40
+ void history.close().catch(() => {})
41
+ }
42
+ })
43
+ }
package/locale/en.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "System status",
4
+ "description": "A live CPU, memory, GPU, VRAM and GPU temperature strip under the composer, plus CPU, memory, VRAM, disk and temperature history charts reached from the left sidebar. History is sampled only while DSH runs.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "系统状态",
4
+ "description": "在对话页输入框下方常驻显示 CPU、内存、GPU、显存与 GPU 温度,并从左侧栏进入 CPU、内存、显存、磁盘与温度的历史曲线。历史仅在 DSH 运行时采样。",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,57 @@
1
1
  {
2
2
  "name": "dsh-plugin-system-status",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Real-time and historical CPU, GPU, memory, disk and temperature status for the machine running DeepSeek Harness.",
5
+ "license": "MIT",
6
+ "author": "chenmohan123",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/chenmohan123/dsh-plugin-system-status.git"
10
+ },
11
+ "homepage": "https://github.com/chenmohan123/dsh-plugin-system-status#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/chenmohan123/dsh-plugin-system-status/issues"
14
+ },
15
+ "keywords": [
16
+ "dsh-plugin",
17
+ "deepseek-harness",
18
+ "dsh",
19
+ "system-monitor",
20
+ "cpu",
21
+ "gpu",
22
+ "memory",
23
+ "vram",
24
+ "windows"
25
+ ],
26
+ "type": "module",
27
+ "exports": {
28
+ ".": "./index.js",
29
+ "./client": "./client.js",
30
+ "./locale/*.json": "./locale/*.json",
31
+ "./icon": "./icon.svg"
32
+ },
33
+ "files": [
34
+ "index.js",
35
+ "client.js",
36
+ "cordis.patch.yml",
37
+ "host",
38
+ "locale/*.json",
39
+ "docs/DETAIL.md",
40
+ "icon.svg"
41
+ ],
42
+ "dsh": {
43
+ "bundle": {
44
+ "patch": "./cordis.patch.yml"
45
+ },
46
+ "client": {
47
+ "platform": "web",
48
+ "immediately": true,
49
+ "inject": [
50
+ "@deepseek-ai/dsh-client-ui-conversation",
51
+ "@deepseek-ai/dsh-client-ui-layout",
52
+ "@deepseek-ai/dsh-client-ui-sidebar",
53
+ "@deepseek-ai/dsh-client-locale"
54
+ ]
55
+ }
56
+ }
57
+ }