Skip to main content
Glama
evex-agent-messaging

evex-agent-messaging

by EvexU2

EVEX Agent Messaging Gateway

提供 Parent Main、Child Main 和 Role Child 对话操作的提供方中立 MCP 传输。Agent 调用此 MCP;它们不直接调用 OpenHands 的 Conversation API。

工具

  • create_child:验证完整的结构化 Mission 和干净的确定性 Git 检出,绑定 Child 身份及回调能力,然后创建一个确定性 Conversation。提供方运行一次无工具准入轮次,在 ACP 引导后恢复并重新验证确切的分支/head,然后才允许工具并交付 Mission。当 checkout 权限缺失或不匹配时,不会发生 Conversation API 调用。源角色仅接收 Messaging;只有明确的 QA/修复 Mission 才能请求 capabilities: ["runtime_environment"]。

  • send_to_parent:向能力所属的 Main 交付结构化的 RESULT/NEEDS_INPUT。

  • request_user_decision:向所属 Main 交付 A/B/C 式问题。

  • cancel_mission / resume_mission:停止或恢复确切的 Child 任务。

  • publish_navigation_links:向所属的 Main 发布信息性的 Issue/Main/Child/PR 链接。

能力是紧凑的不透明 evx1_ HMAC-SHA256 引用。它们绑定所属 Main、Child、任务键、角色、允许的操作和过期时间。服务器持有 OpenHands 凭据;它永远不会出现在工具输入、工具输出或子环境变量中。没有持久状态:调用方提供稳定的消息键,Main 对语义重放进行去重。

每个创建的 Child 都接收一个异步的原生 Stop 钩子。该钩子使用其作用域引用调用私有 /completion-hook 端点;网关等待终端原生状态,然后向所属 Main 发送一个包含有界终端助手响应的稳定 RECOVERY_WAKE。当模型在未调用 send_to_parent 的情况下完成时,这是提供方中立的回退。重复的钩子复用相同的语义消息键,不需要数据库、轮询器、读取工具或收据存储。

受信任的 Event Gateway/主机使用 main_capability_token(...) 铸造短期的 Main 能力,并将其注入 Main Mission。MCP 不向 Agent 暴露能力铸造工具。

Parent 仅创建或获取位于 /home/openhands/workspace/mirrors/<owner>--<repository>.git 的持久裸镜像。create_child 派生 /home/openhands/workspace/delivery/child-<child UUID>,在不存在时创建精确的分支工作树,并在接触 Conversation API 之前验证仓库、origin、分支、head 和干净状态。它从不远程克隆/获取、删除、重置或重新利用现有工作树。

Related MCP server: handoff-mcp-server

运行

服务器使用 MCP stdio 帧(Content-Length 头):

export EVEX_MESSAGING_SECRET='long-random-secret'
export OPENHANDS_URL='http://openhands:8000'
export OPENHANDS_API_KEY='server-only-key'
export OPENHANDS_PUBLIC_URL='http://openhands.example/canvas'
PYTHONPATH=src python3 -m evex_agent_messaging

只有适配器读取 OpenHands 变量。在测试中或由嵌入该服务的主机可以注入假提供方,因此技能和 Mission 保持运行时中立。

验证

python3 -m unittest discover -s tests -p 'test_*.py' -q

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers