Skip to content

feat: 为 AgentCard 与 skills 显式声明 inputModes / outputModes#365

Closed
liujuanjuan1984 wants to merge 1 commit intomainfrom
feat/explicit-modes-362
Closed

feat: 为 AgentCard 与 skills 显式声明 inputModes / outputModes#365
liujuanjuan1984 wants to merge 1 commit intomainfrom
feat/explicit-modes-362

Conversation

@liujuanjuan1984
Copy link
Copy Markdown
Collaborator

摘要

本 PR 为 opencode-a2a 暴露的 AgentCard 与 skill-level metadata 显式补齐了 inputModesoutputModes

变更详情

  1. AgentCard 顶层支持:
    • 定义了 OpencodeAgentCard 子类,增加了顶层 inputModesoutputModes 字段(原本 a2a-sdk 中仅有 default_ 前缀的版本)。
    • build_agent_card 中显式填充这些字段。
  2. Skill-level Metadata 补齐:
    • opencode.sessions.query 技能增加了 text/plainapplication/octet-stream 作为输入模式(支持 prompt_async 中的 text/file parts)。
    • opencode.sessions.query 技能增加了 text/plain 作为输出模式(支持获取包含文本部分的会话消息)。
  3. 测试覆盖:
    • 更新了 tests/server/test_agent_card.py 以验证技能级别的模式声明。
    • 更新了 tests/server/test_transport_contract.py 以验证 JSON 响应中存在顶层 inputModesoutputModes

相关 Issue

Closes #362

@liujuanjuan1984
Copy link
Copy Markdown
Collaborator Author

按当前讨论结论关闭:该改动在 AgentCard schema 与 media mode 语义上存在回退,不继续推进。

@liujuanjuan1984 liujuanjuan1984 deleted the feat/explicit-modes-362 branch April 2, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Priority: Med] [Feature/Contracts] 为 AgentCard 与 skills 显式声明 inputModes / outputModes

1 participant