mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-04 14:52:12 +08:00
feat(plugins): consolidate official plugins with independent releases (LANG-180) (#2797)
Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
co-authored by
multica-agent
parent
d099033d79
commit
3a77306c3c
@@ -14,9 +14,9 @@ latest-LocalAgent Space-resolution work in PR #2632.
|
||||
## Official plugin identity boundary
|
||||
|
||||
The source lock in `tests/fixtures/legacy_plugin_identity_sources.json` records
|
||||
the official repository, immutable revision, and SHA-256 of the consumed Python
|
||||
source files. CI checks out that revision with read-only access
|
||||
and no persisted Git credentials. Tests verify file digests before executing the
|
||||
the official in-tree source root and SHA-256 of the consumed Python source files.
|
||||
CI uses `plugins/` from the same Core checkout, without a second plugin checkout.
|
||||
Tests verify file digests before executing the
|
||||
actual identity methods, their genuine configuration-error classes, and their
|
||||
real `scoped_identity` dependency. Vendor HTTP clients are not constructed.
|
||||
|
||||
@@ -25,9 +25,9 @@ from a hard-coded sibling checkout. Supported current plugins intentionally
|
||||
namespace IDs by Workspace or trusted installation, so merely provisioning that
|
||||
old test produced false failures. The current fixture is:
|
||||
|
||||
- Official repository: `langbot-app/langbot-plugins`
|
||||
- Revision: `7ad54b1a139d88113bc55128326800ed29779737`
|
||||
- DifyAgent 0.2.3; N8nAgent, CozeAgent and TboxAgent 0.2.2
|
||||
- Official repository: `langbot-app/LangBot`, source root `plugins/`
|
||||
- Revision: `in-tree`; the checkout revision selects both Core and plugins
|
||||
- Plugin versions are indexed in `plugins/catalog.json`
|
||||
- All exceed Core's current migration minimums (0.1.10; TboxAgent 0.1.8)
|
||||
|
||||
The 19 Host provenance/resume tests retain their exact raw-identity assertions.
|
||||
@@ -46,7 +46,7 @@ claim current compatibility.
|
||||
To run with an official checkout at the locked revision:
|
||||
|
||||
```bash
|
||||
export LANGBOT_LEGACY_PLUGIN_ROOT=/absolute/path/to/langbot-plugins
|
||||
export LANGBOT_LEGACY_PLUGIN_ROOT="$PWD/plugins"
|
||||
uv run --frozen pytest --required-suite plugin_identity -q -rs
|
||||
```
|
||||
|
||||
|
||||
@@ -6,20 +6,19 @@
|
||||
|
||||
## 1. 仓库组织
|
||||
|
||||
官方 runner 插件与 LangBot 主仓库、SDK 仓库以不同节奏迭代:LangBot 主仓库只维护宿主协议和调度,SDK 仓库维护 Runner 组件和 runtime 协议,官方 runner 插件承载业务 runner 的具体实现和第三方平台适配。
|
||||
官方 runner 插件源码现在位于 LangBot 主仓库的 `plugins/Runner/`,但测试、依赖、版本和上架节奏保持独立。Core 维护宿主协议和调度,SDK 仓库维护 Runner 组件和 runtime 协议,官方 runner 插件承载业务 runner 的具体实现和第三方平台适配。Core 发版不包含插件源码或插件包。
|
||||
|
||||
当前推荐"官方插件可独立发布,必要时共享 SDK helper"。开发期采用本地多目录布局:
|
||||
|
||||
```text
|
||||
langbot-app/
|
||||
langbot-local-agent/ # plugin:langbot-team/LocalAgent/default
|
||||
LangBot/plugins/Runner/
|
||||
LocalAgent/ # plugin:langbot-team/LocalAgent/default
|
||||
manifest.yaml
|
||||
components/runner/default.{yaml,py}
|
||||
langbot-agent-runner/ # 外部服务 runner 仓库
|
||||
acp-agent-runner/ claude-code-agent/ codex-agent/ dify-agent/ n8n-agent/ ...
|
||||
acp-agent-runner/ claude-code-agent/ codex-agent/ dify-agent/ n8n-agent/ ...
|
||||
```
|
||||
|
||||
后续可聚合进 monorepo,也可继续独立发布——这个选择不影响协议设计。重复逻辑优先沉淀到 SDK 或明确的共享 helper 包,不要把宿主私有结构泄漏给插件。旧 `src/langbot/pkg/provider/runners/*` 只作为历史行为对齐基准;当前未发布分支不提供旧内置 runner 的运行时 fallback。
|
||||
插件已经合仓,但仍独立发布;详见 `plugins/RELEASING.md`。这个选择不影响协议设计。重复逻辑优先沉淀到 SDK 或明确的共享 helper 包,不要把宿主私有结构泄漏给插件。旧 `src/langbot/pkg/provider/runners/*` 只作为历史行为对齐基准;当前未发布分支不提供旧内置 runner 的运行时 fallback。
|
||||
|
||||
## 2. 插件命名和 runner id
|
||||
|
||||
|
||||
@@ -197,4 +197,4 @@ Pipeline 与 Agent 是长期并存、场景不同的同级处理器。Pipeline
|
||||
| **LangBot**(后端) | 适配器实现、事件路由引擎、Bot/Agent 实体、Runner Host 编排 |
|
||||
| **LangBot**(前端) | Bot 事件处理器编排面板 |
|
||||
| **langbot-wiki** | 新架构文档、插件开发指南更新、适配器开发指南 |
|
||||
| **langbot-plugin-demo** | 示例更新(使用新事件和 API) |
|
||||
| **LangBot/plugins** | 示例更新(使用新事件和 API,插件保持独立发布) |
|
||||
|
||||
Reference in New Issue
Block a user