chore: rename internal docs/ to dev-docs/ and prepare docs site merge

Move the 27 internal design docs (87 tracked files) from docs/ to dev-docs/
to make room for the public documentation site, adjust Docker/fnOS ignores,
refresh the README/AGENTS/ARCHITECTURE references, and land the docs
workflows ahead of the subtree import so they cannot diverge from mirror.

Co-Authored-By: Mika (Multica) <[email protected]>
Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
RockChinQ
2026-10-27 08:04:20 +00:00
co-authored by Mika multica-agent
parent a89ddf12e1
commit 0582d1b3d4
109 changed files with 339 additions and 17 deletions
+9
View File
@@ -12,3 +12,12 @@ __pycache__
web/.next
web/node_modules
web/.env
# Documentation site dependencies and generated output
docs/node_modules/
docs/.next/
docs/dist/
docs/.fumapress/
docs/.waku/
docs/content/
docs/public/
+29
View File
@@ -0,0 +1,29 @@
name: Docs tests
on:
pull_request:
paths: ['docs/**', '.github/workflows/*docs*.yml', '.github/workflows/sync-*.yml']
workflow_dispatch:
permissions:
contents: read
jobs:
docs:
name: Fumapress docs build
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
cache-dependency-path: docs/package-lock.json
- run: npm ci
- run: npm run typecheck
- run: npm test
- run: npm run build
+62
View File
@@ -0,0 +1,62 @@
name: Sync LangBot Blog articles
on:
workflow_dispatch:
schedule:
- cron: '17 2 * * *'
permissions:
contents: read
concurrency:
group: sync-langbot-blog-articles
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/main' && vars.DOCS_MIRROR_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: docs
steps:
- name: Check out main
uses: actions/checkout@v5
with:
ref: main
fetch-depth: 0
# A PAT push triggers the mirror and Wiki workflows; GITHUB_TOKEN does not.
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
cache-dependency-path: docs/package-lock.json
- run: npm ci
- name: Check out LangBot landing page
uses: actions/checkout@v5
with:
repository: langbot-app/langbot-landing-page
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
path: .article-source
persist-credentials: false
- name: Synchronize articles and images
run: node scripts/sync-blog-articles.mjs --source ../.article-source
- name: Validate generated articles
run: |
node scripts/sync-blog-articles.mjs --check --source ../.article-source
node scripts/sync-blog-articles.mjs --check
npm test
npm run build
- name: Commit synchronized content
run: |
git add docs.json en/articles zh/articles ja/articles images/articles scripts/blog-articles-manifest.json
if git diff --cached --quiet; then
echo 'LangBot Blog articles are already synchronized.'
exit 0
fi
git config user.name 'langbot-docs-bot'
git config user.email '[email protected]'
git commit -m 'docs(articles): sync LangBot Blog'
git push origin HEAD:main
+90
View File
@@ -0,0 +1,90 @@
name: Sync GitHub Wiki
on:
push:
branches: [main]
paths:
- "docs/en/**"
- "docs/zh/**"
- "docs/ja/**"
- "docs/scripts/build-github-wiki.py"
- ".github/workflows/sync-github-wiki.yml"
pull_request:
paths:
- "docs/en/**"
- "docs/zh/**"
- "docs/ja/**"
- "docs/scripts/build-github-wiki.py"
- "docs/tests/test_build_github_wiki.py"
- ".github/workflows/sync-github-wiki.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-langbot-github-wiki
cancel-in-progress: false
jobs:
build:
defaults:
run:
working-directory: docs
name: Build Wiki mirror
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Run converter tests
run: python -m unittest tests/test_build_github_wiki.py
- name: Build Wiki pages
run: python scripts/build-github-wiki.py --output dist/github-wiki
- name: Validate generated pages
run: |
test -f dist/github-wiki/Home.md
test -f dist/github-wiki/_Sidebar.md
test "$(find dist/github-wiki -maxdepth 1 -name '*.md' | wc -l)" -gt 250
- name: Upload generated Wiki
uses: actions/upload-artifact@v7
with:
name: github-wiki
path: docs/dist/github-wiki
if-no-files-found: error
sync:
name: Publish to LangBot Wiki
if: github.event_name != 'pull_request' && github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/main' && vars.DOCS_MIRROR_ENABLED == 'true'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/download-artifact@v8
with:
name: github-wiki
path: generated
- name: Clone target Wiki
env:
WIKI_PUSH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: |
test -n "$WIKI_PUSH_TOKEN"
git clone "https://x-access-token:${WIKI_PUSH_TOKEN}@github.com/langbot-app/LangBot.wiki.git" target
- name: Replace and publish Wiki contents
env:
SOURCE_SHA: ${{ github.sha }}
run: |
find target -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
cp -a generated/. target/
cd target
git add -A
if git diff --cached --quiet; then
echo "GitHub Wiki is already up to date."
exit 0
fi
git config user.name "langbot-docs-sync[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "docs: sync from LangBot/docs@${SOURCE_SHA::7}"
git push origin HEAD:master
@@ -0,0 +1,44 @@
name: Sync docs mirror and landing submodule
on:
push:
branches: [main]
paths: ['docs/**', '.github/workflows/sync-landing-submodule.yml']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-landing-docs-main
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/main' && vars.DOCS_MIRROR_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
ref: main
fetch-depth: 0
persist-credentials: false
- name: Test synchronization contracts
working-directory: docs
run: python3 -m unittest discover -s tests -p test_sync_landing_submodule.py -v
- name: Publish docs subtree (fast-forward only)
env:
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: |
gh auth setup-git
git remote add docs-mirror https://github.com/langbot-app/langbot-docs.git
git fetch docs-mirror main
docs_sha=$(git subtree split --prefix=docs)
git merge-base --is-ancestor docs-mirror/main "$docs_sha"
git push docs-mirror "$docs_sha:refs/heads/main"
- name: Update landing submodule and production fork
working-directory: docs
env:
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: python3 scripts/sync-landing-submodule.py
+4
View File
@@ -5,19 +5,23 @@ repos:
hooks:
# Run the linter of backend.
- id: ruff
exclude: ^docs/
args: [--fix]
# Run the formatter of backend.
- id: ruff-format
exclude: ^docs/
- repo: local
hooks:
- id: prettier
exclude: ^docs/
name: prettier
entry: npx --prefix web prettier --write --ignore-unknown
language: system
types_or: [javascript, jsx, ts, tsx, css, scss]
- id: lint-staged
exclude: ^docs/
name: lint-staged
entry: cd web && pnpm lint-staged
language: system
+4 -3
View File
@@ -44,12 +44,13 @@ Run tests in Linux to match CI; on Windows, use Linux containers through `wslc`
## Where to Look
- Public documentation source: `docs/`; published at https://langbot.app/docs/. `langbot-app/langbot-docs` is a generated subtree mirror; edit here.
- Architecture map: `ARCHITECTURE.md`.
- Dev environment guide: https://langbot.app/docs/zh/develop/dev-config.
- Plugin runtime / CLI / SDK debugging: https://langbot.app/docs/zh/develop/plugin-runtime.
- API-key auth: `docs/API_KEY_AUTH.md`.
- API-key auth: `dev-docs/API_KEY_AUTH.md`.
- Service API CLI: [`langbot-cli`](https://github.com/langbot-app/langbot-cli) (`lbctl`) manages running Workspaces; it is separate from the SDK's `lbp` CLI.
- Box deep-dive notes: `docs/review/box-architecture.md` and related files.
- Box deep-dive notes: `dev-docs/review/box-architecture.md` and related files.
- In-repo skills: `skills/` is the single source of truth for LangBot agent skills.
- SDK repo: `../langbot-plugin-sdk/` when changing shared entities, plugin APIs, action protocol, `lbp rt`, or `lbp box`.
@@ -105,7 +106,7 @@ Config keys to verify in `data/config.yaml` / `src/langbot/templates/config.yaml
- China-only adapters and configuration/field validation diagnostics do not require localization. An adapter also serving international users is not exempt merely because it supports a Chinese platform.
- Preserve raw provider/plugin diagnostics, tracebacks, protocol values, and machine-readable error/status codes. Translate LangBot's own category or explanation around them; do not translate arbitrary errors with substring replacement. Plugin-authored messages remain the plugin's localization responsibility.
- Keep changes small and maintainable. Reuse existing persistence and response boundaries; delete obsolete fields only after verifying they have no remaining readers, including compatibility paths.
- When changing language behavior, verify catalog/placeholder parity, Workspace isolation and permissions, and Pipeline inheritance/custom overrides. Update affected configuration snapshots and API/MCP documentation. Implementation details and focused test locations: [Backend message language](docs/architecture/backend-i18n.md).
- When changing language behavior, verify catalog/placeholder parity, Workspace isolation and permissions, and Pipeline inheritance/custom overrides. Update affected configuration snapshots and API/MCP documentation. Implementation details and focused test locations: [Backend message language](dev-docs/architecture/backend-i18n.md).
## Runtime Pitfalls
+6 -2
View File
@@ -162,7 +162,7 @@ In this repo:
- `pkg/plugin/handler.py` exposes LangBot actions to the runtime and calls runtime actions for plugin operations.
- `pkg/provider/tools/loaders/plugin.py` exposes plugin Tool components to LLM runners.
- Pipeline handlers emit SDK events such as normal-message events and prompt-processing events.
- [Certified plugin policy](docs/architecture/certified-plugins.md) defines Core's archive-fact, admission, and tenant-log-visibility boundary; the SDK remains responsible for certificate verification.
- [Certified plugin policy](dev-docs/architecture/certified-plugins.md) defines Core's archive-fact, admission, and tenant-log-visibility boundary; the SDK remains responsible for certificate verification.
In `langbot-plugin-sdk`:
@@ -201,7 +201,7 @@ Box is the optional sandbox subsystem used by native execution tools, stdio MCP
In this repo:
- `pkg/box/service.py` is the application-facing facade for exec, sessions, managed processes, status, reconnects, quotas, generic mounts, and sandbox profiles.
- [Outbox export failures](docs/BOX_OUTBOX_EXPORT.md) documents bounded reads, permission fallback, and cleanup after Runner acceptance.
- [Outbox export failures](dev-docs/BOX_OUTBOX_EXPORT.md) documents bounded reads, permission fallback, and cleanup after Runner acceptance.
- `pkg/box/connector.py` connects to the Box Runtime over stdio, Windows subprocess+WebSocket, or remote WebSocket.
- `pkg/provider/tools/loaders/native.py` is the Core orchestration seam: the
Skill loader supplies generic read-only mounts to Box execution. `mcp_stdio.py`
@@ -345,3 +345,7 @@ When one of these changes, update the others if the behavior or contract changed
- Prefer small, explicit agent surfaces over exposing every internal API.
- Treat cross-repo contracts with the SDK as public interfaces.
- Test behavior at the narrowest useful layer first, then add integration/e2e coverage for runtime or platform changes.
## Documentation repositories
The public documentation site lives in `docs/` and is built with Node.js 24 and Fumapress. Internal design and review notes live in `dev-docs/`. The `langbot-app/langbot-docs` repository is a fast-forward subtree mirror for the landing site submodule and Context7. See `dev-docs/DOCS_MIGRATION.md` for publication and cutover details.
+2
View File
@@ -188,3 +188,5 @@ Thanks to all [contributors](https://github.com/langbot-app/LangBot/graphs/contr
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[Documentation source](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -212,3 +212,5 @@ LangBot **从设计上就对 Agent 友好** —— 你的编码 Agent(Claude C
If you're a code agent based on LLM, you should read [AGENTS.md](AGENTS.md) to understand the project structure and development process before you start any development.
-->
[文档源码](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -186,3 +186,5 @@ Gracias a todos los [colaboradores](https://github.com/langbot-app/LangBot/graph
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[Código fuente de la documentación](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -186,3 +186,5 @@ Merci à tous les [contributeurs](https://github.com/langbot-app/LangBot/graphs/
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[Sources de la documentation](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -186,3 +186,5 @@ LangBot をより良くするために貢献してくださったすべての[
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[ドキュメントのソース](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -186,3 +186,5 @@ LangBot을 더 나은 프로젝트로 만들어 주신 모든 [기여자](https:
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[문서 소스](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -186,3 +186,5 @@ LangBot **дружелюбен к агентам по своей архитек
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[Исходники документации](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -204,3 +204,5 @@ LangBot **從設計上就對 Agent 友善** —— 你的編碼 Agent(Claude C
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[文件原始碼](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+2
View File
@@ -186,3 +186,5 @@ Cảm ơn tất cả [người đóng góp](https://github.com/langbot-app/LangB
<a href="https://github.com/langbot-app/LangBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=langbot-app/LangBot" />
</a>
[Mã nguồn tài liệu](https://github.com/langbot-app/LangBot/tree/main/docs) · [langbot-docs mirror](https://github.com/langbot-app/langbot-docs)
+61
View File
@@ -0,0 +1,61 @@
# Documentation subtree and publication
Public docs live in `LangBot/docs/`. The former internal `docs/` directory is
`dev-docs/` (27 top-level entries, 87 tracked files at migration). Do not merge
this migration using GitHub squash or rebase: use a merge commit to retain the
subtree parent and original signed commits. Imported history is reachable through
the subtree merge's second parent; `git log --follow docs/<file>` or
`git log <imported-docs-sha>` exposes original authors. A plain path-limited log
need not show pre-import paths.
## Local checks
With Node.js 24, run `npm ci`, `npm run typecheck`, `npm test`, and `npm run build`
inside `docs/`. Output is `docs/dist/`. The site remains mounted at `/docs/` with
canonical URL `https://langbot.app/docs`.
## Cutover after the PR is reviewed and merged
1. Pause the legacy `sync-blog-articles.yml` workflow in `langbot-app/langbot-docs`
and let any running writer finish. Freeze direct commits to that repository.
Pause its legacy Wiki and landing sync workflows too, avoiding duplicate
publishers while switching ownership. Do not push disabling commits directly
to the mirror.
2. Fetch mirror `main` and confirm it is an ancestor of the new subtree split.
If it advanced since import, integrate it with an **unsquashed**
`git subtree pull --prefix=docs <mirror-url> main` through another reviewed PR
before cutover; reapply the inert mirror workflow files if necessary. Never
force-push or rewrite the mirror history.
3. Verify `LANGBOT_WIKI_PUSH_TOKEN` is configured in LangBot with existing access
to the docs mirror, LangBot Wiki, landing upstream and production fork. The
blog job additionally needs to push to LangBot main and trigger workflows.
Repository workflow-file updates must be permitted by that token. Do not
weaken branch protection to accommodate this migration; use a separately
reviewed publication approach if the current token cannot perform the push.
4. Set LangBot repository variable `DOCS_MIRROR_ENABLED=true`. Dispatch
`sync-landing-submodule.yml` on main. It fetches full main history, runs
`git subtree split --prefix=docs`, verifies the current mirror head is an
ancestor, pushes without force, then advances only landing's `docs` gitlink.
The first split replaces legacy mirror workflows with inert manual stubs.
5. Dispatch `sync-github-wiki.yml` and `sync-blog-articles.yml` in LangBot.
The blog job now commits only docs article paths to LangBot main using the
dedicated token, so its push triggers the mirror and Wiki workflows.
6. Confirm the `docs` gitlink in `langbot-app/langbot-landing-page`, then confirm
production fork `RockChinQ/LangBot-LandingPage-Vue` matches upstream. This is
the actual fork in the existing sync script (not the similarly named fork
mentioned in the original migration proposal). Observe Cloudflare Pages
deployment and check `https://langbot.app/docs/`, localized pages, assets,
sitemap and canonical URLs. Verify Wiki pages after publication.
The four root workflows own publication and validation. Nested workflow stubs
are intentionally inert when split into the mirror. No direct writes should be
made to the mirror after cutover; all edits belong in LangBot `docs/`.
`docs/context7.json` continues to identify `langbot-app/langbot-docs` because that
repository remains available with the same tree layout and original history.
Verify Context7 ingestion after the first mirror update; no library re-registration
is needed merely to relocate the authoring source.
Disable `DOCS_MIRROR_ENABLED` to pause publishers if cutover fails. A failed
mirror ancestry check must be investigated and reconciled, never bypassed by a
force push. Do not restore direct mirror writers while LangBot is authoritative.
@@ -15,8 +15,8 @@
> - `src/langbot/pkg/platform/sources/http_bot.py` — `HttpBotAdapter`
> - `src/langbot/pkg/platform/sources/http_bot_signing.py` — HMAC helpers
> - `src/langbot/pkg/platform/sources/http_bot.svg` — icon
> - `docs/platforms/http-bot.md` — integration guide
> - `docs/http-bot-openapi.json` — machine-readable contract
> - `dev-docs/platforms/http-bot.md` — integration guide
> - `dev-docs/http-bot-openapi.json` — machine-readable contract
> - `examples/http-bot/` — Python + TypeScript reference clients
>
> **Final decisions (resolving the original open questions):**
@@ -489,13 +489,13 @@ time so replies always have a destination even if config later changes).
The whole point of a standalone adapter is that **integrating is pleasant**. v1
ships:
1. **`docs/platforms/http-bot.md`** — task-oriented integration guide:
1. **`dev-docs/platforms/http-bot.md`** — task-oriented integration guide:
create the bot → copy inbound URL → set secret → stand up a callback
endpoint → send first message → handle 1→M.
2. **Copy-paste curl** for the first message (with a working signing one-liner).
3. **Reference clients** (≤50 LOC each) in `examples/http-bot/`:
`client.py` (push + a Flask/Quart callback receiver) and `client.ts`.
4. **OpenAPI fragment** `docs/http-bot-openapi.json` describing inbound +
4. **OpenAPI fragment** `dev-docs/http-bot-openapi.json` describing inbound +
callback shapes, so integrators can codegen.
5. **Local echo recipe**: a one-command callback server that prints every
reply, so a developer sees N→1 and 1→M working in under five minutes.
@@ -542,7 +542,7 @@ curl -sS -X POST "$BOT" \
| 2 | `HttpBotAdapter` (inbound verify, event build, outbound queue) | `platform/sources/http_bot.py` |
| 3 | Signing helper module (shared) | `platform/sources/` or `utils/` |
| 4 | i18n strings (en/zh/ja) | adapter yaml + web locale |
| 5 | Integration docs `docs/platforms/http-bot.md` | `docs/` |
| 5 | Integration docs `dev-docs/platforms/http-bot.md` | `docs/` |
| 6 | OpenAPI fragment + reference clients | `docs/`, `examples/http-bot/` |
| 7 | Tests: signature verify, N→1 aggregation, 1→M ordering, retry | `tests/` |
| 8 | (opt) SSRF guard for callback_url | adapter |
@@ -1,6 +1,6 @@
# Runner Pluginization Status
本文档是 `docs/agent-runner-pluginization/` 的状态事实源。协议 schema 仍以 [PROTOCOL_V1.md](./PROTOCOL_V1.md) 为准;测试步骤以 [RUNNER_QA_GUIDE.md](./RUNNER_QA_GUIDE.md) 为准;安全发布门槛以 [SECURITY_HARDENING.md](./SECURITY_HARDENING.md) 为准。
本文档是 `dev-docs/agent-runner-pluginization/` 的状态事实源。协议 schema 仍以 [PROTOCOL_V1.md](./PROTOCOL_V1.md) 为准;测试步骤以 [RUNNER_QA_GUIDE.md](./RUNNER_QA_GUIDE.md) 为准;安全发布门槛以 [SECURITY_HARDENING.md](./SECURITY_HARDENING.md) 为准。
状态快照日期:2026-09-05。代码基线为 LangBot `dev/4.11.x` / `a4d36aa2d` 和 SDK `dev/4.11.x` / `f1da058`;本文是本地检视快照,不代表远端最新状态或正式发布批准。

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

@@ -248,7 +248,7 @@ Watch Terminal 1 print each reply part (`[part ]` / `[FINAL]`) with its
sequence number — that's 1→M working, signatures verified.
A machine-readable contract is in
[`docs/http-bot-openapi.json`](../http-bot-openapi.json).
[`dev-docs/http-bot-openapi.json`](../http-bot-openapi.json).
---

Some files were not shown because too many files have changed in this diff Show More