DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Plugin Greptimedb — DeepSeek Harness 插件(DSH Plugin)
← Plugins

@tma1-ai/dsh-plugin-greptimedb

Plugin Greptimedb

DeepSeek Harness 运行在令牌、费用和时间方面的开销。OpenTelemetry 的跟踪、指标和日志存储于 GreptimeDB,并配有七个 Grafana 仪表板。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:tma1-ai/dsh-otel#ebd10b0848a6ee5208ff60c75dc1747322ee58d4
README兼容性版本

兼容性与来源证明

Plugin Greptimedb 以 @tma1-ai/dsh-plugin-greptimedb 发布,当前版本为 0.1.0-beta.4。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/20

版本

0.1.0-beta.4beta
2026/8/28
查看其余 4 个版本收起版本
0.1.0-beta.5beta
2026/9/3
0.1.0-beta.3beta
2026/8/28
0.1.0-beta.2beta
2026/8/25
0.1.0-beta.1beta
2026/8/25

相关插件

正在加载相关插件…

最新版
0.1.0-beta.4
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
Apache-2.0
发布源
github
GitHub
★ 9
周下载
102
最近提交
2026/9/3
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usagedsh Web GUI 的使用统计插件:检测各提供商余额和编码计划配额,并提供实时令牌使用记录,以及当前提供商的专属宠物气泡Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。

README

@tma1-ai/dsh-plugin-greptimedb

English | 中文

What a DeepSeek Harness run costs you in tokens, money, and time, written into GreptimeDB as OpenTelemetry traces, metrics, and logs.

Seven Grafana dashboards read it back. No collector. No sidecar. No fork of DSH. It installs as an ordinary plugin, and every turn, model call, and tool execution becomes a row you can query:

-- Slowest tool calls, with the model that requested them.
SELECT span_name, model, duration_nano / 1000000 AS ms
FROM (
  SELECT span_name, duration_nano,
         MAX("span_attributes.gen_ai.request.model")
           OVER (PARTITION BY trace_id, "span_attributes.dsh.step") AS model
  FROM opentelemetry_traces
  WHERE "span_attributes.dsh.step" IS NOT NULL
)
WHERE span_name LIKE 'execute_tool%'
ORDER BY duration_nano DESC
LIMIT 10;

Overview

Quick start

Requires pnpm 10 or newer. dsh plugin forwards to whichever pnpm is on your PATH, and a dsh profile directory is its own pnpm workspace root. pnpm 9 refuses to install there and ignores the linker settings dsh writes.

Start the database and Grafana. The compose stack under grafana/ brings up GreptimeDB with the seven dashboards provisioned. Grafana reads those dashboards off disk, so fetch that one directory instead of cloning the repository:

curl -fsSL https://github.com/tma1-ai/dsh-otel/archive/main.tar.gz \
  | tar -xz --strip-components=1 dsh-otel-main/grafana
cd grafana && docker compose up -d

Install the plugin. Its defaults point at the database started above, so no configuration is required:

dsh plugin --profile web add @tma1-ai/dsh-plugin-greptimedb

The package ships a bundle patch, so that one command wires it into the profile.

Run DSH and check the data. Traces and logs are written within scheduledDelayMillis, 5 seconds by default; metrics on the next collection period, 30 seconds by default. DSH produces no data while idle, so run a task first:

dsh web

Grafana is at http://localhost:3000, with anonymous admin access enabled and no login required. Start with the Overview dashboard.

For the database alone, GreptimeDB's own console at http://localhost:4000/dashboard/ is enough to check the tables and run ad-hoc SQL:

docker run -p 127.0.0.1:4000-4003:4000-4003 \
  -v "$(pwd)/greptimedb_data:/greptimedb_data" \
  --name greptime --rm greptime/greptimedb:v1.2.0-beta.2 standalone start \
  --http-addr 0.0.0.0:4000 --rpc-bind-addr 0.0.0.0:4001 \
  --mysql-addr 0.0.0.0:4002 --postgres-addr 0.0.0.0:4003

