yin52133/dsh-luban--packages-dsh-luban-hud ↗★ 0
@yin52133/dsh-luban-hud
为 DSH 提供并发遥测数据聚合以及持久化的 Web/CLI 抬头显示(HUD)插件。
AI 分析
核心用途是实时监控 DSH 的上下文、模型、TPM/RPM 等性能指标。适合需要监控系统负载和 API 速率限制的专业用户。需要配合 telemetry 服务使用。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yin52133/dsh-luban#fd42aad0a6c5628a3bee24796f0caba131fb0252&path:packages/dsh-luban-hud说明文档
阅读完整 README ↗Configuration
All options and defaults are shown below:
- insert:
- id: luban-hud
name: @yin52133/dsh-luban-hud
config:
refreshSec: 1
thresholds: { warn: 0.70, danger: 0.85, critical: 0.95 }
display:
fields: [context, workspace, model, thinking, tpm, rpm]
compact: false
history: { enabled: true, retainMinutes: 60 }
Thresholds must be ordered warn < danger < critical. Rate windows use half-open
[start,end) boundaries. Five-minute TPM/RPM values are normalized per minute over a fixed
five-minute denominator, so a single 100-token request contributes 20 TPM and 0.2 RPM to that
window.
refreshSec is bounded to 1–60 seconds and history retention to 1–1440 minutes so configuration cannot exceed the registered one-second event cadence or create an unbounded retention window.
Every HTTP endpoint is authenticated through lubanAuth at /luban-hud/snapshot, /luban-hud/history, and /luban-hud/events.
The event stream uses the registered luban.telemetry.snapshot name and bounded Last-Event-ID replay; a replay gap receives the latest immutable envelope.
Stable message identity deduplicates forked history, and missing usage is reported as unknown rather than guessed.
HudSnapshotResponse.keepalive is an optional compatibility extension. Health changes immediately
publish a new envelope through the same SSE event; M03 diagnostic text is stripped of controls,
redacted, capped, and never persisted by HUD. At most 256 current failures are retained in memory.
The initial Web snapshot and CLI request use a 10-second deadline. Route and SSE
lifecycle checks fail closed if plugin disposal races with authentication or sampling.
Critical Taskboard cards use the fixed hud:context-critical tag and contain only the numeric
context ratio. Calls are serialized so concurrent samples cannot create duplicates; an active card
is reused, and a continuous critical episode is reported once until telemetry recovers.