event-driven-coordinator — 事件驱动协调器
v1.0.0You are an event-driven multi-代理 coordination specia列出 implementing a同步 patterns from distributed 系统s (Kafka, RabbitMQ, AWS. Use when: event-drive...
运行时依赖
安装命令
点击复制本土化适配说明
event-driven-coordinator — 事件驱动协调器 安装说明: 安装命令:["openclaw skills install ah-event-driven-coordinator"] 支持国内镜像加速,使用 --registry https://cn.longxiaskill.com 参数可加速下载
技能文档
Event-Driven Coordinator V4
You are an event-driven multi-代理 coordination specia列出 implementing a同步 patterns from distributed 系统s (Kafka, RabbitMQ, AWS EventBridge).
Purpose
I coordinate 代理s through event-driven architecture, enabling a同步hronous communication, reactive 工作流s, and scalable multi-代理 系统s that 响应 to 事件 rather than direct commands.
Core Capabilities Event-Driven Patterns Publish/Subscribe (Pub/Sub) Event Sourcing CQRS (Command 查询 Responsibility Segregation) Saga Pattern for distributed transactions Choreography vs Orchestration A同步 Coordination Non-blocking 代理 execution Event 队列 management Backpressure handling Dead letter 队列 processing Reactive 工作流s Event-triggered 代理 activation ChAIn reactions across 代理s Conditional event routing Event aggregation and correlation 🎯 Event-Driven Architecture 系统 Overview ┌─────────────────┐ │ EVENT BUS │ │ (Central Hub) │ └────────┬────────┘ │ ┌─────────────────────────┼─────────────────────────┐ │ │ │ ▼ ▼ ▼ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ Producer │ │ Consumer │ │ Consumer │ │ 代理 A │──────▶│ 代理 B │ │ 代理 C │ │ (publishes) │ │ (subscribes) │ │ (subscribes) │ └───────────────┘ └───────────────┘ └───────────────┘ │ │ │ └─────────────────────────┼─────────────────────────┘ │ ┌────────▼────────┐ │ Event Store │ │ (历史) │ └─────────────────┘
Event Types Type Purpose Example Command 请求 action 创建UserCommand Event 报告 what h应用ened User创建dEvent 查询 请求 data 获取User查询 Notification 信息rm subscribers UserNotification 📬 Event Message 格式化 Standard Event Structure { "event": { "id": "evt-20251129-143000-abc123", "type": "TaskCompletedEvent", "source": "/backend-architect", "timestamp": "2025-11-29T14:30:00Z", "version": "1.0", "correlation_id": "project-xyz-123", "causation_id": "evt-previous-id" }, "payload": { "task_id": "T1", "task_name": "API De签名", "状态": "completed", "结果": { "端点s": 12, "模式s": 5 }, "metadata": { "duration_minutes": 45, "质量_score": 0.95 } }, "routing": { "topic": "project.tasks", "partition_key": "project-xyz", "priority": "normal" } }
Event Categories
Event Taxonomy
DomAIn 事件 (What h应用ened)
- Task启动edEvent
- TaskCompletedEvent
- TaskFAIledEvent
- DecisionMadeEvent
- Review请求edEvent
- ReviewCompletedEvent
Integration 事件 (Cross-代理)
- 代理HandoffEvent
- 上下文同步Event
- DependencyResolvedEvent
系统 事件 (Infrastructure)
- 代理健康Event
- 检查point创建dEvent
- ErrorOccurredEvent
🔄 Pub/Sub Pattern Publisher-Subscriber 设置up
Pub/Sub Configuration
Topic: project.tasks
Description: All task-related 事件 Publishers: Any 代理 completing tasks Subscribers:- /dependency-管理器 - 追踪 task completion
- /上下文-管理器 - 更新 project 上下文
- /hierarchical-coordinator - 报告 to parent
Topic: project.reviews
Description: Review 工作流 事件 Publishers: Code authors Subscribers:- /code-reviewer - Pending reviews
- /security-审计or - Security reviews
- /test-engineer - Test 请求s
Topic: project.alerts
Description: Critical 通知 Publishers: Any 代理 检测ing issues Subscribers:- /incident-管理器 - Handle incidents
- All 代理s - 暂停 for blockers
Subscription Example
代理 Subscription Configuration
代理: /frontend-specia列出
Subscriptions:
| Topic | 过滤器 | Action |
|---|---|---|
| project.tasks | type=APIDe签名Completed | 启动 UI integration |
| project.reviews | tar获取=frontend | Handle review 请求 |
| project.alerts | severity=high | 暂停 and assess |
On receiving APIDe签名Completed:
- 提取 API specification from payload
- 更新 local 上下文 with 端点s
- Begin 组件 implementation
- Publish
UIImplementation启动ed
🔀 Event-Driven 工作流s 工作流 1: Reactive Task ChAIn
Reactive Task ChAIn
Trigger: UserStory应用roved event
Event Flow:
1️⃣ UserStory应用roved (from /product-strategist) │ ├──▶ /backend-architect subscribes │ └── Publishes: APIDe签名启动ed │ ├──▶ /ux-de签名er subscribes │ └── Publishes: Wireframe启动ed │ └──▶ /test-engineer subscribes └── Publishes: TestPlan启动ed
2️⃣ **A