Both bind port 4000, so run one or the other.

Configuration

To point the plugin at your own database, override the row in $DSH_HOME/profiles/<name>/cordis.patch.yml:

- id: greptimedb-otel
  name: '@tma1-ai/dsh-plugin-greptimedb'
  config:
    endpoint: https://<host>/v1/otlp
    database: <dbname>
    username: <user>
    password: <password>

A profile patch replaces the row's whole config instead of merging into it, so restate every field you want to keep.

KeyDefaultNotes
endpoint(required)OTLP base URL, e.g. http://localhost:4000/v1/otlp. The plugin appends each signal's /v1/{traces,metrics,logs} suffix; a per-signal path is rejected at load.
databasepublicSent as X-Greptime-DB-Name.
username / password(none)Basic auth. Both or neither.
signalsall threeAny subset of traces, metrics, logs. A disabled signal builds no exporter.
contentnoneHow much payload may leave the process. See What leaves the machine.
serviceNamedshOTel service.name.
logTable / traceTableGreptimeDB defaultsDestination table overrides.
ttl180dRetention for the log and trace tables this plugin creates, sent as x-greptime-hints. Also accepts forever. GreptimeDB applies it when it auto-creates the table; an existing table keeps its own until ALTER TABLE. Metric tables are not covered — see Known limitations. Set it empty to send no hint and inherit the database default.
shutdownTimeoutMillis3000Deadline for the entire teardown sequence.
metricIntervalMillis30000Metric collection period. Must be at least exportTimeoutMillis.
maxExportBatchSize / maxQueueSize512 / 2048Batch and buffer bounds.
scheduledDelayMillis / exportTimeoutMillis5000 / 30000

Bad configuration fails at plugin load with the offending field named, not at the first export.

Traces

Turn spans are roots. Chat and tool spans hang off them as siblings, correlated by dsh.step:

invoke_agent dsh              turn/start → turn/end
├── chat deepseek-chat        step/start → assistant/message
├── execute_tool bash         tool/call  → tool/result
└── chat deepseek-chat

Every timestamp comes from the session event it belongs to, not from a clock read while the event is being handled.

A chat span closes on one of four paths, each with a defined end time:

SituationEnd timeStatus
Model respondedassistant/messageOK
Stream interruptedassistant/messageOK, plus dsh.response.interrupted
Request failedthat step's step/endERROR, with the error type
No end event (crash, teardown)last event seenUNSET, plus dsh.span.unclosed

Token accounting

DSH's counts are disjoint: inputTokens is uncached input alone, cache reads and writes are separate fields. gen_ai.usage.input_tokens is the billed total, so the plugin exports:

gen_ai.usage.input_tokens  = inputTokens + cacheReadTokens + cacheWriteTokens
gen_ai.usage.output_tokens = outputTokens          (reasoning tokens included)

The breakdown stays queryable as dsh.usage.uncached_input_tokens, dsh.usage.cache_read_tokens, dsh.usage.cache_write_tokens, and dsh.usage.reasoning_tokens.

Metrics

InstrumentTypeDimensions
gen_ai.client.token.usageHistogramgen_ai.token.type (input/output only), model, provider
gen_ai.client.operation.durationHistogramgen_ai.operation.name, model, provider
gen_ai.invoke_agent.durationHistogramgen_ai.operation.name
gen_ai.execute_tool.durationHistogramgen_ai.operation.name, gen_ai.tool.name
dsh.token.detailHistogramdsh.token.detail_kind (cache_read/cache_write/reasoning), model, provider
dsh.tool.invocationsCountergen_ai.tool.name, dsh.tool.outcome
dsh.turns / dsh.stepsCounter

Logs

One record per session event. Four attributes become real columns through X-Greptime-Log-Extract-Keys:

SELECT session_id, event_type, turn, step, body
FROM dsh_logs
WHERE session_id = '...' AND event_type = 'tool/result'
ORDER BY timestamp;

assistant/chunk is never exported; the assembled assistant/message carries the same content.

