mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-29 11:56:02 +08:00
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) <[email protected]>
Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
co-authored by
Mika
multica-agent
parent
9d2042478a
commit
3e0be870ab
@@ -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/<file>` or
|
||||
`git log <imported-docs-sha>` exposes original authors. A plain path-limited log
|
||||
need not show pre-import paths.
|
||||
the subtree merge's second parent. Use `git log <imported-docs-sha> -- <file>`
|
||||
(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
|
||||
|
||||
|
||||
+7
-47
@@ -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 [email protected] 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 "[email protected]"
|
||||
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.'
|
||||
|
||||
+6
-80
@@ -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.'
|
||||
|
||||
+6
-22
@@ -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.'
|
||||
|
||||
Vendored
+6
-21
@@ -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.'
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
+4
-2
@@ -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
|
||||
|
||||
@@ -66,6 +66,7 @@ rsync -a \
|
||||
--exclude='kubernetes.yaml' \
|
||||
--exclude='.github/' \
|
||||
--exclude='docs/' \
|
||||
--exclude='dev-docs/' \
|
||||
--exclude='examples/' \
|
||||
--exclude='res/' \
|
||||
./ "${FPK_DIR}/app/langbot/"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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/<platform>.py`
|
||||
- `LangBot/src/langbot/pkg/platform/sources/<platform>.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/<platform>.md` in the same style as Telegram:
|
||||
Add or update `LangBot/dev-docs/event-based-agents/adapters/<platform>.md` in the same style as Telegram:
|
||||
|
||||
- Status and adapter directory.
|
||||
- Configuration table matching manifest fields.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user