dsh-deeptutor
English | 简体中文
A learning-assistant extension for DeepSeek Harness (dsh), Claude Code and pi.
It connects your agent to a HKUDS/DeepTutor
tutoring service, so a session can explain topics in depth, quiz you, plan
learning paths, search your personal knowledge bases, and keep a study
notebook, all without leaving the agent. In dsh it loads as a bundle; in
Claude Code it installs as a plugin; in pi it installs as a pi package. In all
three the same four tools are served over MCP by the bundled server, so the
tools are defined once and only the install differs.
Ask the agent "teach me async/await" and it can run a deep-solve, render the
answer as a self-contained HTML study page you can open in a browser, and
archive a summary into your notebook.
What it adds
Four agent-facing tools that the model uses whenever you ask for learning help:
| Tool | What it does |
|---|
deeptutor_run | Runs one learning capability, e.g. deep_solve (in-depth explanation), deep_question (self-test questions), deep_research, chat, mastery_path (learning-path planning), visualize. Can mount your knowledge bases (kbs) and tools (rag, web_search, reason, code_execution, …); returns a session_id so later turns continue the same context, and can render the answer to an HTML study page. |
deeptutor_kb | Lists, searches, and inspects your personal knowledge bases (RAG) |
deeptutor_note | Archives Markdown study notes (plans, summaries, wrong answers) into a server notebook |
deeptutor_cli | Runs any other DeepTutor CLI command, behind safety tiers (below) |
Following DeepTutor upgrades without plugin releases
The plugin does not mirror DeepTutor's command surface, so a DeepTutor upgrade
that adds commands, capabilities or tools needs no plugin change:
-
Capabilities are discovered at runtime. deeptutor_run takes any
capability name. The plugin reads deeptutor module list (JSON, cached for
five minutes) to learn which capabilities the deployment's ready modules
provide; a capability whose module is not ready fails fast with the reason and
the list of available ones, and names no module lists are passed straight to
the CLI (they may come from a DeepTutor plugin).
-
Every other command goes through deeptutor_cli. The agent discovers
commands from the CLI itself (args: ["--help"], then ["kb", "--help"], …)
instead of a list baked into the plugin. Safety tiers keep the passthrough
honest about commands it has never seen:
| Tier | Commands | Behaviour |
|---|
| read | --help, verbs list / show / info / search / state / status / list-*, doctor, run | runs directly |
| confirm | everything else, including verbs the plugin does not know yet | runs only with confirm: true, which the agent may set only after you explicitly asked for that change |
| blocked | delete, remove*, clear, uninstall, rollback, login, …; interactive or long-running chat / start / stop / serve / init | refused; run them in a terminal yourself |
-
Drift check. Only the few CLI shapes the dedicated tools are built on
(run --format json events, kb search, notebook add-md, module list)
can break the plugin. npm run check:cli checks them against the deployment
your env vars point at; run it after upgrading DeepTutor.
Example session
A typical flow when you ask your agent for learning help:
- Ask — "Explain C# generics covariance using my dotnet knowledge base, and generate a study page."
- The agent grounds the answer in your own material:
deeptutor_kb (action=search, kb=dotnet).
- It runs a deep-solve:
deeptutor_run (capability=deep_solve, kbs=[dotnet], html=/home/me/study/csharp-covariance.html) — the answer comes back and a self-contained HTML page (plus the .md source) is written to disk. The html path must be absolute; relative paths are rejected.
- It files a summary:
deeptutor_note (notebook=dotnet-learning, type=solve).
Nothing here is a fixed script — the agent picks the tools and parameters based
on what you ask for.
A real recording of exactly this flow (deep-solve on the async/await state
machine, mounted on a dotnet-csharp knowledge base, rendered to an HTML
study page, then archived to a notebook):


Requirements