What leaves the machine

content decides this. The default withholds all payloads.

ModeExported
none (default)Structure and accounting: event types, turn and step numbers, token counts, tool names, durations, outcomes, error name and code.
fullAdds user and assistant message content, tool arguments, tool results.
full+promptAdds request/header: the complete system prompt and every tool schema.

Three things never leave in any mode: a tool's private meta payload, the internal error.message of a failed turn, and the message and stack of a failed request.

The projection is a positive allowlist, so an event type the plugin does not know exports its identity and nothing else. That includes types a future DSH plugin declares.

Dashboards

Seven Grafana dashboards ship in grafana/. The compose stack in Quick start provisions all of them.

Cost

Trace explorer

DashboardAnswers
OverviewHow many tokens, how fast, how much came from cache
CostWhat it cost in money, what the money bought, and why the bill grows
SessionsHow long a conversation ran, how many turns it took, where it failed
Agent loopWhich tools ran, how often they failed, how many model calls a turn needed, where a turn's time went
Trace explorerWhat happened inside one specific turn, span by span
Log explorerEvery session event, filterable by session, type, and full-text search
MetricsThe same activity through PromQL, for longer retention and sampling-proof percentiles

Cost prices the token counts with four rates you set in the dashboard's own variables, per million tokens: uncached input, cache read, cache write, output. The defaults are DeepSeek's published deepseek-v4-flash peak rates in CNY — 3.0, 0.10, 3.0, 9.0. The same rates in USD are 0.44, 0.014, 0.44, 1.32.

The Currency picker changes the symbol every panel formats with, not the rates, so retype those when you switch. Its values are Grafana units, currencyUSD and prefix:¥; another currency is one more option on that variable.

One rate set applies to every selected model, so pick a single model when you run several at different prices. The result is an estimate; it does not account for your contract price or a provider's time-of-day discount.

Every table links onward: a trace id opens that turn's waterfall, a session id jumps between the trace and log views. Every panel query is checked against a live database by node grafana/verify.mjs. See grafana/README.md for the datasource split and grafana/indexes.sql for the indexes these queries want.

With TMA1

TMA1 proxies OTLP into a GreptimeDB it manages. Point endpoint at it and DSH shows up in the OTel GenAI view:

endpoint: http://localhost:14318/v1/otlp

TMA1's tma1_token_usage_1m, cost_1m, latency_1m, and status_1m flow tables derive from span_attributes.gen_ai.*, which this plugin populates by convention.

Development

pnpm test     # unit, profile composition, Loader boot
pnpm smoke    # packaging checks against a freshly packed tarball
GREPTIMEDB_OTLP_ENDPOINT=http://localhost:4000/v1/otlp pnpm test   # adds the live database round trip

Known limitations

  • DSH is pre-release and renames and repackages freely before its first tagged release. The plugin uses the DSH packages for types only and declares no peer range on them, because every DSH version is a prerelease and semver matches no prerelease a range does not name outright. Any range pinned here would fail on the next -rc. The cost is that a rename in DSH does not fail the install; it fails CI, which runs against 0.1.1-rc.2.
  • The published .d.ts imports DSH types. Type-checking this package outside a DSH install needs skipLibCheck on, or the DSH packages installed alongside it.
  • The GenAI conventions are experimental. Names come from @opentelemetry/semantic-conventions/incubating and move with it. Spans carry both gen_ai.provider.name and the deprecated gen_ai.system.
  • ttl does not reach metric tables. Metrics land on the metric engine, where retention is a property of the physical table. The hint reaches the logical table, which stores and displays it but never enforces it (greptimedb#8951). Set it yourself with ALTER TABLE greptime_physical_table SET 'ttl' = '180d'.
  • No per-turn flush. Export follows the batch processors' cadence.
  • Shutdown is bounded. Records in flight when shutdownTimeoutMillis expires may be lost at exit.
  • Subagent sessions get their own trace, not stitched into the parent's.

License

Apache-2.0

Export cadence and per-request deadline.