dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Andromder/dsh-task-budget
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness plugin with a left-sidebar panel for per-task spend, a per-task cost cap, and a live budget brief that is generated for the model on every turn.
ask_user_question, and every tool except ask_user_question is denied until
a human answers. One reply of yours buys a full continuation allowance: the
cap becomes at least spent + continuationStepCny.$DSH_HOME/budget-guard/grants.json, so a plugin/Host restart does not ask
again for a task you already approved.The prompt has two sections:
Rules (budget-guard:rules, static): real rates, the money scale
(¥0.05 ≈ 1 short answer, ¥0.15 ≈ 2-3 calls, ¥0.30 ≈ 5 calls,
¥0.50 ≈ 8-10 calls, ¥1 ≈ 15 calls), and the shortest-path discipline.
Task brief (budget-guard:brief, dynamic, per answering agent): rebuilt
for every step with live numbers:
【本任务预算简报 · 自动生成,优先级高于其他计划】
上限 ¥2.306|已花 ¥1.306|剩余 ¥1.000|谷时|平均每次调用 ¥0.050(约可再调用 20 次)
本轮请求:把左侧栏入口的价格显示改成“元/百万 token”…
判定:小改动(精简执行)|本轮上限:4 次调用 / 1 个文件
策略:精简执行。直接改完并做 1 次最小验证;最多 4 次调用、1 个文件。
硬约束:以上次数/文件数是硬上限…;不扫描全仓库…
All local and free (no extra model call):
重构/迁移/全量 weigh 2; 新增/实现/修复/测试/文档
weigh 1), multi-file phrases, and whether it is a pure question.
Result: answer | small | feature | large.affordable = floor(remaining / avg)
and pick a strategy — full, lean, minimal, diagnose (diagnose only,
no edits), answer (no tools), or stop (not enough for one call).The model therefore sees not just "the cap is ¥0.5", but "you have ¥1.00 left, about 20 calls, this request is a small change, use at most 4 calls and 1 file".
The panel writes $DSH_HOME/budget-guard/settings.json:
{
"enabled": true,
"capCny": 0.5,
"continuationStepCny": 0.5,
"warnRatio": 0.8,
"inputIncludesCache": true,
"peakWindows": [{ "start": 1, "end": 4 }, { "start": 6, "end": 10 }],
"holidays": [],
"models": {}
}
peakWindows uses UTC hours (1–4 and 6–10 are 09:00–12:00 and
14:00–18:00 Beijing).models overrides rates, e.g.
{"deepseek-flash": {"offPeak": {"cacheHit": 0.02, "cacheMiss": 1, "output": 4}, "peak": {"cacheHit": 0.04, "cacheMiss": 2, "output": 8}}}.
A model entry with only cacheHit/cacheMiss/output is priced flat.inputIncludesCache follows DeepSeek accounting: inputTokens already
contains cache-hit tokens, so the miss count is input - cacheRead - cacheWrite.assistant/message usage events, priced at each
call's own timestamp (peak/off-peak), so it is reconstructable from the log.
Historical sessions are read on demand (the newest 12 are queued when the
panel opens; older rows compute when opened) and cached in memory.子任务 badge.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。