DSH Plugins Marketplace

DSH Plugins

Plugins

/

@fflow2023/dsh-usage-cost

@

@fflow2023/dsh-usage-cost

Manifest valid

Very lightweight DeepSeek Harness plugin: per-session + global API cost stats with peak/off-peak pricing (DeepSeek V4 Flash / V4 Pro)

UI (client)hasBundlePatch

dsh-usage-cost

一个轻量的 DeepSeek Harness 插件:会话级 + 全局的 API 费用统计。

它是什么

一个只读的费用估算器,把「当前会话累计花了多少钱」并进底部那行 token 统计,再给设置页加一个「全局累计费用」面板。

核心实现只有一件事:一个 session projection 单元,在既有的 session/event 回放驱动上做 O(1) 折叠。所有数字都从持久会话日志重放得出——重启、冷读都能恢复,每个会话各自独立累计。

功能

  1. 会话底部(与 token 统计同一行):… 输入/输出 token | 费用 ¥x.xx(高峰 ¥p / 闲时 ¥o)
  2. 设置 → 费用统计:全局累计费用、高峰/闲时拆分、按模型(V4 Pro / V4 Flash)拆分、按会话降序列表。

安装

标准的 dsh bundle 插件,一条命令永久安装(无需手改任何 cordis.yml):

# 从 GitHub 安装(需要为构建授权一次,见下)
dsh plugin --profile web add github:fflow2023/dsh-usage-cost

# 或发布到 npm 后:
dsh plugin --profile web add @fflow2023/dsh-usage-cost

源码 checkout 环境把命令换成 pnpm dsh plugin --profile web add ...。第一次从 git 安装时,pnpm 会提示把生成的 allowBuilds 键复制进该 profile 的 pnpm-workspace.yaml,然后重跑一次即可。之后 dsh 会把本包追加进 dsh.profile.bundles,host 投影与浏览器半部分(底部费用行 + 设置页)同时生效,重启永久保留。

计费规则

单位:元 / 百万 tokens,按 2026-08-17 00:00(北京时间)生效的峰谷价。来源:DeepSeek 模型 & 价格。

模型时段输入·缓存命中输入·缓存未命中输出
deepseek-v4-flash空闲0.051.54.5
高峰0.103.09.0
deepseek-v4-pro空闲0.154.513.5
高峰0.309.027.0
  • 高峰时段:北京时间 9:00–12:00、14:00–18:00;其余为空闲(高峰的一半)。
  • 高峰/闲时按每次请求的 request/header 时间戳(UTC+8)判定。
  • token 口径:cacheReadTokens → 缓存命中;inputTokens → 缓存未命中(DeepSeek 的 prompt_tokens 已减去命中量);outputTokens → 输出;DeepSeek 不报告 cache-write,按 0。
  • 只对 deepseek-v4-pro 与 deepseek-v4-flash 计费;其它模型计入 unpricedTokens,不静默按错价。

涨价后如何更新

所有价格集中在 index.js 的 PRICES 一处。价格变动时只改这一个文件、bump 版本号即可,无需改其它代码。

轻量设计

  • 纯 JS、零构建、零运行时依赖:没有 TypeScript 构建步骤、没有 prepare 构建脚本,clone 即用。
  • Host:1 个 projection 单元,每个事件 O(1),无额外订阅/定时器/RPC/持久化。
  • Client:2 个 slot 注册,无 store、无副作用、无本地状态。

Model Experience

Request context and condition

What the model sees

本插件不向模型注入任何提示、schema、工具或消息。

Token effect

零直接 token 影响(只读投影)。

KV Cache effect

不影响请求前缀,不使缓存失效。

License

MIT

Comments

Loading…

From the same category

open-design

by nexu-io

🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards,

Development & InfrastructureTerminal & ClientsUI & ExperienceManifest valid

★ 98.6k

Apache-2.0

TypeScript

Sep 29, 2026

Index only — not installable

by Molunerfinn

:rocket: The Ultimate Image Uploader for Efficient Creators. Supports Obsidian, Typora, VS Code etc. and 60+ image hosting services (S3, GitHub, Cloudflare R2, Imgur, Aliyun OSS...). Paste, upload, d

Terminal & ClientsVision & Multimodal

★ 27.3k

MIT

TypeScript

Sep 24, 2026

Index only — not installable

by zhu1090093659

DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop

Tools & CapabilitiesTerminal & ClientsDevelopment & InfrastructureModels & ProvidersUI & ExperienceManifest valid

★ 8.1k

Apache-2.0

TypeScript

Sep 29, 2026

dsh plugin --profile web add dsh-web

by YaoApp

✨ All your agents and workspaces in one place, on every device you own. Track tasks on a board, accessible from desktop, mobile, browser, or API. Self-hosted.

Terminal & Clients

★ 8k

Go

Sep 28, 2026

Index only — not installable

by omdsh-dev

开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git,

Terminal & ClientsUI & ExperienceWorkflow & AutomationManifest valid

★ 3.9k

↓ 49.8k/wk

MIT

TypeScript

Sep 28, 2026

dsh plugin --profile web add dsh-better-sidebar

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsUI & ExperienceManifest valid

★ 3.8k

↓ 10.1k/wk

MIT

TypeScript

Sep 29, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui