Commit Graph

80 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
0df704075d docs: sync generated HTTP route index with latest dev 2026-12-01 07:50:43 -05:00
Bingxi Zhao (Frank)
2c374446e6 ci(docs): add Cloudflare Workers config and release CD workflow 2026-12-01 07:49:10 -05:00
AleFlyX
b959d0e292 docs: upgrade to Astro 7 and Starlight 0.43 (#2944)
* docs: upgrade the public site to Astro 7 and Starlight 0.43

Update Astro, Starlight and sharp together. Use the same Node 22.23.4 pin for local development, the docs build and Pages previews. The docs workflow checks links against the built HTML.

* docs: follow the shared Node 22 workflow convention
2026-12-01 07:47:42 -05:00
AleFlyX
397b630f72 docs: add a deployment runbook and pre-commit checks (#3017)
* docs: document deployment and add maintenance checks

Add Cloudflare build, deployment, and rollback steps, check locale pairs and Markdown before commits, and report unused public asset candidates. Refs #2942.

* docs: add a Wrangler configuration example

部署手册说明如何从现有 Worker 补齐样板,并核对域名、路由和绑定。

验证:TOML 解析、文档源检查、6 项文档测试和变更文件的 pre-commit 检查通过。

* ci: check the live docs surface on public docs PRs

按路径筛选目标为 feat/public-docs 的 PR,程序或快照变更时校验真实 CLI/API,纯文案跳过运行时依赖。

验证:实测 CLI 与文案分流、命令改名时旧快照失败、重新导出后通过。6 项文档测试和变更文件的 pre-commit 检查通过。

* ci: add a local docs preflight and reuse the surface filters

新增本地检查入口和中文流程说明。允许主动刷新命令清单或构建站点,本地和 CI 共用路径规则,构建后单独校验产物链接。

验证:模拟 CLI 改名和纯文案改动,验证旧示例失败、修复后 6 项测试通过。正常构建通过,坏链接返回 1 并报告具体路径。变更文件的 pre-commit 检查通过。

* docs: keep the preflight instructions in the existing README

* docs: explain how to trigger the first fork preview
2026-12-01 07:46:32 -05:00
Gavin.Guohao.Wu
53dc370f53 docs: restructure quickstart and add model setup guide (#3041)
* Add repository code owner

* ci(maintainers): add maintainer-only Issue/PR slash command workflow

* chore(maintainers): add initial 6 maintainers to allowlist

* ci(labeler): add restrained top-2 PR module auto-labeler

* ci(labeler): enforce v1.7.0 PR ownership and reviewer routing rule

* docs: restructure quickstart and add model setup guide

* ci(labeler): mirror requested reviewers into assignees on PRs

* docs: add screenshots and replace placeholders in getting started and models documentation

---------

Co-authored-by: Bingxi Zhao <150592536+pancacake@users.noreply.github.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: Gavin <Gavin.Guohao.Wu_sa@kingland.com>
2026-12-01 07:46:28 -05:00
eva123abroad-bit
1cc41fccd0 docs: clarify desktop quickstart model setup in English and Chinese
Explain API-key and account sign-in routes, provider-to-model setup,
applying defaults, and a first English-writing learning exchange.
2026-11-27 19:28:39 +08:00
AleFlyX
bc6a11895a test: drop the locale parity check that check_docs.py already runs
docs/scripts/check_docs.py compares the English and zh-cn page sets and runs as
the first step of the same workflow, so keeping a second copy in pytest means
two places to change if the rule ever grows an exemption. The description check
stays: check_docs.py verifies that frontmatter and `quadrant` exist, not that a
page carries a `description`, and both feed the search snippet.
2026-11-26 21:39:31 +08:00
AleFlyX
e4db64b0a2 style: make docs/scripts/check_docs.py lint-clean
`ruff check .` reports I001 and the formatter wants a reformat in the docs
check script added with the site rewrite. The Lint job does not watch docs/**,
so nothing surfaced it; this branch touches tests/**, which makes the job run.
2026-11-26 21:39:05 +08:00
AleFlyX
607b039f2f test: follow the reorganized docs tree
The site now ships 160 pages under new paths (`cli/server-api.md` became
`developers/reference/http-api.md`; partners moved to `channels/`), so the
foreign-API policy still named files that no longer exist and the check
reported three paths it should have exempted and two it should never have
collected.

- Retarget the policy entries to the pages that now document each third-party
  surface: the channel schema page and the msteams guide for `/api/messages`,
  `self-hosting/docker.md` for Ollama's `/api/embed`.
- Add `曾经` to the retired markers. The zh-cn channels page says "伙伴曾经是
  ... 使用 `deeptutor bot` 命令" — without the marker the zh-cn half of the same
  sentence the English half exempts gets reported as a live command.
- Strip inline code that names a repository file before scanning for paths.
  ``deeptutor/api/router_index.json`` and ``deeptutor/api/contracts/turn_protocol.py``
  end in a segment that is indistinguishable from an endpoint, but they are
  files, not routes.
2026-11-26 21:39:05 +08:00
AleFlyX
61e1be8d2f fix: two reference defects the contract tests surfaced
Both are in the rewritten HTTP reference and both are the kind of thing a
reader trusts because the page looks authoritative.

**A path that is not served.** The Partners Manager block lists
`GET /api/channels/schema/schema`; the router mounts `/api/partners/channels/schema`.
Anyone following that table got a 404.

**A heading for a router that serves nothing over HTTP.** `question:router` is
mounted at `/api/question` and owns no HTTP endpoints — its module's endpoints
live on `question_notebook:router`, and the socket half is on `/ws/questions`.
The generator emitted a section with an empty table anyway, so the page
advertised a prefix that answers nothing. Skip routers with no patterns and
regenerate; the heading disappears from both locales.
2026-11-26 21:39:05 +08:00
AleFlyX
ce4cb1d200 docs: say what the invocation scan actually matches
The regex is named FENCED_COMMAND and its comment claims it covers fenced
examples, but it runs over the whole page, so a prose line or a table row that
starts an invocation matches too. That is the behaviour worth keeping — a table
row is as copyable as a code block — so fix the name and the comment instead of
narrowing the scan.

Also record the one thing matches_api_path cannot do: a single-parameter route
absorbs any literal in that slot, so `/api/books/nonexistent` matches
`/api/books/{book_id}`. The surface carries route shapes, not value constraints.
2026-11-26 21:36:32 +08:00
AleFlyX
5958c62bcf ci: run the doc contract tests on docs changes
Nothing ran `pytest docs/tests`. tests.yml does not watch docs/**, and its
python-tests job passes `tests` explicitly, so a pull request that only edits
documentation ran no checks at all and these tests would have rotted exactly
like the ones they replace.

Add a Docs workflow that runs them on any change under docs/, on the surface
exporter, and on the two test files that consume the artifact. It installs
nothing but pytest, which is what the committed artifact buys.

docs/README.md now describes the split: the Starlight build validates links and
stays manual on a docs edit, while the contract tests run in CI and also cover
locale parity, so the manual parity snippet goes away.
2026-11-26 21:36:32 +08:00
AleFlyX
de829d92f5 test: close the doc contract coverage gaps
Five gaps, found while reviewing the first version of these checks against the
real tree. Each one made the tests pass without checking what they claim to.

**The zh-cn mirror was never scanned.** documentation_pages() defaulted to
locale="en" and every caller used the default, so 58 of 116 pages were
invisible. Flipping the default to "all" is the whole fix; the pages that need
one locale pass it explicitly. That surfaced two mentions the English-only
check never saw: the zh-cn server-api page says "旧的 /api/v1/chat … 均已移除",
so RETIRED_MARKERS needs Chinese entries, and the zh-cn partners table says
`deeptutor bot ...` with no English word to match, so an ellipsis now marks a
schematic mention in either language.

**Socket endpoints were not checked at all.** The path pattern only matched
/api/, while cli/server-api.md documents the socket namespace as a nine-row
table — exactly the rows the artifact carries. A renamed socket stayed green.
Both patterns now feed the same test.

**The retired-mention exemption bled across table rows.** A 90-character window
put the "legacy /api/v1/chat … are removed" sentence within range of the live
socket table and silently exempted /ws/partner-groups/{group_id} three rows
earlier. Scope it to the match's own line plus the line above: a table row is
its own claim.

**Trailing braces were eaten.** `/ws/partners/{partner_id}` became
`/ws/partners/{partner_id` and matched only because the matcher tolerates a
placeholder-shaped segment. Strip a dangling opening brace only.

**Locale parity was a manual snippet in docs/README.md.** Make it a test: a
one-sided page does not break the build, it silently serves the wrong language
through the fallback.

Verified on both locales: 116 pages, 855 command mentions, 414 path mentions,
and all 9 artifact socket paths covered by the pages that document them.
2026-11-26 21:35:51 +08:00
AleFlyX
5d6f7ac43c refactor: read the exported surface instead of parsing the source
doc_facts.py rebuilt the CLI and API surface from source with `ast`. Every
registration shape it could not see became either a false report or a silent
skip: `module install/uninstall/enable/disable` were registered in a loop and
looked missing, `skills` (an alias added with a second `add_typer`) and the
manifest-mounted groups looked unknown, and the API reader produced 1415 paths
of which 808 were missing their `/api` prefix, because an APIRouter prefix is
not the mounted prefix. Placeholder-first phantom paths then matched almost any
documented path, which is the only reason the API test passed at all.

Read docs/tests/docs_surface.json instead. It is generated by
scripts/export_docs_surface.py from the live objects and committed, so this
module still imports nothing outside the standard library and the light docs
job still needs no runtime dependencies. 199 lines, down from 365.

The checks also stop looking only at prose. Commands and endpoints are mostly
in fenced examples -- 66% of `deeptutor` mentions and 86% of `/api/` mentions
were in code blocks that the old reader stripped before matching, so the
examples readers copy were never checked:

- fenced lines count only when they invoke the CLI (line start, shell prompt,
  env prefix, command substitution, pipe), so `docker exec deeptutor python`
  (a container named deeptutor) and `DEEPTUTOR_HOME=/opt/deeptutor deeptutor
  start` are not misread;
- the command token class now includes `_`, so `deeptutor run deep_question`
  no longer yields the phantom subcommand `deep`;
- matches cannot span lines, because whitespace is `[ \t]` rather than `\s`;
- the retired-mention exemption now applies to API paths too, which is what
  `cli/server-api.md` needs for its "the legacy /api/v1/chat ... are removed"
  sentence;
- a documented path that is a prefix of a served path matches as a surface
  root ("the `/api/reading` surface"), and `/api/v1` still does not, because
  nothing is mounted under it.

FOREIGN_API_PAGES gains the pages that document someone else's API: provider
base URLs (BytePlus, Zhipu, VolcEngine, OpenRouter, Lemonade), Ollama's
`/api/embed`, and the msteams channel's own Bot Framework server on :3978. An
entry ending in `/` is a prefix and any other entry matches one exact path, so
a bare `/api/v1` base URL does not exempt the whole page.
2026-11-26 21:35:16 +08:00
AleFlyX
140bdc1809 style: sort the imports in docs/tests/conftest.py
`ruff check .` reports I001 here since the file was added, but the Lint job
only runs for paths that include tests/**, so the failure stayed invisible
until this branch started touching tests/. Keep the tree lint-clean before
the doc contract tests start depending on it.
2026-11-26 21:35:16 +08:00
AleFlyX
d518a3c587 feat: export the CLI and API surface the docs are checked against
The doc contract checks need the truth about what the CLI and the backend
actually expose. Reconstructing that from source with `ast` cannot see
registration that only exists at runtime (the imperative
`for action in (...): app.command(action)(...)` loop in deeptutor_cli/module.py,
`add_typer` aliases), so it has to guess and the guesses rot.

Export the surface from the live objects instead:

- CLI: `typer.main.get_command(app)` walks the Click tree, so loop-registered
  commands, aliases and Typer's default naming all come out correctly.
- HTTP: `app.openapi()["paths"]`, which resolves include prefixes and expands
  the lazy router loader.
- WebSocket: FastAPI omits socket routes from OpenAPI, so they come from the
  repo's own `RouterLoader.records` joined with the manifest prefixes.

The artifact is committed at docs/tests/docs_surface.json and rendered
deterministically (sorted, indent=2, trailing newline), so `--check` is a
byte comparison. Nothing reads it yet; the next commits switch the tests over
and add the freshness gate.

20 CLI groups, 610 HTTP paths, 9 WebSocket paths as of this commit.
2026-11-26 21:35:16 +08:00
AleFlyX
3e4d2d848d docs: add doc contract tests
A gate on a different axis from the site's existing structural checks: not
whether files agree with each other, but whether the things the pages *name*
still exist in the code.

Four assertions:

- every `deeptutor <group>` and `deeptutor <group> <sub>` in prose is a
  registered command
- every `/api/...` path in prose is a route the backend mounts
- install pins match `deeptutor/__version__.py`
- every page has a frontmatter description

They parse the source tree with `ast` instead of importing DeepTutor, so CI
needs only pytest and no runtime dependencies. They live under `docs/tests/`
rather than the repository-level `tests/` because `tests/conftest.py` has autouse
fixtures that build the application container, which would pull in the full
dependency set.

Three cases needed explicit handling, documented in the module:

- A third-party endpoint (`/api/v4/users/me` on the Mattermost page) is declared
  per page in `FOREIGN_API_PAGES`. Both the current `partners/` path and the
  reorganized `channels/international/` path are listed, so the check stays
  correct across the docs restructure. A blanket prefix rule would have skipped
  the exact mistake these tests exist to catch.
- A sentence describing a retired command (`deeptutor bot` in the TutorBot
  migration note) is skipped via `RETIRED_MARKERS`.
- A group whose registration cannot be read statically returns `None` and is
  skipped, so an unfamiliar registration shape produces no false report.
2026-11-26 21:34:47 +08:00
Gavin
ab7271b250 fix(docs): remove unbalanced braces and dead rules in landing.css 2026-11-26 15:23:09 +08:00
Gavin
c8c751365a docs: port remaining PR #2923 fixes and provider descriptions after rebase 2026-11-26 15:17:05 +08:00
Gavin
947b374eb6 refactor: remove unused landing page components and social links 2026-11-26 15:11:14 +08:00
Gavin
e89fb064d3 feat: add workflow to post inferred documentation preview comments for fork PRs 2026-11-26 15:11:14 +08:00
Gavin
bba2f9d7a3 ci: add automated github pages deployment for PR documentation previews 2026-11-26 15:11:14 +08:00
Gavin
0bd4eaa5c3 docs: refine tutorial content for clarity and consistency across multiple learning materials 2026-11-26 15:11:14 +08:00
Gavin
c16af712f8 docs: replace TODO comments with corresponding screenshots in learning materials 2026-11-26 15:11:14 +08:00
Gavin
9891b3855f docs: add GIFs update script and enhance documentation with new tutorials for visual learning 2026-11-26 15:11:14 +08:00
Gavin
c9e6133377 docs: enhance learning materials and workspace documentation with new tutorials and improved structure 2026-11-26 15:11:14 +08:00
Gavin
2524de09ac docs: update documentation links and add CI workflow for building and checking the docs site 2026-11-26 15:11:14 +08:00
Gavin
74f29f83a0 docs: refactor documentation structure and content for clarity and organization 2026-11-26 15:09:15 +08:00
AleFlyX
91aa26873b docs: align install, provider and troubleshooting text with 1.7.4
Second batch of accuracy fixes. These are places the docs described
something that is no longer true, rather than examples that fail
outright.

Version. Every page said 1.7.0; the current release is 1.7.4, and
`deeptutor/__version__.py` agrees. The module layout was introduced in
1.7.0 and hasn't changed since (1.7.1-1.7.3 were README and translation
work, 1.7.4 was the desktop signing-key release), so prose now says
"1.7.x family" and the copy-paste pins say 1.7.4. Checked the whole
family is on PyPI at 1.7.4 and that `deeptutor` 1.7.4 still carries the
`full` extra. 1.6.15 stays as the migration source everywhere.

Settings page claimed a `/settings/mcp` redirect that doesn't exist in
`web/next.config.js`, so readers got "This settings page is
unavailable." Points at `/space/mcp` instead, which is where the store
actually lives.

Theme count said four. `AppearanceSettingsSection.tsx` renders five
tiles: System, Default, Cream, Dark, Glass.

Node floor said "20+". `next` in `web/package-lock.json` wants
`>=20.9.0`.

Provider tables were missing whole entries users can configure:
xAI (`provider_registry.py:632`) from the LLM table, Mistral from
embeddings, You.com and Google Browser Scraper from search.

Troubleshooting quoted four error strings that don't exist in the code:
"Address already in use", "Embedding dimension mismatch", "Failed to
fetch /models", and "Cannot decode JWT". Replaced with the real
user-visible wording or the actual symptom, and corrected the
"Re-index now" button label to "Re-index".

All changes applied to English and the zh-cn mirror. Build passes
(117 pages), locale pairing intact, every provider icon reference
resolves to a file on disk.
2026-11-24 23:33:02 +08:00
AleFlyX
7320433b9c docs: fix four accuracy bugs in the public docs site
Four things the docs told users that the code does not do.

`cli/server-api.md`: the WebSocket `start_turn` example was missing
`protocol_version`, so a client copied from it is rejected before the turn
ever starts. Every client frame on `/ws` needs `"2.0"`. The same paragraph
also said `skills` was ignored — it narrows the turn against the workspace
allowlist, so `read_skill` sees the selection, not every visible skill.

Four `/api/v1/...` paths did not exist. DeepTutor mounts no `/api/v1` prefix,
so these 404:

  /api/v1/multi-user/admin/skills/install  ->  /api/multi-user/...
  /api/v1/memory/runs/start                ->  /api/memory/...
  /api/v1/partners/channels/schema         ->  /api/partners/...  (x2 pages)

The third-party URLs in `get-started/providers.md` (OpenRouter, Lemonade)
are left alone — those are other people's `/api/v1`.

`cli/commands.md` and `cli/chat-repl.md`: notebook examples passed the
notebook name where the CLI takes the 8-character id. `add-md` skips the
write on an unknown id and still prints a green success line, so the
example looked like it worked. Now uses an id placeholder and explains
that only `create` takes a name, while `replace-md`, `remove-record` and
`show` exit non-zero.

All four fixes are applied to the English pages and the zh-cn mirror.

Verified with `astro build` (117 pages, clean) and the EN/ZH pairing check
(no orphan files on either side).
2026-11-24 22:45:05 +08:00
Bingxi Zhao (Frank)
9194dbdd53 docs: add public Astro/Starlight documentation site 2026-11-23 23:57:39 -07:00
Bingxi Zhao (Frank)
1ea7df1554 docs: consolidate developer and agent handbook 2026-10-29 00:36:18 +08:00
Bingxi Zhao (Frank)
9189c08501 chore: remove development artifacts and obsolete preview 2026-10-29 00:23:53 +08:00
Bingxi Zhao (Frank)
6bbcc00c55 Merge dev into preview, preserving preview features
Integrate dev fixes with preview's Python/TypeScript schedulers, chat queue, learning navigation, and live turn persistence.
2026-10-27 01:16:58 +08:00
Bingxi Zhao (Frank)
28c11e2ae8 feat: update notes, chat interactions and workspace UI on preview
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.

Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.

Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
2026-10-26 22:13:34 +08:00
yepyhun
ca006fbf7c docs: record demand-driven source preparation boundaries and proof 2026-10-13 12:34:10 +02:00
yepyhun
a15c14bbf9 fix(mastery): describe concept cards as practice with separate gates 2026-10-13 12:31:39 +02:00
yepyhun
3e383c80f4 docs: record source-bound assessment verification and port boundaries 2026-10-13 12:21:31 +02:00
Bingxi Zhao (Frank)
1e7eef0e9a feat(research): add grounded scientific primitives and scoped private MCP origins (#1629) 2026-10-08 10:05:38 +08:00
Bingxi Zhao (Frank)
7885daa98a feat(plugins): add reviewed managed lifecycle and revocable runtime gates (#1307)
Adapt the Phase 1 foundation from PR #1309 and complete scoped API lifecycle, pre-import approval, artifact-bound revocation, recovery, bounded workers and frontend isolation. Keep the stronger ecosystem roadmap explicit in the RFC.

Co-authored-by: XZH <cto@xzh.ai>
2026-10-08 08:50:05 +08:00
Bingxi Zhao (Frank)
e79e1b0ad2 fix(knowledge): make long-document indexing recoverable and publication verified (#1612) 2026-10-08 08:10:40 +08:00
Bingxi Zhao (Frank)
13fe793443 docs(events): distinguish handler isolation from durable replay 2026-10-07 20:27:15 +08:00
evan188199-tech
981b5cf2a8 docs(events): add event and progress chain guide (#1717)
Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:23:41 +08:00
evan188199-tech
b43ee62e24 docs(tools): add tools surface guide (#1716)
Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:23:31 +08:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00
evan188199-tech
0f8759f730 feat(watching): browse connected Invidious accounts (#1241) 2026-09-11 04:39:34 +08:00
Bingxi Zhao
269f65dede feat(subagents): add hardened remote Hermes backend (#1213) 2026-09-03 16:24:34 +08:00
Bingxi Zhao
c45f0ec58b refactor(video-learning): separate Invidious account adapters (#1211) 2026-09-03 16:04:57 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
23a5e0601d chore(web): enforce v2 frontend release gates 2026-09-01 21:18:47 +08:00