Study-Mate
Miaotofu01
你的AI学习搭档:定路线、讲知识、做项目,边学边做,学透一门科目
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ZBC-QRLA/dsh-learning-hub
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A local-first learning hub for DeepSeek Harness (DSH).
It turns plain Markdown/JSON files in a _learner directory into:
learning_hub tool for DSH agents;There is no database, no CDN, no telemetry and no cloud dependency. The data stays in your _learner folder and can be read, diffed, backed up and edited by hand.
Status: 0.1.1, early. The data schema and tool actions may evolve. See ROADMAP.
GET /learning-hub/auth redirects through DSH's browser auth and sets an HttpOnly cookie; the panel then loads session/list and session/prompt without manual token handling.seed:true fixture rows stay strict; real record rows use seed:false + a session id + non-placeholder evidence.record creates/reuses a sessions.jsonl row and updates the matching reviews.json entry (due, mastery, interval_days, status, last_reviewed) on every concept update.seed: / 待补充 / 示例: placeholders are rejected before anything is written.learning_hub tool, branch/concept graph, dashboard, records, spaced review, local HTTP API, demo _learner.| Branch tree | Active and planned courses, each with concepts and a next step |
| Concept graph | Prerequisite edges, related edges, mastery colours, click-to-inspect |
| Evidence first | mastery only changes with a record; no silent "I think you know it" upgrades |
| Records | study / practice / exam / review / misconception |
| Review | 1 / 3 / 7 / 14-day schedule; review returns due concepts |
| Routing | cwd, keywords, branch names and concept names → primary/secondary branch + confidence |
| Dashboard | collapsible sidebars, desktop/tablet/mobile layouts, light/dark, no build step |
| Drilldown | click KPI / distribution / stacked bar / hero stats to inspect the concepts behind a number |
| Photo to DSH | compress a photo in the browser and send it to a selected DSH session over same-origin RPC |
| Safe writes | loopback-only HTTP, same-origin writes, realpath containment, 64 KiB body limit, pre-write backups |
| Mixed data | seed fixtures and real record rows can coexist; real rows carry seed:false, session and evidence |
>=0.2.1-rc.3 <0.3.0-0>=20 (DSH ships its own runtime; a standalone Node is useful for tests)# 1. Link the package into a DSH profile
dsh plugin --profile desktop add D:\path\to\dsh-learning-hub
# 2. Point the plugin at your learner data and the bundled panel
# Edit <DSH_HOME>\profiles\desktop\cordis.patch.yml:
- id: learning-hub
name: dsh-learning-hub
config:
dataRoot: 'D:\path\to\learner'
panelDir: 'D:\path\to\dsh-learning-hub\public'
# port: 19480 # optional loopback-only extra port
Restart DSH, then:
learning_hub is available;http://127.0.0.1:<DSH_PORT>/learning-hub/;/api/learning-hub/state, /record, /route.Without any config, the plugin uses the bundled demo:
examples/demo-learner/public/node --test # 35 tests (34 plugin + panel selfcheck)
node test/panel-selfcheck.mjs # 523 panel checks
Open public/index.html via any static server, or install the plugin and open /learning-hub/.
One tool, several actions:
{"action":"status"}
{"action":"route","cwd":"D:/courses/c","text":"pointers and arrays"}
{"action":"record","branch":"cs.c","unit":"pointer","event":"practice","mastery":2,"evidence":"homework-4 Q3"}
{"action":"search","query":"pointer"}
{"action":"review","withinDays":7}
{"action":"link","from":"cs.c.array","to":"cs.c.pointer","relation":"prereq"}
event is study | practice | exam | review | misconception.
evidence is required and must be traceable (homework id, file, session id).
| Route | Method | |
|---|---|---|
/learning-hub |
GET | 302 → /learning-hub/ |
/learning-hub/ |
GET | dashboard |
/learning-hub/auth |
GET | 302 → DSH /?token=…; sets a 30-day HttpOnly cookie |
/learning-hub/<asset> |
GET | static assets |
/api/learning-hub/state |
GET | canonical state |
/api/learning-hub/record |
POST | append a record |
/api/learning-hub/route |
POST | route text/cwd |
All non-loopback requests are rejected. Write requests must be same-origin JSON and are limited to 64 KiB.
_learner/ is the single source of truth:
profile.md
branches.json
concepts.json
progress.jsonl
errors.json
reviews.json
sessions.jsonl
materials/index.md
.backups/ # created by the plugin before writes
A concept has id, name, aliases, branches, prereq, related, mastery (0–5), evidence, misconceptions, sources, next_review, plus seed and mastery_basis in mixed mode.
Prerequisites are directed and acyclic; related links are symmetric.
Seed rows keep seed:true and placeholder evidence; a real record writes seed:false, appends a real evidence string, adds a session, and syncs the matching reviews.json row. See docs/DATA-SCHEMA.md.
_learner.Origin/Referer and JSON.GET /learning-hub/auth (30-day HttpOnly cookie); no token is returned in JSON or stored in _learner..., absolute paths, symlink escapes and NUL bytes are rejected._learner/.backups/.Please read SECURITY.md before exposing the panel through a tunnel or reverse proxy. Authentication is for the local DSH browser only; this is not a multi-user or remote-access product.
node --test # store/router/api/escape tests
node --check public/app.js
node test/panel-selfcheck.mjs
The panel is plain HTML/CSS/JS. There is no build step and no frontend dependency.
The plugin is a normal Cordis package (lib/index.js); edits to lib/ require a DSH restart, panel edits only need a browser refresh.
See CONTRIBUTING.md and docs/ARCHITECTURE.md.
MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: education、learning。