dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:5yeah/Aiscribe
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Daily reports, weekly reports, quarterly reviews, year-end summaries — screw them all!!!!! You really think your manager reads them closely? A pure waste of life!!! Pointless burning of brain cells!!!!!! You're already working with AI — just let AI write the reports. Stop thinking about them!!!!!! Broke? Then grab free eggs everywhere you can 🥚 — AI chat logs are scattered all over the place, and asking a single AI to write them can't even keep a consistent format or content. Now they're all pooled together and generated in one go!!!
Local-first, privacy-first. Searches all AI coding/chat tool sessions on your own machine, groups them by project, and turns them into daily/weekly reports (Markdown / Word / HTML) — exposed to any AI client as an MCP server.
The MCP tools fetch every real message you sent today; your AI assistant reads them and writes the report. That division of labour is why the output is far better than template-only reporting.
English | 简体中文
Your day is scattered across several AI tools: code edits in an IDE, debugging in a chat window, design notes in another tool. When report time comes you reconstruct it from memory — mixed-up projects, wrong dates, vague summaries.
Aiscribe splits the job into three steps:
1、Project / ①、Topic layout with a detailed version + a short version,
written to local reports/ as md, docx, or a self-contained shareable html page.No AI? The local template still produces a draft. The tool never pretends to summarise — a draft is labelled as a draft.
docx/xlsx/pptx/md/txt, shown only on the local detail page (AIREREPORT_RECENT_PREVIEW=0 disables it entirely).<data dir>/cache/,
stays on this machine, and can be deleted at any time.projects.json) → title hints → cwd's last path segment
fallback; new projects need zero config.get_conversations never returns them, so the AI cannot write them back in.--format docx, hand-rolled WordprocessingML),
and a shareable HTML page (--format html, one self-contained file: inline CSS, no JS, no external assets).reports/.--llm, DeepSeek-compatible, or local Ollama): the model may only rewrite each item's
text. The report skeleton is machine-built and every reply must pass a structure/format check, otherwise it
falls back to the template silently.list_sources, get_conversations, generate_report, save_report,
list_templates, get_format_spec, save_template; TRAE, Claude Code, Cursor and dsh all work.dsh-aireport) from the DSH plugin market; the package bundles a
Windows sidecar, so no Python install is required. Start a new session and the agent has every tool.
Source and standalone MCP setups still work.ui.py's server is still stdlib, but the
page pulls Tailwind / React / Framer Motion / Babel from a public CDN, so the first load needs internet.
Offline it shows an explicit notice pointing at the CLI or MCP instead of a blank page.# 0) Python 3.9+, no pip install needed
git clone https://github.com/5yeah/Aiscribe.git
cd Aiscribe
# 1) See which data sources were auto-discovered on this machine
python -m ai_report sources
python -m ai_report config
# 2) Template-only report first (no AI needed)
python -m ai_report daily --date 2026-10-16
# 3a) Recommended: open the local guide page (scan → pick → generate, or copy an instruction)
python -m ai_report ui
# 3b) Or wire the MCP server + Skill into your AI client
Search for Aiscribe (dsh-aireport) in the DSH 0.2.x plugin market and install it, then start a
new session. Or use the CLI:
dsh plugin --profile web add dsh-aireport
0.2.0 bundles a Windows x64 runtime only; macOS/Linux builds will ship as separate platform packages.
Reports and config live in ~/.aireport/. See dsh-plugin/README.md.
python -m ai_report ui # port 5071, opens your browser
python -m ai_report ui --port 5080 --no-open
Bound to 127.0.0.1 only. Six screens: splash → four steps → generating screen.
The generating screen offers two ways out:
reports/ locally,
filtered by your ticks and trims. The page shows the file name, path and open/download links. Only if you
manually tick “AI polish” and have an engine configured does the draft text (daily summaries plus,
when available, up to 120 chars of the AI reply — not the full transcript) go to the model. The page states
plainly whether the body was summarised or is still the raw template draft.
With no engine configured it does not pretend to summarise — it falls back and says why.save_report.The wizard only shows the material for the day you picked. To browse all history, hit
“浏览历史会话” in the top-right corner, or open http://127.0.0.1:5071/browse directly:
/ to focus, Esc to close)/browse?id=dsh|session-xxxxA long session often mixes yesterday's leftovers with today's work. In the guide page click the ✂ button
on a session chip and set a start/end time. Everything outside that window is dropped inside the tool —
get_conversations simply never returns it, so the AI cannot write it back in. The preview and the material
handed to the AI stay in sync, and a 已剪辑 badge marks the chip (清空全部剪辑 undoes everything).
Times are Beijing time; an end earlier than the start means an overnight window (e.g. 22:30 ~ 02:00);
segments without a timestamp are always kept. Trims live in <data dir>/trims.json (the repo root when
running from source, ~/.aireport when installed; override with AIREREPORT_TRIMS, gitignored).
python -m ai_report learn old-daily.md --name my-format # learn from one sample
python -m ai_report learn a.md b.docx --name my-format # several samples vote on the common layout
python -m ai_report templates # list what has been learned
python -m ai_report daily --date 2026-10-16 --template my-format
save_template MCP tool.get_format_spec injects the spec into the prompt; primary) and the CLI
path (--template styles the template-only output).templates/*.json (override with AIREREPORT_TEMPLATES_DIR, gitignored); set
AIREREPORT_TEMPLATE to choose which one is active by default.Summarisation only happens on the already-collapsed draft level: the draft is locally assembled
(e.g. CodeBuddy CN's real input timeline for the day, each entry capped at 400 chars) and may append up to
120 chars of the assistant's conclusion when one exists. It is not the full transcript, but it does
contain fragments of your own input — decide accordingly before enabling it. Configure it via a gitignored
llm.json or the matching environment variables:
{ "provider": "deepseek", "model": "deepseek-chat", "api_key": "sk-..." }
DEEPSEEK_API_KEY, or put it in llm.json"provider" to "ollama" and point "model" at a model you have
pulled locally (e.g. qwen3.8:27b); talks to http://127.0.0.1:11434, no key neededpython -m ai_report daily --llm (falls back to the template on failure)MCP config (point the args at your clone):
{
"mcpServers": {
"aireport": {
"command": "python",
"args": ["<repo>/run_mcp_stdio.py"]
}
}
}
Skill: copy skills/ai-report/SKILL.md into your client's skills directory
(TRAE: .trae/skills/; Claude Code: ~/.claude/skills/).
Then just ask: "Generate my report for today."
The AI runs list_sources → get_conversations (overview, then per-project detail) → summarise → save_report.
Client-by-client setup and known pitfalls (including TRAE's space-splitting command) live in
mcp/README.md (Chinese).
flowchart LR
subgraph L1["L1 Connectors (local files only, offline)"]
A1[CodeBuddy CN / TRAE] --> U[UnifiedRecord]
A2[Codex / dsh / Claude Code] --> U
A3[Gemini CLI / Qwen Code / iFlow] --> U
A4[Copilot Chat / Cline / Roo / Kilo / Cursor] --> U
A5[Doubao / WorkBuddy / Kimi] --> U
A6[Recent files (document activity)] --> U
end
U --> L2["L2 Index: merge / dedupe / classify / date filter"]
L2 --> MCP["MCP: get_conversations returns raw chats"]
MCP --> AI["Client AI reads & summarises"]
AI --> SAVE["save_report → md / docx / html"]
L2 --> TPL["generate_report (template-only fallback)"]
TPL --> OUT["reports/"]
SAVE --> OUT
| Layer | Responsibility |
|---|---|
| L1 connectors | Normalise each tool's raw data into UnifiedRecord; per-message text goes into raw["messages"] |
| L2 index | Merge/dedupe, project classification, Asia/Shanghai “today + overnight ≤ 1 day” filtering |
| L3 generation | Template rendering (generate_report) — no understanding, just listing; used for quick previews and as a fallback |
| Summarisation | Done by the client AI after get_conversations (the key part of this design) |
| L4 optional | LLM polish (--llm), Word / shareable HTML export |
One file, two versions — detailed on top, a --- separator, short version below.
# AI 日报 2026-10-16
**汇报人:** 张三 | **部门:** 算法组 | **日期:** 2026年10月16日
> 数据来源:CodeBuddy CN 当日真实发送消息(127 条逐条输入)、TRAE 本地记忆、豆包(本地聚合,隐私优先)
**1、订单服务(重构下单链路,09:06–18:20):**
①、接口契约梳理:确认 v2 字段清单并落成 contracts/order.md。
②、超时问题定位:定位到连接池配置过小,改为 20 后压测回归通过。
**2、数据看板:**
①、新增日活趋势图,支持按渠道筛选。
**3、待办事项:**
①、订单服务:连接池压测报告归档。
---
# AI 日报(简洁版)2026-10-16
**1、订单服务:**
①、接口契约梳理
②、超时问题定位
**2、数据看板:**
①、新增日活趋势图
Rules (hard-coded in the Skill): projects use **1、Name:**, topics use ①②③; the short version drops
the parenthetical context and keeps only the text before the : of each detailed bullet.
python -m ai_report daily [--date YYYY-MM-DD] [--llm] [--out FILE] [--format md|docx|html] [--template NAME]
python -m ai_report weekly [--date YYYY-MM-DD] [--template NAME]
python -m ai_report range --start YYYY-MM-DD --end YYYY-MM-DD [--template NAME]
python -m ai_report sources
python -m ai_report config
python -m ai_report learn SAMPLE... [--name NAME] # learn a layout from past reports
python -m ai_report templates # list learned format templates
python -m ai_report mcp --stdio # MCP stdio (for AI clients)
python -m ai_report mcp --port 5070 # optional local HTTP, 127.0.0.1 only
python -m ai_report ui # local guide page, 5071, loopback only
Windows helpers: scripts/run_daily.bat / scripts/run_weekly.bat;
scheduling example: automation_example.json.
All connectors are native: they read each tool's own local files, so no Cass-style indexer and no extra
packages are needed. The only exception is zstd-compressed sessions (Codex, dsh): with zstandard installed
or a zstd binary on PATH you get the full text; without either they degrade to metadata-only — never an
error, never a crash.
| Source | Auto-discovered location | What is available locally |
|---|---|---|
| CodeBuddy CN | %APPDATA%/CodeBuddy CN/ |
Session metadata + raw sent inputs via onAgentStart: userInput= in logs (user side only) |
| TRAE | ~/.trae-cn/memory/projects/ |
Per-message summaries + topics.md session summaries |
| Codex | ~/.codex/ |
state_5.sqlite metadata + projected history / rollout-*.jsonl.zst user and assistant turns |
| dsh | ~/.dsh/sessions/ |
Per-message user and assistant turns from the session.v4.jsonl.zstd event stream |
| Claude Code | ~/.claude/projects/ |
**/*.jsonl user/assistant turns (sidechains and local-command noise skipped) |
| Gemini CLI | ~/.gemini/tmp/*/chats/ |
session-*.json user/model messages |
| Qwen Code | ~/.qwen/tmp/*/chats/ |
Same format (Gemini CLI fork) |
| iFlow | ~/.iflow/tmp/*/chats/ |
Same format (Gemini CLI fork) |
| Copilot Chat | %APPDATA%/Code/User/workspaceStorage/*/chatSessions/ |
VS Code built-in chat *.jsonl: prompt + response parts |
| Cline | …/globalStorage/saoudrizwan.claude-dev/tasks/ |
api_conversation_history.json user/assistant messages |
| Roo Code | …/globalStorage/rooveterinaryinc.roo-cline/tasks/ |
Same format (same lineage) |
| Kilo Code | …/globalStorage/kilocode.kilo-code/tasks/ |
Same format (same lineage) |
| Cursor | %APPDATA%/Cursor/User/globalStorage/state.vscdb |
cursorDiskKV composerData:* + typed bubbleId:* |
Every message carries a role: user is what the person asked, assistant is what the AI concluded or
changed. “What was done” in a report comes from the assistant side — never rewrite the question into a
past-tense claim.
| Source | Auto-discovered location | What is available locally |
|---|---|---|
| Doubao | %LOCALAPPDATA%/Doubao/User Data/Default/IndexedDB |
Titles and timestamps (LevelDB / V8 blobs) |
| WorkBuddy | ~/.workbuddy/workbuddy.db |
Titles and timestamps (cwd is its own workspace dir) |
| Kimi | %APPDATA%/kimi-desktop/ |
Metadata + edited file paths (used to locate the project dir) |
| Source | Auto-discovered location | What is available locally |
|---|---|---|
| Recent files | %APPDATA%/Microsoft/Windows/Recent/ |
Which documents were opened today (full path and open time; for .docx/.xlsx/.pptx also the last-saved time and author); docx/xlsx/pptx/md/txt can yield a first-2,000-character preview |
Only doc/docx/xls/xlsx/ppt/pptx/md/txt are collected (AIREREPORT_RECENT_EXTS to adjust). Entries are
merged per file per calendar day and count repeated opens; unparseable shortcuts fall back to the file name.
The preview is shown locally on the detail page; a report includes the first 160 characters only when you
tick "reference document previews". Legacy .doc/.xls/.ppt files contribute metadata only.
Every path is derived from %APPDATA% / %LOCALAPPDATA% / the user profile — no hard-coded usernames —
and each can be overridden by an environment variable (see python -m ai_report config).
| Env var | Purpose | Default |
|---|---|---|
AIREREPORT_HOME |
Data directory (reports, templates, config, trims, cache) | repo root from source; ~/.aireport when installed |
AIREREPORT_REPORTS_DIR |
Report output directory | <data dir>/reports |
AIREREPORT_TEMPLATES_DIR |
Learned format templates directory | <data dir>/templates |
AIREREPORT_TEMPLATE |
Default active format template | newest learned template |
AIREREPORT_TRIMS |
Session time-trim file | <data dir>/trims.json |
AIREREPORT_PROJECTS |
Project classification rules | <repo>/projects.json, then ~/.aireport/projects.json, then built-ins + cwd fallback |
CODEBUDDY_CN_DB … VSCODE_GLOBAL_STORAGE |
Override a source path (multi-dir values use ;) |
Auto-discovered |
AIREREPORT_SCAN_ALL_USERS |
Set 1 to also read other Windows users' session dirs on this machine |
Off — other people's sessions are not read by default |
AIREREPORT_RECENT_DIR AIREREPORT_RECENT_EXTS AIREREPORT_RECENT_EXCLUDE |
Recent-items dir / extension whitelist (; or , separated) / excluded path prefixes (; separated) |
Auto-discovered Recent; extensions default to doc;docx;xls;xlsx;ppt;pptx;md;txt; nothing excluded |
AIREREPORT_RECENT_BASENAME |
Set 1 to show only file names in reports |
Full paths are shown by default |
AIREREPORT_RECENT_PREVIEW |
Set 0 to disable document previews (no document is opened) |
On; first 2,000 characters |
AIREREPORT_RECENT_PREVIEW_CHARS |
Preview character cap | 2000 (range 100–20000) |
AIREREPORT_CACHE_DIR |
Parse cache directory (lnk targets and previews) | <data dir>/cache; delete it to clear |
DEEPSEEK_API_KEY, LLM_PROVIDER |
Optional LLM polish | --llm falls back to template mode |
Copy projects.example.json to projects.json to pin your own project names.
get_conversations(detail="full") is effectively sending those transcripts to that model provider.
The server tells models to start with detail="summary" and to read only the projects/dates neededAIREREPORT_SCAN_ALL_USERS=1docProps/core.xml),
and by default a first-2,000-character preview of docx/xlsx/pptx/md/txt, shown only in the local
detail page. Previews are not included in MCP responses; a report includes the first 160 characters only
when you tick "reference document previews". Set AIREREPORT_RECENT_PREVIEW=0 to never open documents.
Reports show full paths by default; set AIREREPORT_RECENT_BASENAME=1 to hide directories or
AIREREPORT_RECENT_EXCLUDE to skip sensitive folders<data dir>/cache/ on this machine; delete that folder
to clear them--llm / UI tick / polish=true).
The full raw transcript is not sent by the summariser itselfreports/; both the optional HTTP mode and the guide page bind to 127.0.0.1 onlyHost and Origin and reject anything that is not a loopback,
same-origin request — this blocks DNS rebinding (a domain pointed at 127.0.0.1 driving your local port).gitignore excludes reports/, projects.json, trims.json, dingtalk_config.json,
automation.json, and cache/zstandard or a zstd binary you get the text, otherwise the connector
degrades to metadata..doc/.xls/.ppt
files are not opened at all.ai_report/ core package (stdlib only)
connectors/ L1: base / common / codebuddy_cn / trae / codex / dsh / claude_code /
gemini_cli / vscode_chat / cline / cursor / doubao / workbuddy / kimi /
recent_files / registry
index.py L2: merge, dedupe, classify, date filter, shared window/payload helpers
cache.py parse cache: lnk targets and document previews keyed by file fingerprint
generator.py L3: daily/weekly/range templates (can follow a learned layout)
template.py format cloning: extract layout from past reports, store specs for the AI
trim.py session time trimming: window parsing, segment clipping, trims.json store
html.py docx.py exports: self-contained shareable page / Word
llm.py L4: optional synthesis (rewrites item text only, must pass format check)
cli.py mcp_server.py
ui.py web/ local guide page: stdlib HTTP server + six-screen wizard UI (frontend via CDN)
skills/ai-report/ SKILL.md — the summarisation methodology and output spec
mcp/ client setup guides
docs/ data-source adapters, and the full build prompts for this project
examples/ connector_template.py
scripts/ Windows one-click scripts
tests/ unittest suite
run_mcp_stdio.py MCP stdio launcher (stable path for client configs)
reports/ generated reports (auto-created, gitignored)
templates/ learned format templates + archived samples (auto-created, gitignored)
trims.json guide-page time trims (auto-created, gitignored)
cache/ parse cache (auto-created, gitignored)
python -m unittest discover -s tests -t .
docs/数据源适配.md (Chinese) and the template in
examples/connector_template.pyskills/ai-report/SKILL.mddocs/BUILD_PROMPTS.md is the full prompt set that
produced this projectCLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。