@danielng23/dsh-studio-host-system-metrics 0.1.0

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/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # @danielng23/dsh-host-system-metrics
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ Host Remote serving point-in-time host resource snapshots to the browser: load averages, average CPU busy ratio since boot, memory totals, and uptime, projected directly from `node:os` at call time (no cache to synchronize).
6
+
7
+ ## Usage
8
+
9
+ Compose the service row beside the Web stack:
10
+
11
+ ```yaml
12
+ - id: system-metrics
13
+ name: '@danielng23/dsh-host-system-metrics'
14
+ ```
15
+
16
+ The service key is `ctx.systemMetrics`; the wire namespace is `systemMetrics` with one method `snapshot`. The generated client projection ships as `./remote` and is mounted in the standard `@deepseek-ai/dsh-api-remotes` Client assembly alongside the other Host Remote contributions.
17
+
18
+ ## Semantics
19
+
20
+ - `snapshot()` returns `SystemMetricsSnapshot`: 1/5/15-minute `loadavg`, `cpuBusyRatio` (busy time ÷ total time across all logical cores since boot, 0..1 — an average since boot, not an instantaneous sample), total/free memory bytes, `uptimeSeconds`, and a wall-clock `timestamp`.
21
+ - Every call reads `node:os` directly, so a composition without this plugin answers the domain with an actionable `internal` error naming the missing plugin.
22
+
23
+ ## Model Experience
24
+
25
+ None, as this package serves `node:os` resource snapshots to the browser; nothing here reaches a model request.
26
+
27
+ #### KV Cache effect
28
+
29
+ None; this package neither assembles nor sends a provider request.
30
+
31
+ ## Known Limitations and Deferred Work
32
+
33
+ - **CPU ratio is a since-boot average** — no sampling window exists to report instantaneous utilization; a poller-driven delta would need a host-side cursor.
34
+ - **No process-level metrics** — the snapshot carries load/memory/uptime only.