Skip to content

Commit b47c5fa

Browse files
committed
merge(feat/wecom): 合并 feat/jjl 的增强改动
2 parents aa957ed + ed51cce commit b47c5fa

95 files changed

Lines changed: 9755 additions & 896 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ========== 前端构建阶段 ==========
12
FROM node:22-alpine AS node
23

34
WORKDIR /app
@@ -14,6 +15,7 @@ WORKDIR /app
1415
COPY pyproject.toml uv.lock README.md LICENSE main.py ./
1516
COPY src ./src
1617

18+
# 安装系统依赖和 Python 依赖(排除开发依赖)
1719
RUN apt update \
1820
&& apt install gcc -y \
1921
&& python -m pip install --no-cache-dir uv \
@@ -23,9 +25,6 @@ RUN apt update \
2325
&& rm -rf /var/lib/apt/lists/* \
2426
&& touch /.dockerenv
2527

26-
# 再复制其余运行时文件,避免无关文件变更导致依赖重装
27-
COPY . .
28-
2928
COPY --from=node /app/web/out ./web/out
3029

3130
CMD [ "uv", "run", "--no-sync", "main.py" ]

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ English / [简体中文](README_CN.md) / [繁體中文](README_TW.md) / [日本
3636

3737
LangBot is an **open-source, production-grade platform** for building AI-powered instant messaging bots. It connects Large Language Models (LLMs) to any chat platform, enabling you to create intelligent agents that can converse, execute tasks, and integrate with your existing workflows.
3838

39+
## Enhancements in This Branch
40+
41+
Compared with the upstream official branch, this maintained branch includes several practical enhancements focused on WeCom / WeChat operations and long-running session reliability:
42+
43+
- **WeCom Customer Service runtime enhancements** — Redis-backed scheduling, state persistence, retry handling, token cache, and sharded processing for more stable large-volume customer service workloads.
44+
- **WeCom app managed customer service adapter** — Added `wecom_kf_app` support for scenarios where customer service is managed through a WeCom application authorization model.
45+
- **Dify conversation persistence** — Persist Dify `conversation_id` bindings in Redis and clear them on explicit session resets, reducing context loss after runtime restarts.
46+
- **OpenClaw WeChat adapter support** — Added OpenClaw-based WeChat integration for additional WeChat connectivity scenarios.
47+
- **WeCom / WeChat integration hardening** — Additional fixes and runtime improvements around session isolation, callback handling, and customer-service message processing.
48+
49+
These enhancements are especially useful for teams running LangBot in private deployments with heavier WeCom / WeChat customer-service traffic and stronger context-continuity requirements.
50+
51+
---
52+
3953
### Key Capabilities
4054

4155
- **AI Conversations & Agents** — Multi-turn dialogues, tool calling, multi-modal support, streaming output. Built-in RAG (knowledge base) with deep integration to [Dify](https://dify.ai), [Coze](https://coze.com), [n8n](https://n8n.io), [Langflow](https://langflow.org).

README_CN.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,14 @@
3434

3535
---
3636

37-
## 什么是 LangBot?
38-
3937
LangBot 是一个**开源的生产级平台**,用于构建 AI 驱动的即时通信机器人。它将大语言模型(LLM)连接到各种聊天平台,帮助你创建能够对话、执行任务、并集成到现有工作流程中的智能 Agent。
4038

4139
### 核心能力
4240

4341
- **AI 对话与 Agent** — 多轮对话、工具调用、多模态、流式输出。自带 RAG(知识库),深度集成 [Dify](https://dify.ai)[Coze](https://coze.com)[n8n](https://n8n.io)[Langflow](https://langflow.org) 等 LLMOps 平台。
4442
- **全平台支持** — 一套代码,覆盖 QQ、微信、企业微信、飞书、钉钉、Discord、Telegram、Slack、LINE、KOOK 等平台。
4543
- **生产就绪** — 访问控制、限速、敏感词过滤、全面监控与异常处理,已被多家企业采用。
46-
- **插件生态** — 数百个插件,事件驱动架构,组件扩展,适配 [MCP 协议](https://modelcontextprotocol.io/)
44+
- **插件生态** — 数百个插件,跨进程的事件驱动架构,组件扩展,适配 [MCP 协议](https://modelcontextprotocol.io/)
4745
- **Web 管理面板** — 通过浏览器直观地配置、管理和监控机器人,无需手动编辑配置文件。
4846
- **多流水线架构** — 不同机器人用于不同场景,具备全面的监控和异常处理能力。
4947

docker/docker-compose.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ version: "3"
44

55
services:
66

7+
redis:
8+
image: redis:7-alpine
9+
container_name: langbot_redis
10+
restart: on-failure
11+
command: ["redis-server", "--appendonly", "yes"]
12+
volumes:
13+
- ./data/redis:/data
14+
environment:
15+
- TZ=Asia/Shanghai
16+
ports:
17+
- 6379:6379
18+
networks:
19+
- langbot_network
20+
21+
722
langbot_plugin_runtime:
823
image: rockchin/langbot:latest
924
container_name: langbot_plugin_runtime

0 commit comments

Comments
 (0)