← 全部文档 docsecosystem-activation-playbook.md

AIShield Agent 生态 5 支柱落地 · 实施手册

日期:2026-09-24 状态:R1 首批落地 · 全部本地测试通过(1307 passed / 4 legacy fails) 对应方向:docs/aishield-direction-2026-09-research.md(研发导向开源 agent 生态统一服务平台)

一、本轮交付总览

层 支柱 新增/修改文件 状态
L1 信任认证 签名 Agent Card eco/agent_card.py(既有)+ api/ecosystem_api.py + MCP 新工具 ✅
L2 专业注册 Specialist Registry(8 域) eco/specialist_registry.py + API + 种子数据 ✅
L3 中立身份 KYA SD-JWT + Web Bot Auth + ERC-8004 eco/kyad_compat.py + API ✅
L4 责任链 Responsibility Chain eco/responsibility_chain.py(既有)+ API 接入 ✅
L5 协议翻译 MCP ⇄ A2A ⇄ ACP ⇄ AP2 eco/protocol_bridge.py(既有)+ API 接入 ✅
发布门禁 aishield ship CLI scripts/ship_gate.py ✅
分发 MCP 6 个新工具 mcp-server/mcp.json → v4.5.0 ✅
测试 28 项新增自证 tests/test_ecosystem_activation.py ✅ 28/28

二、API 端点清单

所有端点走 api/server.py 路由分发到 api/ecosystem_api.py。

2.1 Agent Card 签名(L1)

GET  /api/v1/agent-card/pubkey             → 获取签发公钥
POST /api/v1/agent-card/sign               → 对 Agent Card 签名
POST /api/v1/agent-card/verify             → 验证签名(篡改即拒)
POST /api/v1/agent-card/identity           → 一站式导出 KYA + Web Bot Auth 身份

2.2 Specialist Registry(L2 · 8 专业域)

GET  /api/v1/specialist/domains            → 8 域目录 + 每域 agent 计数
GET  /api/v1/specialist/agents?domain=…    → 按域列出(含 lapsed)
GET  /api/v1/specialist/agents/{agent_id}  → 查询单个 agent
POST /api/v1/specialist/agents             → 注册 agent
POST /api/v1/specialist/agents/{id}/renew  → 续期 90 天
POST /api/v1/specialist/agents/{id}/revoke → 吊销

8 专业域(对齐 OWASP AIUC-1 场景 + 2026 生态主流赛道):

域 典型能力标签
legal contract / compliance / dispute / review
medical diagnosis / drug / imaging / genomics
finance risk / trading / audit / payment
education tutor / assessment / curriculum / mentor
engineering coding / devops / debugging / architecture
design writing / art / video / branding
research analysis / literature / simulation / visualization
civic public-service / social-welfare / urban / tax

2.3 中立身份(L3 · KYA / Web Bot Auth / ERC-8004)

POST /api/v1/identity/kyad/export         → Agent Card → KYA SD-JWT claims
POST /api/v1/identity/erc8004/wrap        → Wallet 地址 → DID:ERC-8004
GET  /api/v1/identity/wallets             → 文档指引

2.4 责任链(L4 · 硬骨头 #1)

POST /api/v1/chain                        → 创建链(或指定 chain_id)
POST /api/v1/chain/{id}/append            → 追加一条调用证据
GET  /api/v1/chain/{id}                   → 导出链
GET  /api/v1/chain/{id}/entries           → 同上(别名)
GET  /api/v1/chain/{id}/verify            → 校验完整性
GET  /api/v1/chain/{id}/trace?output_ref=…→ 溯源 + 定位首因

2.5 协议翻译(L5 · 硬骨头 #5)

POST /api/v1/protocol/normalize           → 任意协议 → UniversalAgent
POST /api/v1/protocol/translate           → from_protocol → target 协议

2.6 发布门禁 CLI(L1 · 差异化)

# 单文件扫描
python scripts/ship_gate.py --file ./mcp-server/mcp.json --json

# 目录扫描 + 生成 Trust Attestation
python scripts/ship_gate.py --path ./eco/my_skill/ \
  --json --fail-on-warn \
  --emit-attestation dist/attestation.json

# CI 集成(GitHub Action)
- run: python scripts/ship_gate.py --path . --json --fail-on-warn

判定规则:

条件 verdict 退出码
trust_score ≥ 70 且无 critical ship 0
有 critical 或 score < 40 break 1
其他 hold 0 / 2(--fail-on-warn 时)

三、MCP 新工具(v4.5.0)

在 mcp-server/mcp.json 的 capabilities.tools 添加 8 个新工具:

工具 对应端点 用途
aishield_sign_agent_card POST /agent-card/sign 对 Agent Card 签名
aishield_verify_agent_card POST /agent-card/verify 验证签名(防篡改)
aishield_export_identity POST /agent-card/identity 导出 KYA + Web Bot Auth
aishield_register_specialist POST /specialist/agents 注册专业 agent
aishield_list_specialist_domains GET /specialist/domains 查询 8 域
aishield_chain_append POST /chain/{id}/append 追加责任链
aishield_chain_trace GET /chain/{id}/trace 责任链溯源
aishield_protocol_translate POST /protocol/translate 协议翻译

四、测试覆盖(28 项全绿)

tests/test_ecosystem_activation.py 分 4 个测试类:

全量回归:1307 passed / 4 legacy fails(均为老 CI 契约问题,与本次改动无关) 隔离不变量:scripts/prove_isolation.py ✅ PASS

五、下一步(R2 → R5 队列)

六、明确不做

七、快速本地验证(3 条命令)

cd aishield
# 1. 跑 5 支柱 API 自证
python api/ecosystem_api.py

# 2. 跑 28 项新测试
python tests/test_ecosystem_activation.py

# 3. 试 ship CLI(对某个目录做发布门禁)
python scripts/ship_gate.py --path . --json

八、诚实风险


来源:docs/ecosystem-activation-playbook.md · 由 aishield.tools 直接渲染,零外链依赖