From 3e0be870abb827d19d039c641f01c7bcefdba749 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Tue, 27 Oct 2026 08:04:39 +0000 Subject: [PATCH] feat: merge langbot-docs history into docs/ (subtree, no squash) Imported langbot-app/langbot-docs main (51dddcb3f) under docs/ with `git subtree add`, keeping every original commit SHA and signature so the mirror and landing-page submodule can fast-forward from a `git subtree split` later. Retarget the docs workflows to docs/, point blog sync at the main repository, and update the remaining internal references. Co-Authored-By: Mika (Multica) Co-authored-by: multica-agent --- dev-docs/DOCS_MIGRATION.md | 9 +- docs/.github/workflows/sync-blog-articles.yml | 54 ++---------- docs/.github/workflows/sync-github-wiki.yml | 86 ++----------------- .../workflows/sync-landing-submodule.yml | 28 ++---- docs/.github/workflows/tests.yml | 27 ++---- docs/README.md | 6 +- docs/README_EN.md | 6 +- packaging/fnos/build.sh | 1 + skills/skills/langbot-deploy/SKILL.md | 2 +- skills/skills/langbot-dev/SKILL.md | 2 +- .../skills/langbot-eba-adapter-dev/SKILL.md | 10 +-- skills/skills/langbot-mcp-ops/SKILL.md | 8 +- 12 files changed, 50 insertions(+), 189 deletions(-) diff --git a/dev-docs/DOCS_MIGRATION.md b/dev-docs/DOCS_MIGRATION.md index 1f361328e..3b032fc2e 100644 --- a/dev-docs/DOCS_MIGRATION.md +++ b/dev-docs/DOCS_MIGRATION.md @@ -4,9 +4,12 @@ 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/` or -`git log ` exposes original authors. A plain path-limited log -need not show pre-import paths. +the subtree merge's second parent. Use `git log -- ` +(with the original path relative to the docs repository) to see original authors. +A path-limited `git log docs/` or `--follow` does not reliably traverse the +unrelated-history import. The imported commit is +`51dddcb3f891d60bc38645e88b2dbd515344da81` (888 commits, including 452 signed +commit objects, all retained without rewriting). ## Local checks diff --git a/docs/.github/workflows/sync-blog-articles.yml b/docs/.github/workflows/sync-blog-articles.yml index c26dfec71..f984363b2 100644 --- a/docs/.github/workflows/sync-blog-articles.yml +++ b/docs/.github/workflows/sync-blog-articles.yml @@ -1,53 +1,13 @@ -name: Sync LangBot Blog articles - +# Workflows run from langbot-app/LangBot/.github/workflows after migration. +# Keep this mirror entry inert: no job may write directly to langbot-docs. +name: Legacy docs workflow (migrated) on: workflow_dispatch: - schedule: - - cron: "17 2 * * *" - permissions: - contents: write - -concurrency: - group: sync-langbot-blog-articles - cancel-in-progress: false - + contents: read jobs: - sync: + migrated: + if: ${{ false }} runs-on: ubuntu-latest steps: - - name: Check out Wiki - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - 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 - npx --yes mintlify@4.2.375 validate - - - name: Commit synchronized content - run: | - rm -rf .article-source - if git diff --quiet && test -z "$(git status --short)"; then - echo "LangBot Blog articles are already synchronized." - exit 0 - fi - git config user.name "langbot-docs-bot" - git config user.email "actions@users.noreply.github.com" - git add docs.json en/articles zh/articles ja/articles images/articles scripts/blog-articles-manifest.json - git commit -m "docs(articles): sync LangBot Blog" - git push + - run: echo 'Use the LangBot repository workflows.' diff --git a/docs/.github/workflows/sync-github-wiki.yml b/docs/.github/workflows/sync-github-wiki.yml index 0d5e5910a..f984363b2 100644 --- a/docs/.github/workflows/sync-github-wiki.yml +++ b/docs/.github/workflows/sync-github-wiki.yml @@ -1,87 +1,13 @@ -name: Sync GitHub Wiki - +# Workflows run from langbot-app/LangBot/.github/workflows after migration. +# Keep this mirror entry inert: no job may write directly to langbot-docs. +name: Legacy docs workflow (migrated) on: - push: - branches: [main] - paths: - - "en/**" - - "zh/**" - - "ja/**" - - "scripts/build-github-wiki.py" - - ".github/workflows/sync-github-wiki.yml" - pull_request: - paths: - - "en/**" - - "zh/**" - - "ja/**" - - "scripts/build-github-wiki.py" - - "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: - name: Build Wiki mirror + migrated: + if: ${{ false }} 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: dist/github-wiki - if-no-files-found: error - - sync: - name: Publish to LangBot Wiki - if: github.event_name != 'pull_request' - 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 + - run: echo 'Use the LangBot repository workflows.' diff --git a/docs/.github/workflows/sync-landing-submodule.yml b/docs/.github/workflows/sync-landing-submodule.yml index 3250132b6..f984363b2 100644 --- a/docs/.github/workflows/sync-landing-submodule.yml +++ b/docs/.github/workflows/sync-landing-submodule.yml @@ -1,29 +1,13 @@ -name: Sync landing docs submodule - +# Workflows run from langbot-app/LangBot/.github/workflows after migration. +# Keep this mirror entry inert: no job may write directly to langbot-docs. +name: Legacy docs workflow (migrated) on: - push: - branches: [main] workflow_dispatch: - permissions: contents: read - -concurrency: - group: sync-landing-docs-main - cancel-in-progress: false - jobs: - sync: - if: github.repository == 'langbot-app/langbot-docs' + migrated: + if: ${{ false }} runs-on: ubuntu-latest - timeout-minutes: 5 steps: - - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: Test synchronization contracts - run: python3 -m unittest discover -s tests -p test_sync_landing_submodule.py -v - - name: Update landing submodule and production fork - env: - GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }} - run: python3 scripts/sync-landing-submodule.py + - run: echo 'Use the LangBot repository workflows.' diff --git a/docs/.github/workflows/tests.yml b/docs/.github/workflows/tests.yml index afd2ef180..f984363b2 100644 --- a/docs/.github/workflows/tests.yml +++ b/docs/.github/workflows/tests.yml @@ -1,28 +1,13 @@ -name: Tests - +# Workflows run from langbot-app/LangBot/.github/workflows after migration. +# Keep this mirror entry inert: no job may write directly to langbot-docs. +name: Legacy docs workflow (migrated) on: - pull_request: workflow_dispatch: - permissions: contents: read - jobs: - docs: - name: Fumapress docs build + migrated: + if: ${{ false }} runs-on: ubuntu-latest - timeout-minutes: 10 steps: - - uses: actions/checkout@v7 - - uses: actions/setup-node@v7 - with: - node-version: "24" - cache: npm - - name: Install dependencies - run: npm ci - - name: Typecheck - run: npm run typecheck - - name: Run documentation contract tests - run: npm test - - name: Build and verify the static site - run: npm run build + - run: echo 'Use the LangBot repository workflows.' diff --git a/docs/README.md b/docs/README.md index 53b361462..377a8bbda 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,14 +1,14 @@ # [LangBot](https://github.com/langbot-app/LangBot) 官方文档 -> 此仓库是 LangBot 的文档仓库,代码仓库: +> 文档源码位于 [LangBot/docs](https://github.com/langbot-app/LangBot/tree/main/docs),[langbot-docs](https://github.com/langbot-app/langbot-docs) 仅作为发布 mirror。 > [LangBot 代码仓库](https://github.com/langbot-app/LangBot) -> 这是 LangBot 4.0 的文档,3.0 文档请见 `v3` 分支 +> 这是 LangBot 4.0 的文档,3.0 文档请见 [langbot-docs 的 v3 分支](https://github.com/langbot-app/langbot-docs/tree/v3) ## 参与编写 文档使用 [Fumapress](https://press.fumadocs.dev/) 和 [Fumadocs](https://fumadocs.dev/) 生成,本地开发需要 Node.js 24 或更高版本。 -Clone 本仓库,在目录下执行以下命令安装依赖: +Clone LangBot 主仓后进入 `docs/` 目录,执行以下命令安装依赖: ```bash npm ci diff --git a/docs/README_EN.md b/docs/README_EN.md index 90372fb2c..da4dd37d4 100644 --- a/docs/README_EN.md +++ b/docs/README_EN.md @@ -1,14 +1,16 @@ +> Edit documentation in [LangBot/docs](https://github.com/langbot-app/LangBot/tree/main/docs). The [langbot-docs repository](https://github.com/langbot-app/langbot-docs) is a generated publication mirror. Run the commands below from `LangBot/docs/`. + # [LangBot](https://github.com/langbot-app/LangBot) Official Documentation > This repository is the documentation repository for LangBot. Code repository: > [LangBot Code Repository](https://github.com/langbot-app/LangBot) -> This is the documentation for LangBot 4.0. For 3.0 documentation, please see the `v3` branch +> This is the documentation for LangBot 4.0. For 3.0 documentation, please see the [langbot-docs v3 branch](https://github.com/langbot-app/langbot-docs/tree/v3) ## Contributing to Documentation The documentation is built with [Fumapress](https://press.fumadocs.dev/) and [Fumadocs](https://fumadocs.dev/). Local development requires Node.js 24 or later. -Clone this repository and execute the following command in the directory to install dependencies: +Clone LangBot, enter its `docs/` directory, and install dependencies: ```bash npm ci diff --git a/packaging/fnos/build.sh b/packaging/fnos/build.sh index ef0f135fa..4497f2ca1 100644 --- a/packaging/fnos/build.sh +++ b/packaging/fnos/build.sh @@ -66,6 +66,7 @@ rsync -a \ --exclude='kubernetes.yaml' \ --exclude='.github/' \ --exclude='docs/' \ + --exclude='dev-docs/' \ --exclude='examples/' \ --exclude='res/' \ ./ "${FPK_DIR}/app/langbot/" diff --git a/skills/skills/langbot-deploy/SKILL.md b/skills/skills/langbot-deploy/SKILL.md index 7661e7647..b030a91c6 100644 --- a/skills/skills/langbot-deploy/SKILL.md +++ b/skills/skills/langbot-deploy/SKILL.md @@ -100,7 +100,7 @@ api: ``` This key authenticates both the HTTP API and the MCP server (`/mcp`) without a -login session. See `langbot-mcp-ops` for using it, and `docs/API_KEY_AUTH.md`. +login session. See `langbot-mcp-ops` for using it, and `dev-docs/API_KEY_AUTH.md`. ## Pitfalls diff --git a/skills/skills/langbot-dev/SKILL.md b/skills/skills/langbot-dev/SKILL.md index dbcdb0625..ef5bb84a2 100644 --- a/skills/skills/langbot-dev/SKILL.md +++ b/skills/skills/langbot-dev/SKILL.md @@ -96,7 +96,7 @@ discovered by `importutil.import_modules_in_pkg`. MCP surface must stay aligned (see `AGENTS.md`). 4. If `lbctl` uses the route or capability, check the separate [`langbot-cli`](https://github.com/langbot-app/langbot-cli) client for compatibility. -5. Update `docs/service-api-openapi.json` if you maintain the OpenAPI overview. +5. Update `dev-docs/service-api-openapi.json` if you maintain the OpenAPI overview. ## Database migrations (Alembic) diff --git a/skills/skills/langbot-eba-adapter-dev/SKILL.md b/skills/skills/langbot-eba-adapter-dev/SKILL.md index b0fd180cd..272a72f71 100644 --- a/skills/skills/langbot-eba-adapter-dev/SKILL.md +++ b/skills/skills/langbot-eba-adapter-dev/SKILL.md @@ -33,12 +33,12 @@ Do not let platform-native event or message shapes leak into LangBot's common pa ## Start Here -1. Read the EBA design docs in `LangBot/docs/event-based-agents/`. +1. Read the EBA design docs in `LangBot/dev-docs/event-based-agents/`. 2. Read the architecture-level acceptance checklist before writing or validating code: - - `LangBot/docs/event-based-agents/adapters/acceptance-checklist.md` + - `LangBot/dev-docs/event-based-agents/adapters/acceptance-checklist.md` 3. Read the current reference adapter before writing code. Prefer Telegram first: - `LangBot/src/langbot/pkg/platform/adapters/telegram/` - - `LangBot/docs/event-based-agents/adapters/telegram.md` + - `LangBot/dev-docs/event-based-agents/adapters/telegram.md` 4. Read the legacy source adapter for the target platform: - `LangBot/src/langbot/pkg/platform/sources/.py` - `LangBot/src/langbot/pkg/platform/sources/.yaml` @@ -244,7 +244,7 @@ The SDK must support `plugin.call_platform_api(bot_uuid, action, params)` for pl ## Required EBA Acceptance Coverage -Before marking an adapter migrated, fill out an adapter record against `LangBot/docs/event-based-agents/adapters/acceptance-checklist.md`. +Before marking an adapter migrated, fill out an adapter record against `LangBot/dev-docs/event-based-agents/adapters/acceptance-checklist.md`. At minimum, the record must cover these categories: @@ -274,7 +274,7 @@ Do not declare an event or API in the manifest unless it has an implementation p ## Documentation Record -Add or update `LangBot/docs/event-based-agents/adapters/.md` in the same style as Telegram: +Add or update `LangBot/dev-docs/event-based-agents/adapters/.md` in the same style as Telegram: - Status and adapter directory. - Configuration table matching manifest fields. diff --git a/skills/skills/langbot-mcp-ops/SKILL.md b/skills/skills/langbot-mcp-ops/SKILL.md index dde430706..a9d723de3 100644 --- a/skills/skills/langbot-mcp-ops/SKILL.md +++ b/skills/skills/langbot-mcp-ops/SKILL.md @@ -139,7 +139,7 @@ tools or authorized by a LangBot API key. Once connected, models are managed and selected through the normal provider/model workflow. A disconnected provider must be reauthorized; do not silently replace it with API-key billing. -See [ChatGPT / Codex subscription](../../../docs/CODEX_SUBSCRIPTION.md) for setup, +See [ChatGPT / Codex subscription](../../../dev-docs/CODEX_SUBSCRIPTION.md) for setup, usage limits, and the personal-account versus shared-service boundary. ## Provider deletion @@ -300,16 +300,16 @@ milliseconds since invocation start; `first_event_ms` includes reasoning/control frames, while `first_content_ms` measures the first upstream content delta. `first_visible_chunk_ms` may contain displayed reasoning, not just answer text. Old records have no details. Do not equate total duration with provider TTFT. -See `docs/LLM_REQUEST_POLICY.md` for policy precedence and gateway header behavior. +See `dev-docs/LLM_REQUEST_POLICY.md` for policy precedence and gateway header behavior. `get_llm_model` also exposes optional `reasoning_capabilities.budget_tokens` min/max bounds. Numeric thinking budgets use `reasoning_config.budget_tokens` with level `enabled`; do not combine budgets with effort levels or native thinking arguments. Existing Runner reasoning overrides take precedence. Prompt caching is opt-in through model/call `extra_args.prompt_caching`; use provider-specific -modes documented in `docs/LLM_REQUEST_POLICY.md`. Cache keys are routing hints, +modes documented in `dev-docs/LLM_REQUEST_POLICY.md`. Cache keys are routing hints, not evidence of hits; read the actual usage counters. `preparation_ms` measures request construction and `preparation_cache_hits` counts retry preparation reuse. `transport_setup_ms` measures managed pool acquisition, including first-use TLS -initialization; it is not network TTFT. See `docs/LLM_LATENCY_BENCHMARK.md` for +initialization; it is not network TTFT. See `dev-docs/LLM_LATENCY_BENCHMARK.md` for controlled request-layer measurements and their scope.