rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:machine202502/dsh-pricing
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek peak hours, live token prices and the real spend of every chat — right in the DSH session header, plus a full spending analytics page.
The chip answers one question: is it expensive right now, and until when. It is shown only for the official DeepSeek provider; other providers and local models get no chip at all.
Plugin Creator ⚙ Standard mode [ ● сессия $1.60 ] 📁 ⋯
during peak hours:
[ ● ПИК · сессия $1.60 · до 09:00 ]



● сессия $1.60).
During peak hours it turns red and adds ПИК plus the end time; the chip label
stays in the plugin language.%LOCALAPPDATA%\dsh-pricing\settings.json.Strings live in client.js (STRINGS.ru|en|zh), plugin-list titles in
locale/*.json. The language is switched in Plugins → dsh-pricing and written
to the same settings file. Precedence: the stored setting (ru, en, zh) →
auto, which follows document.documentElement.lang / navigator.language →
the default ru.
https://api-docs.deepseek.com/quick_start/pricing.md — the docs page is available
as markdown, so it is parsed without an HTML parser.
The host half:
refreshHours (6 by default) and parses the PRICING
table and the Peak hours are … sentence;peak ≥ off > 0.
An incomplete table is rejected and the previous snapshot stays;%LOCALAPPDATA%\dsh-pricing\prices.json;127.0.0.1:49237 (/state, /refresh, /settings,
/analytics, /session-cost, /health);%LOCALAPPDATA%\dsh-pricing\plugin.log.data/pricing.json ships as a reference snapshot, so the plugin works offline and
on the very first start.
The provider returns tokens, not money. Spend is therefore computed from the
actual tokens in the durable session log: every assistant/message and
compaction/summary record with usage (uncached input, cache reads, cache
writes, output) is priced with the tariff in force at that record's own
timestamp — peak or off-peak. Old peak turns stay priced at the peak rate even
when the current period is off-peak.
Parsed logs are cached by path/size/mtime, so polling never re-reads an unchanged file. The chip shows the session cost; the card shows the same number with a token breakdown.
The card has two slices: Session (the whole chat) and Since the last reset (only what accumulated after pressing «Reset»).
%LOCALAPPDATA%\dsh-pricing\resets.json and
survive restarts.Peak windows are stored in the publishing zone (peak.tz, currently UTC),
compared as absolute instants through Intl, and displayed in your local zone.
DeepSeek peaks: 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday, excluding
Chinese public holidays; for UTC+5 that is 06:00–09:00 and 11:00–15:00.
Holidays are a list of ISO dates in peak.holidays (empty by default: the provider
publishes no machine-readable calendar, dates are added by hand).
The Spending section in the sidebar is a dedicated page:
The host keeps an index in %LOCALAPPDATA%\dsh-pricing\analytics.json: per log the
size, mtime and a compact record list. Only changed logs are reparsed; the build
runs in the background, and a five-minute pass keeps the index close to the live
logs.
delegationDepth > 0).They are different things and never mixed in the UI.
A session started by a sub-agent is its own chat with its own log. The plugin treats it as part of the chat that spawned it:
A fork copies the parent history, and its log contains the same usage records
with the original timestamps. Those requests were already paid in the parent, so
the analytics never bills them twice:
identity.inheritedEventCount), the parent id from the log header
(parentSession);seq is at or below that count are aggregated as inherited;If the parent log was deleted, its part is simply absent — only what exists on disk is counted.
Every session row may carry an open arrow (↗) and the card has an «Open session» button, but only for sessions present in the live DSH sidebar and not archived. Sessions that are archived keep their row with an «archive» badge and no link at all; clicking does nothing, so a removed or archived session can never open a blank chat.
Log parsing, per-request tariff pricing and the inherited-prefix split live in one
module, ledger.js. Both the header chip (/session-cost) and the spending page
(/analytics) read through it, so the numbers agree everywhere.
dsh plugin --profile desktop add github:machine202502/dsh-pricing
# bundle name: @machine202502/dsh-pricing
cordis.patch.yml)- id: pricing
name: 'dsh-pricing'
config:
bridgePort: 49237
refreshHours: 6
sourceUrl: 'https://api-docs.deepseek.com/quick_start/pricing.md'
officialProviders: [deepseek-official, deepseek-account]
models: [deepseek-flash, deepseek-v4-flash, deepseek-v4-pro]
deepseek-official is the route DSH ships for new sessions; deepseek-account
serves the signed-in account. Both bill the official rates, so the plugin always
accepts them, and a config that names only one cannot hide the chip.
peak.holidays when needed.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-api、deepseek-harness。