mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
docs(runner): mark legacy runners and add PROGRESS.md
- Add DEPRECATED docstring to all legacy runners in pkg/provider/runners/ - Mark migration target for each runner (local-agent, dify, n8n, coze, dashscope, langflow, tbox) - Add PROGRESS.md to track agent-runner-pluginization implementation status - Remove completed PHASE0_INTEGRATION_RECORD.md
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
# Agent Runner Pluginization Phase 0 Integration Test Record
|
||||
|
||||
## Test Summary
|
||||
|
||||
**Status**: PASSED
|
||||
|
||||
**Date**: 2026-05-10 10:09
|
||||
|
||||
## Test Configuration
|
||||
|
||||
- **LangBot Branch**: feat/agent-runner-plugin
|
||||
- **SDK Branch**: feat/agent-runner-plugin
|
||||
- **Runner Repo**: langbot-agent-runner (new)
|
||||
|
||||
## Test Scenario
|
||||
|
||||
- **Selected Runner**: `plugin:langbot/local-agent/default`
|
||||
- **Input**: `1`
|
||||
- **Expected Output**: `[stub] Echo: 1`
|
||||
- **Actual Output**: `[stub] Echo: 1`
|
||||
|
||||
## Verified Chain
|
||||
|
||||
```
|
||||
Frontend selects plugin:langbot/local-agent/default
|
||||
-> LangBot pipeline
|
||||
-> AgentRunOrchestrator
|
||||
-> SDK runtime RUN_AGENT
|
||||
-> langbot-agent-runner/local-agent DefaultAgentRunner
|
||||
-> AgentRunResult
|
||||
-> LangBot response
|
||||
```
|
||||
|
||||
## Key Components Verified
|
||||
|
||||
### LangBot Host
|
||||
- AgentRunOrchestrator resolves runner ID via ConfigMigration
|
||||
- AgentRunContextBuilder builds SDK v1 context
|
||||
- AgentResultNormalizer normalizes SDK v1 results
|
||||
- ChatMessageHandler delegates to orchestrator (single resp_message_id, streaming pop/append)
|
||||
|
||||
### SDK Runtime
|
||||
- RUN_AGENT action dispatches to plugin runner
|
||||
- AgentRunner component manifest parsing
|
||||
- LIST_AGENT_RUNNERS returns runner metadata
|
||||
|
||||
### langbot-agent-runner Plugin
|
||||
- DefaultAgentRunner stub implementation
|
||||
- AgentRunner manifest with protocol_version, capabilities, permissions
|
||||
- Echo response validates SDK v1 result format
|
||||
|
||||
## Next Steps (Phase 1)
|
||||
|
||||
1. Implement real Dify runner (external API runner validation)
|
||||
2. Update frontend to save `ai.runner.id` + `ai.runner_config`
|
||||
3. Add persistence migration for old config format
|
||||
4. Update pipeline templates
|
||||
5. Add proxy action secondary permission validation
|
||||
|
||||
## Related Documents
|
||||
|
||||
- [IMPLEMENTATION_PLAN.md](./IMPLEMENTATION_PLAN.md)
|
||||
- [OFFICIAL_RUNNER_PLUGINS.md](./OFFICIAL_RUNNER_PLUGINS.md)
|
||||
94
docs/agent-runner-pluginization/PROGRESS.md
Normal file
94
docs/agent-runner-pluginization/PROGRESS.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# Agent Runner 插件化实现进度
|
||||
|
||||
本文档跟踪 Agent Runner 插件化的实现状态,便于快速了解当前进度。
|
||||
|
||||
## 总体进度
|
||||
|
||||
**当前阶段**: Phase 3 进行中
|
||||
|
||||
| Phase | 描述 | 状态 |
|
||||
|-------|------|------|
|
||||
| Phase 0 | PoC 验证 | ✅ 完成 |
|
||||
| Phase 1 | 核心架构(Registry、Orchestrator、上下文模型) | ✅ 完成 |
|
||||
| Phase 2 | 权限、能力声明、资源注入 | ✅ 完成 |
|
||||
| Phase 3 | 内置 runner 迁移到插件 | ✅ 完成(7/7) |
|
||||
| Phase 4 | EBA 事件支持 | 🔲 未开始 |
|
||||
|
||||
---
|
||||
|
||||
## 详细状态
|
||||
|
||||
### SDK 侧 (`langbot-plugin-sdk`)
|
||||
|
||||
| 组件 | 状态 | 备注 |
|
||||
|------|------|------|
|
||||
| `AgentRunner` 组件 | ✅ | `api/definition/components/agent_runner/runner.py` |
|
||||
| `AgentRunContext` | ✅ | `api/entities/builtin/agent_runner/context.py` |
|
||||
| `AgentRunResult` | ✅ | `api/entities/builtin/agent_runner/result.py` |
|
||||
| `AgentRunnerCapabilities` | ✅ | `api/entities/builtin/agent_runner/capabilities.py` |
|
||||
| `AgentRunnerPermissions` | ✅ | `api/entities/builtin/agent_runner/permissions.py` |
|
||||
| EBA 事件模型 (Event/Actor/Subject) | ✅ | `api/entities/builtin/agent_runner/event.py` |
|
||||
| `LIST_AGENT_RUNNERS` action | ✅ | `runtime/io/handlers/control.py` |
|
||||
| `RUN_AGENT` action | ✅ | `runtime/io/handlers/control.py` |
|
||||
| `AgentRunAPIProxy` | ✅ | `api/proxies/agent_run_api.py` |
|
||||
|
||||
### LangBot 侧
|
||||
|
||||
| 组件 | 状态 | 备注 |
|
||||
|------|------|------|
|
||||
| `AgentRunnerRegistry` | ✅ | `pkg/agent/runner/registry.py` |
|
||||
| `AgentRunOrchestrator` | ✅ | `pkg/agent/runner/orchestrator.py` |
|
||||
| `AgentRunnerDescriptor` | ✅ | `pkg/agent/runner/descriptor.py` |
|
||||
| `AgentResourceBuilder` | ✅ | `pkg/agent/runner/resource_builder.py` |
|
||||
| `AgentRunContextBuilder` | ✅ | `pkg/agent/runner/context_builder.py` |
|
||||
| `AgentResultNormalizer` | ✅ | `pkg/agent/runner/result_normalizer.py` |
|
||||
| `ConfigMigration` | ✅ | `pkg/agent/runner/config_migration.py` |
|
||||
| `ChatMessageHandler` 集成 | ✅ | 使用 orchestrator 替代 wrapper |
|
||||
| `PipelineService` 集成 | ✅ | 从 registry 获取 runner metadata |
|
||||
| Plugin connector | ✅ | `list_agent_runners()` / `run_agent()` |
|
||||
|
||||
### 官方插件
|
||||
|
||||
> 插件仓库:`/home/glwuy/langbot-app/langbot-agent-runner/` (monorepo)
|
||||
|
||||
| 插件 | 状态 | 备注 |
|
||||
|------|------|------|
|
||||
| `local-agent` | ✅ 已完成 | 核心功能:模型、工具、知识库、流式、会话 |
|
||||
| `dify-agent` | ✅ 已完成 | 支持 chat/agent/workflow 三种应用类型 |
|
||||
| `n8n-agent` | ✅ 已完成 | Webhook 调用,支持 basic/jwt/header 认证 |
|
||||
| `coze-agent` | ✅ 已完成 | 多模态输入,思维链处理 |
|
||||
| `dashscope-agent` | ✅ 已完成 | 阿里云百炼,支持 agent/workflow 两种模式 |
|
||||
| `langflow-agent` | ✅ 已完成 | SSE 流式,tweaks 配置支持 |
|
||||
| `tbox-agent` | ✅ 已完成 | 蚂蚁百宝箱,多模态输入 |
|
||||
|
||||
**注意**: LangBot 内置的旧 runner(`pkg/provider/runners/`)已标记为 legacy,文件顶部添加了 DEPRECATED 注释。
|
||||
|
||||
---
|
||||
|
||||
## 待办事项
|
||||
|
||||
### 高优先级
|
||||
|
||||
- [ ] 工具详情 API — local-agent runner 有 TODO 注释
|
||||
|
||||
### 低优先级 / 未来
|
||||
|
||||
- [ ] EBA 完整集成 — event context 未在 context builder 中填充
|
||||
- [ ] 平台 API 动作执行 — `action.requested` 结果类型存在但未执行
|
||||
|
||||
---
|
||||
|
||||
## 关键决策记录
|
||||
|
||||
| 日期 | 决策 |
|
||||
|------|------|
|
||||
| 2026-05-10 | Phase 0 集成测试通过,SDK v1 协议验证成功 |
|
||||
| 2026-05-13 | Phase 3 完成:所有 7 个官方 runner 插件迁移完成 |
|
||||
|
||||
---
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [README.md](./README.md) — 总体设计
|
||||
- [OFFICIAL_RUNNER_PLUGINS.md](./OFFICIAL_RUNNER_PLUGINS.md) — 官方插件仓库计划
|
||||
- [IMPLEMENTATION_PLAN.md](./IMPLEMENTATION_PLAN.md) — 具体实施细节
|
||||
Reference in New Issue
Block a user